I am working on a firebug like javascript element selector, but cannot 
figure out how to stop all JavaScript events from firing when clicked. The 
firebug lite plugin (https://getfirebug.com/firebuglite) is doing exactly 
what I want, but cannot figure out what they are doing.
Any help would be appreciated.

Senario:

   - User selects element inspector
   - User clicks on element
   - onClick, mousedown, mouseup should NOT fire

I have tried the following with no luck:

function stopEvents(el){

    for(var key in window) {
        if (key.indexOf("on") == 0) {
            el.addEventListener(key.substr(2), stop, false);
        }
    }
}

function StopEvent(pE)
{
    stopEvents(pE);

    if (!pE)
     if (window.event)
       pE = window.event;
     else
       return;
  if (pE.cancelBubble != null)
     pE.cancelBubble = true;
  if (pE.stopPropagation)
     pE.stopPropagation();
  if (pE.preventDefault)
     pE.preventDefault();
  if (window.event)
     pE.returnValue = false;
  if (pE.cancel != null)
     pE.cancel = true;
} 





-- 
You received this message because you are subscribed to the Google Groups 
"Firebug" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/firebug.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/firebug/dcf9eb86-a0c6-422d-bdfa-8dada145fa9e%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to