Last active
August 29, 2015 13:56
-
-
Save MikeRatcliffe/8862556 to your computer and use it in GitHub Desktop.
Why would this HighlighterActor method return too early?
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
/** | |
* Why would "node-highlight" be emitted before showBoxModel() is called. | |
* | |
* From logging I can clearly see initInspector > "node-highlight" > showBoxModel | |
**/ | |
highlightNodeFront: function(nodeFront, options={}) { | |
let deferred = promise.defer(); | |
... | |
this.toolbox.initInspector().then(() => { | |
this.toolbox.highlighter.showBoxModel(nodeFront, options).then(() => { | |
this.toolbox.emit("node-highlight", nodeFront); | |
deferred.resolve(nodeFront); | |
}); | |
}); | |
... | |
return deferred.promise; | |
}, |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment