Replace all instances of foo.__proto__ by foo['__proto__'] for Caja-compliance.
This commit is contained in:
parent
de5cc4a0f9
commit
9c8d9d89d6
|
@ -1,3 +1,5 @@
|
|||
* Replace all instances of foo.__proto__ by foo['__proto__'] for Caja-compliance. (Tobie Langel)
|
||||
|
||||
* Speed up Function#argumentNames. Avoid Enum dependency. (samleb, Tobie Langel)
|
||||
|
||||
* Fix Event#element accessing inexistent tagName property (e.g. when element is a document). (kangax)
|
||||
|
|
|
@ -1035,9 +1035,9 @@ Element.Methods.ByTag = { };
|
|||
Object.extend(Element, Element.Methods);
|
||||
|
||||
if (!Prototype.BrowserFeatures.ElementExtensions &&
|
||||
document.createElement('div').__proto__) {
|
||||
document.createElement('div')['__proto__']) {
|
||||
window.HTMLElement = { };
|
||||
window.HTMLElement.prototype = document.createElement('div').__proto__;
|
||||
window.HTMLElement.prototype = document.createElement('div')['__proto__'];
|
||||
Prototype.BrowserFeatures.ElementExtensions = true;
|
||||
}
|
||||
|
||||
|
@ -1148,7 +1148,7 @@ Element.addMethods = function(methods) {
|
|||
if (window[klass]) return window[klass];
|
||||
|
||||
window[klass] = { };
|
||||
window[klass].prototype = document.createElement(tagName).__proto__;
|
||||
window[klass].prototype = document.createElement(tagName)['__proto__'];
|
||||
return window[klass];
|
||||
}
|
||||
|
||||
|
|
|
@ -138,7 +138,7 @@ Event.extend = (function() {
|
|||
};
|
||||
|
||||
} else {
|
||||
Event.prototype = Event.prototype || document.createEvent("HTMLEvents").__proto__;
|
||||
Event.prototype = Event.prototype || document.createEvent("HTMLEvents")['__proto__'];
|
||||
Object.extend(Event.prototype, methods);
|
||||
return Prototype.K;
|
||||
}
|
||||
|
|
|
@ -16,9 +16,9 @@ var Prototype = {
|
|||
SelectorsAPI: !!document.querySelector,
|
||||
ElementExtensions: !!window.HTMLElement,
|
||||
SpecificElementExtensions:
|
||||
document.createElement('div').__proto__ &&
|
||||
document.createElement('div').__proto__ !==
|
||||
document.createElement('form').__proto__
|
||||
document.createElement('div')['__proto__'] &&
|
||||
document.createElement('div')['__proto__'] !==
|
||||
document.createElement('form')['__proto__']
|
||||
},
|
||||
|
||||
ScriptFragment: '<script[^>]*>([\\S\\s]*?)<\/script>',
|
||||
|
|
Loading…
Reference in New Issue