Skip to content

Instantly share code, notes, and snippets.

@MikeRatcliffe
Last active August 29, 2015 13:56
Show Gist options
  • Save MikeRatcliffe/8862556 to your computer and use it in GitHub Desktop.
Save MikeRatcliffe/8862556 to your computer and use it in GitHub Desktop.
Why would this HighlighterActor method return too early?
/**
* 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