javascript - How to distinguish between live and non-live NodeList collections? -
both document.getelementsbytagname('div') , document.queryselectorall('div') return nodelist collection. difference first method returns live-collection , second 1 - static one.
the question - there opportunity distinguish 1 object via inspecting these objects (i.e - not trying add/remove items test "liveness")?
thanks in advance
the nodelist
interface agnostic of dead or live status.
interface nodelist { node item(in unsigned long index); readonly attribute unsigned long length; };
it contains property length
, , method item
i'm afraid it's not possible determine if object live without manipulating dom , seeing effects.
Comments
Post a Comment