Ticket #4477: prototype-perf-patch.diff
| File prototype-perf-patch.diff, 1.0 kB (added by Thomas Fuchs <t.fuchs@wollzelle.com>, 4 years ago) |
|---|
-
prototype.js
old new 900 900 901 901 Element.extend = function(element) { 902 902 if (!element) return; 903 if (_nativeExtensions) return element; 903 904 904 905 if (!element._extended && element.tagName && element != window) { 905 906 var methods = Element.Methods, cache = Element.extend.cache; … … 1113 1114 1114 1115 Object.extend(Element, Element.Methods); 1115 1116 1117 var _nativeExtensions = false; 1118 1119 if(!/MSIE/.test(navigator.userAgent)) { 1120 1121 if((typeof HTMLElement == 'undefined') && 1122 (/Konqueror|Safari|KHTML/.test(navigator.userAgent))) { 1123 var HTMLElement = {}; 1124 HTMLElement.prototype = 1125 document.createElement('html').constructor.__proto__.__proto__; 1126 } 1127 1128 if(typeof HTMLElement != 'undefined') { 1129 Object.extend(HTMLElement.prototype, Element.Methods); 1130 _nativeExtensions = true; 1131 } 1132 } 1133 1116 1134 var Toggle = new Object(); 1117 1135 Toggle.display = Element.toggle; 1118 1136