M
Matt Kruse
Using a document listener on DOMNodeInserted, I'm trying to determine
if an element with id="x" was inserted. So either the
event.target.id=="x" or a child element of the one inserted
has .id=="x".
What is the best way to determine if #x is a child of the inserted
element?
Currently I'm doing:
if ( element.querySelectorAll("#x").length==1 )
But that limits my browser compatibility. I'd like to support Firefox
< 3.5, which lacks querySelectorAll.
Matt Kruse
if an element with id="x" was inserted. So either the
event.target.id=="x" or a child element of the one inserted
has .id=="x".
What is the best way to determine if #x is a child of the inserted
element?
Currently I'm doing:
if ( element.querySelectorAll("#x").length==1 )
But that limits my browser compatibility. I'd like to support Firefox
< 3.5, which lacks querySelectorAll.
Matt Kruse