WebReflection / basicHTML

A NodeJS based, standard oriented, HTML implementation.
ISC License
126 stars 10 forks source link

Implement NamedNodeMap? #35

Closed grommett closed 5 years ago

grommett commented 5 years ago

Would you consider a PR implementing NamedNodeMap interface in the Element class? Or at least exposing the item method?

Currently, the project I'm working in makes a call to element.attributes.item and fails when the element is created using basicHTML 😢

WebReflection commented 5 years ago

0.22 has it, but watch out HTMLElement always have a style attribute so if you think length should be ever 0, that won't likely be the case (it's 1).

However, .item(0) works now, so I hope that's enough 👋

grommett commented 5 years ago

@WebReflection That's perfect. Thank you!