This file contains 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 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 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 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 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 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 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 {}; | |
}); |
This file contains 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
// dojox/gfx.js | |
define(['dojo/_base/kernel'], function(dojo){ | |
var gfx = dojo.getObject("gfx", true, dojox); | |
// this is actualy added in dojox/gfx/_base.js | |
dojo.mixin(gfx, { | |
switchTo: function(renderer){ | |
var ns = gfx[renderer]; | |
if(ns){ | |
dojo.mixin(gfx, ns); |
This file contains 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(["dojo/_base/config", "./" + (function(){ | |
var renderer, sl, flag, match; | |
while(!renderer){ | |
// Have a way to force a GFX renderer, if so desired. | |
// Useful for being able to serialize GFX data in a particular format. | |
if(dojo.config.forceGfxRenderer){ | |
renderer = dojo.config.forceGfxRenderer; | |
break; | |
} | |
var renderers = (typeof dojo.config.gfxRenderer === "string" ? |
This file contains 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 globalEval = (function(global, doc){ | |
global.__dojoEvalInfo__ = {}; | |
var resultId = 0, | |
head = doc.getElementsByTagName("head")[0] || doc.documentElement; | |
return function(text){ | |
var script = doc.createElement("script"), | |
id = resultId++, sText, result; | |
script.type = "text/javascript"; | |
sText = "__dojoEvalInfo__[" + id + "].result = eval(__dojoEvalInfo__[" + id + "].text);"; | |
global.__dojoEvalInfo__[id] = { text: text }; |