Hello,
i use prototype.js with the Adobe SVG Viewer V3 because projects
require it.
In IE the eventcache is emptied on page window unload event. The
causes Adobe SVG to throw an Exception.
So I''ve written a patch to detect the Adobe SVG - Plugin - and use
this detection in events.js.
I would suggest to use this in further prototype-versions.
logan
my patch:
Index: src/event.js
==================================================================---
src/event.js (revision 7076)
+++ src/event.js (working copy)
@@ -103,5 +103,5 @@
});
/* prevent memory leaks in IE */
-if (Prototype.Browser.IE)
+if (Prototype.Browser.IE && !Prototype.Browser.AdobeSvg)
Event.observe(window, ''unload'', Event.unloadCache, false);
Index: src/prototype.js
==================================================================---
src/prototype.js (revision 7076)
+++ src/prototype.js (working copy)
@@ -6,8 +6,9 @@
Browser: {
IE: !!(window.attachEvent && !window.opera),
Opera: !!window.opera,
- WebKit: navigator.userAgent.indexOf(''AppleWebKit/'') >
-1,
- Gecko: navigator.userAgent.indexOf(''Gecko'') > -1
&&
navigator.userAgent.indexOf(''KHTML'') == -1
+ WebKit: navigator.userAgent &&
navigator.userAgent.indexOf(''AppleWebKit/'') > -1,
+ Gecko: navigator.userAgent &&
navigator.userAgent.indexOf(''Gecko'') > -1 &&
navigator.userAgent.indexOf(''KHTML'') == -1,
+ AdobeSvg: navigator.appName.indexOf(''Adobe SVG'') > -1
},
BrowserFeatures: {
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Ruby on Rails: Spinoffs" group.
To post to this group, send email to
rubyonrails-spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-spinoffs?hl=en
-~----------~----~----~----~------~----~------~--~---