Skip to content

Instantly share code, notes, and snippets.

View neonstalwart's full-sized avatar

Ben Hockey neonstalwart

  • google.com
  • Boulder, CO
View GitHub Profile
<!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");
<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');
var d = new dojo.Deferred();
d.addErrback(function(){
console.log('first error handler');
});
d.addErrback(function(){
console.log('2nd error handler');
});
// 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.
<!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'>
@neonstalwart
neonstalwart / test_Dialog.html
Created June 24, 2010 19:13
#11369 test case
<!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";
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);
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]; }
@neonstalwart
neonstalwart / gist:497000
Created July 29, 2010 02:01
dojo-docs-debug
<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>
<!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>