We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b07fd94 commit faa0ba9Copy full SHA for faa0ba9
src/prototype/dom/dom.js
@@ -2336,9 +2336,12 @@
2336
}
2337
2338
var PROBLEMATIC_ATTRIBUTE_READING = (function() {
2339
- DIV.setAttribute('onclick', Prototype.emptyFunction);
+ // This test used to set 'onclick' to `Prototype.emptyFunction`, but that
2340
+ // caused an (uncatchable) error in IE 10. For some reason, switching to
2341
+ // an empty array prevents this issue.
2342
+ DIV.setAttribute('onclick', []);
2343
var value = DIV.getAttribute('onclick');
- var isFunction = (typeof value === 'function');
2344
+ var isFunction = Object.isArray(value);
2345
DIV.removeAttribute('onclick');
2346
return isFunction;
2347
})();
0 commit comments