MCPcopy Index your code
hub / github.com/prototypejs/prototype / checkElementPrototypeDeficiency

Function checkElementPrototypeDeficiency

src/prototype/dom/dom.js:3191–3208  ·  view source on GitHub ↗
(tagName)

Source from the content-addressed store, hash-verified

3189
3190 // Certain oddball element types can't be extended in IE8.
3191 function checkElementPrototypeDeficiency(tagName) {
3192 if (typeof window.Element === 'undefined') return false;
3193 // Skip newer IEs because creating an OBJECT tag pops up an annoying
3194 // "this page uses Java" warning.
3195 if (!HAS_EXTENDED_CREATE_ELEMENT_SYNTAX) return false;
3196 var proto = window.Element.prototype;
3197 if (proto) {
3198 var id = '_' + (Math.random() + '').slice(2),
3199 el = document.createElement(tagName);
3200 proto[id] = 'x';
3201 var isBuggy = (el[id] !== 'x');
3202 delete proto[id];
3203 el = null;
3204 return isBuggy;
3205 }
3206
3207 return false;
3208 }
3209
3210 var HTMLOBJECTELEMENT_PROTOTYPE_BUGGY =
3211 checkElementPrototypeDeficiency('object');

Callers 1

dom.jsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected