Make _.isElement more robust. [closes #427]

This commit is contained in:
John-David Dalton
2013-12-12 22:22:47 -08:00
parent ad2683b610
commit 40421f4321
9 changed files with 294 additions and 179 deletions

View File

@@ -43,6 +43,12 @@
Object._keys = Object.keys;
Object.keys = function() {};
window._clearTimeout = clearTimeout;
window.clearTimeout = function() {};
window._setTimeout = setTimeout;
window.setTimeout = function() {};
}
function removeBizarroMethods() {
@@ -81,6 +87,12 @@
} else {
delete Object.keys;
}
window.clearTimeout = _clearTimeout;
window._clearTimeout = undefined;
window.setTimeout = _setTimeout;
window._setTimeout = undefined;
delete Array._isArray;
delete Date._now;
delete Function.prototype._bind;