You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It appears an element's .attributes property isn't a list-like object, but is instead a mapping. It does have a .length property, but you can't index the attributes. Example:
vardomino=require("domino");varassert=require("assert");varwindow=domino.createWindow('<a id="test">test</a>');varel=window.document.getElementById("test");// This succeeds:assert(el.attributes.length==1);// The rest fail:assert(el.attributes[0].name=="id");assert(el.attributes[0].value=="test");assert(el.attributes[0].nodeName=="id");assert(el.attributes[0].nodeValue=="test");// I believe currently el.attributes.id == "test", but it shouldn't:assert(el.attributes.id===undefined);
The text was updated successfully, but these errors were encountered:
It appears an element's
.attributes
property isn't a list-like object, but is instead a mapping. It does have a.length
property, but you can't index the attributes. Example:The text was updated successfully, but these errors were encountered: