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

Popular posts from this blog

c++ - How do I get a multi line tooltip in MFC -

asp.net - In javascript how to find the height and width -

c# - DataTable to EnumerableRowCollection -