When creating an extension for Dev Tools, it's very common to try to mimic some of the stuff presented on the tool itself, like for example highlight a DOM Node.
I was checking the source code for Dev Tools, and there's some interesting APIs wired to an object named DOMAgent such as highlightNode() and hideHighlight(). They seem to be part of the core API.
DevToolsExtensionAPI.js has this:
if (extensionInfo.exposeWebInspectorNamespace)
window.webInspector = coreAPI;
But I don't think there's a way to set this "exposeWebInspectorNamespace" variable, but anyway... is there a way to access the DOM highlight API?
For now I created a pretty ugly solution that creates a DIV on the screen :) I also mimic all the styles from Dev Tools, like side panels and tree panels, since I don't see a way to import those too. They all belong to the parent iframe. Would be cool to have access to those too.
Well, I don't want to stretch too much here. If anyone has info on how to highlight a DOM node using the same API from Dev Tools, that would be great!