Simplify the _.support.dom check.

This commit is contained in:
John-David Dalton
2013-12-16 21:22:46 -08:00
parent fb432465ea
commit 39a8652708
9 changed files with 134 additions and 141 deletions

View File

@@ -231,15 +231,13 @@
global.WinRTError = Error;
// fake dom
var window = global.window = {};
window.document = {};
window.window = window;
var _clearTimeout = global.clearTimeout;
global.clearTimeout = Number;
var _setTimeout = global.setTimeout;
global.setTimeout = Number;
global.window = {
'document': {
'createDocumentFragment': function() {
return { 'nodeType': 11 };
}
}
};
// add extensions
Function.prototype._method = function() {};
@@ -278,9 +276,6 @@
Object.getPrototypeOf = _getPrototypeOf;
Object.keys = _keys;
global.clearTimeout = _clearTimeout;
global.setTimeout = _setTimeout;
delete global.window;
delete global.WinRTError;
delete Function.prototype._method;