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><head> | |
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> | |
<title>Promise</title> | |
<script src="http://o.aolcdn.com/dojo/1.4/dojo/dojo.xd.js"> | |
</script> | |
<script type="text/javascript"> | |
dojo.provide("dojox.Promise"); |
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
<html> | |
<head> | |
<title>Dojo Test Page</title> | |
<link rel='stylesheet' type='text/css' href='http://ajax.googleapis.com/ajax/libs/dojo/1.4/dojo/resources/dojo.css'> | |
<link rel='stylesheet' type='text/css' href='http://ajax.googleapis.com/ajax/libs/dojo/1.4/dijit/themes/tundra/tundra.css'> | |
<script type="text/javascript" src='http://ajax.googleapis.com/ajax/libs/dojo/1.4/dojo/dojo.xd.js'></script> | |
<script type="text/javascript"> | |
dojo.require('dijit._Widget'); |
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 d = new dojo.Deferred(); | |
d.addErrback(function(){ | |
console.log('first error handler'); | |
}); | |
d.addErrback(function(){ | |
console.log('2nd error handler'); | |
}); |
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
// this is 'raw' javascript to load dojo, stylesheets, the app, etc. | |
// this file is all that needs to be included in the host page. | |
// this technique doesn't dojo.addOnLoad because it assumes that the | |
// app code will use dojo.addOnLoad as necessary. | |
// also, this doesn't load dojo.css as a 'reset' since it assumes that | |
// it is being loaded into an already established environment and it | |
// doesn't include loading the css for a dijit theme. |
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> | |
<head> | |
<title>#10705 Test</title> | |
<link rel='stylesheet' href='../dojo/resources/dojo.css'> | |
<link rel='stylesheet' href='../dijit/themes/dijit.css'> | |
<link rel='stylesheet' href='../dijit/themes/tundra/tundra.css'> | |
<script type='text/javascript'> |
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 PUBLIC "-//W3C//DTD HTML 4.01//EN" | |
"http://www.w3.org/TR/html4/strict.dtd"> | |
<html> | |
<head> | |
<title>Dialog Widget Dojo Tests</title> | |
<style type="text/css"> | |
@import "../../dojo/resources/dojo.css"; | |
@import "css/dijitTests.css"; |
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 start = Date.now(), | |
i = 1e5; | |
while(i--){ | |
//'abc'.search(/a/); | |
//'abc'.match(/a/); | |
/a/.test('abc'); | |
///a/.exec('abc'); | |
} | |
console.log(Date.now() - start); |
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 start = Date.now(), | |
i = 1e5, | |
a = [0,1,2,3,4,5,6,7,8,9], | |
total, l, j; | |
while(i--){ | |
total = 0; | |
// uncomment the line you want to test | |
l = a.length; while(l--){ total = total + a[l]; } | |
//for(j = 0, l=a.length; j < l; j++){ total = total + a[j]; } |
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
<script> | |
var djConfig = { | |
modulePaths: { | |
docs: '../../../docs', | |
CodeGlass: '../../../CodeGlass' | |
} | |
} | |
</script> | |
<script src="../../_addon/dojo_build/tmp/dojo-release-1.5.0-src/dojo/dojo.js"></script> |
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 PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> | |
<html dir="ltr"> | |
<head> | |
<style type="text/css"> | |
body, html { font-family:helvetica,arial,sans-serif; font-size:90%; } | |
</style> | |
<script src="http://ajax.googleapis.com/ajax/libs/dojo/1.5/dojo/dojo.xd.js" | |
djConfig="parseOnLoad: true"> | |
</script> |