This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
addtest('bug-root-children-arent-styled', function(g, d, e){ | |
var result = null, root; | |
if(d && d.documentElement && e){ | |
root = d.documentElement; | |
e.style.cssText = 'width:40px;height:40px;'; | |
try{ | |
root.insertBefore(e, root.firstChild); | |
result = e.clientWidth == 0; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function(global){ | |
var NON_HOST_TYPES = { "boolean": 1, "number": 1, "string": 1, "undefined": 1 }, | |
_listen, _stopListening, normalizeEventName; | |
// Imported from http://github.com/phiggins42/has.js. | |
// Host objects can return type values that are different from their actual | |
// data type. The objects we are concerned with usually return non-primitive | |
// types of object, function, or unknown. | |
function isHostType(object, property){ | |
var type = typeof object[property]; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE HTML> | |
<html lang="en"> | |
<head> | |
<meta charset="utf-8"> | |
<meta http-equiv="refresh" content="2;url="> | |
<title>Leak Fix with Lookup Wrapper</title> | |
<script src="helper.js"></script> | |
<script> | |
var _cache = {}; | |
var createWrapper = (function(){ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Global Object | |
// (§10.2.1) | |
// GO.scope_chain = [GO] | |
// GO._cache = _cache | |
var _cache = {}; | |
// Declaration (§13.2): | |
// CWanonfunc.[[Scope]] = GO.scope_chain.slice(0) (§13.2 step 7) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var eventData = {}; | |
(function(global){ | |
function createDispatcher(id){ | |
function dispatcher(){ | |
if(id in _evtData){ | |
_evtData[id].handler.apply(this, arguments); | |
} | |
} | |
return dispatcher; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var guid = (function(){ | |
function hasUniqueNumber(){ | |
var docEl = document.documentElement, elem = document.createElement("div"); | |
return (typeof elem.uniqueNumber == "number" && typeof docEl.uniqueNumber == "number" && | |
elem.uniqueNumber != docEl.uniqueNumber); | |
} | |
var guid, last = 1; | |
if(hasUniqueNumber()){ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE HTML> | |
<html lang="en"> | |
<head> | |
<meta charset="utf-8"> | |
<title>Test</title> | |
</head> | |
<body> | |
<input id="txt" /> | |
<script> | |
var txt = document.getElementById("txt"), |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE HTML> | |
<html lang="en"> | |
<head> | |
<meta charset="utf-8"> | |
<title>Test</title> | |
</head> | |
<body> | |
<input id="txt" type="text"> | |
<script> | |
var attach; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var Boolean = (function(){ | |
var undefinedThis = (function(){ | |
return this; // this depends on strict mode | |
})(); | |
function Boolean(arg){ | |
if(this == undefinedThis){ | |
return !!arg; | |
}else{ | |
return {}; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
define([], function(){ | |
require(['tests/recurse/b']); | |
return {}; | |
}); |
OlderNewer