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>IDBWrapper Tutorial, Step 1</title> | |
</head> | |
<body> | |
<script type="text/javascript" src="IDBStore.js"></script> | |
<script type="text/javascript" src="tutorial.js"></script> | |
</body> | |
</html> |
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 require = { | |
baseUrl: 'src/', // all other paths are now relative to this one | |
paths: { | |
'implementations': 'platforms/unknown' | |
} | |
}; | |
</script> | |
<script type="text/javascript" src="src/require.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
define(['feature!async-promise'],function(embed){ | |
// Now you have embed.Promise available! | |
}) | |
// All features return the same object, so that you | |
// can do the following: | |
define(['feature!async-promise', 'feature!html-element'], function(embed){ | |
// All methods provided by the html-element feature are now | |
// available in the object returned by the async-promise feature, |
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
// DOM node creation quick'n'easy: | |
var containerNode = embed.create('div', { | |
className: 'container box', | |
innerHTML: '<span>Huh, a container!</span>', | |
style: { | |
border: 'solid red 1px' | |
} | |
}, parentNode); |
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
dojox.Promise = function(){ | |
return { | |
emit: function(data){ // stub function | |
}, | |
then: function(doneHandler,errHandler){ | |
var promise = new dojox.Promise(); | |
dojo.connect(this, 'emit', function(data){ | |
if(doneHandler && !(data instanceof Error)){ |
NewerOlder