Created
May 16, 2011 19:56
-
-
Save unscriptable/975207 to your computer and use it in GitHub Desktop.
aop-ish way to detect when dojo.parser.parse is called
This file contains 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(['dojo/parser, wire/Deferred'], function (parser, Promise) { | |
var orig = parser.parse, | |
promise = new Promise(); | |
parser.parse = function (node) { | |
orig.apply(parser, arguments); | |
promise.resolve(); | |
}; | |
return promise; | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment