Skip to content

Instantly share code, notes, and snippets.

@robertbasic
Created February 7, 2012 08:54
Show Gist options
  • Select an option

  • Save robertbasic/1758387 to your computer and use it in GitHub Desktop.

Select an option

Save robertbasic/1758387 to your computer and use it in GitHub Desktop.
dojo -_-
require([
'dojo/ready', 'dojo/query'
],
function (ready, query) {
function callThat() {
console.log(query("#id")); // works
}
ready(function() {
callThat();
callThis();
});
}
);
function callThis() {
// any way to use dojo functions/methods in functions defined outside of the "main" dojo function?
console.log(query("#id")); // query undefined ???
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment