var encodeURIComponent, Array_push, Number_toString;
(function() {
var iframe = document.createElement('iframe'), loaded = false;
iframe.style.width = '1px';
iframe.style.height = '1px';
iframe.style.position = 'absolute';
var onloadIframe = function() {
if (!loaded && iframe.contentWindow) {
loaded = true;
// Без onload в IE не создаётся JavaScript-окружение
iframe.contentWindow.document.write('<body onload=""></body>');
iframe.contentWindow.document.close();
var thatWindow = iframe.contentWindow;
encodeURIComponent = thatWindow.encodeURIComponent;
Array_push = thatWindow.Array.prototype.push;
Number_toString = thatWindow.Number.prototype.toString;
document.documentElement.removeChild(iframe);
setTimeout(function() {
// Без этого таймера IE удаляет выдернутые функции, в результате чего они становятся
// какими-то объектами.
}, 3600 * 24 * 1000);
}
};
iframe.onload = onloadIframe;
document.documentElement.insertBefore(iframe, document.documentElement.firstChild);
onloadIframe();
})();
Deleted prototype element or function
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment