Last active
December 16, 2015 07:08
-
-
Save karlwestin/5396117 to your computer and use it in GitHub Desktop.
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
console.log('bar.js is run (should run 2nd)'); | |
define(['https://gist.github.com/karlwestin/5396117/raw/foo.js'], function () { | |
console.log('complete in bar.js is run (should run 4th)'); | |
window.divide = function (a, b) { | |
return a / b; | |
} | |
}); |
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
// @see http://jsfiddle.net/YbBuG/ | |
console.log('fiddle.js is run (should run 1st)'); | |
define(['https://gist.github.com/karlwestin/5396117/raw/bar.js'], function () { | |
console.log('callback in fiddle.js is run (should run 5th)'); | |
try { | |
divide(times(4, 6), 3); | |
} | |
catch (error) { | |
console.log(error); | |
} | |
}); |
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
console.log('foo.js is run (should run 3rd)'); | |
window.times = function (a, b) { | |
return a * b; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment