Hi.  I am creating an extension (for Chrome right now) and I need to
allow the user to select any page element like Firebug allows the user
to do for DOM inspection.  I don't actually need to inspect the DOM or
show CSS or anything, I just want to duplicate the element selection
process.

I have looked over inspector.js and have implemented a very simple
version that just adds a border around the element.  As you know this
causes elements to move around as they are hovered over.  I really do
want it to look just like Firebug's element selection with the
overlay.  However, it looks like it won't be as trivial to extract the
necessary code from the inspector.js file as it also uses the Firebug
Context object.

After looking over when the context is used, it appears to only be
used to mark certain elements as non-highlightable, which makes sense.

Is there someone who can modularize the inspector to a single file so
that something like:

var selector = new ElementSelector();  //ElementSelector is completely
self-contained in a file like selector.js
selector.select(function(selectedElement) {     //(callback)
      if(selectedElement === null) return //no element selected

      //element was selected, do whatever with it now.
});

I understand that the Firebug code uses a BSD 3-clause license.  I
believe I'll just need to copy the firebug license.txt file to my
extension package and give credit in the code where necessary,
correct?

Thanks for your help.

-- 
You received this message because you are subscribed to the Google Groups 
"Firebug" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/firebug?hl=en.

Reply via email to