dennwc / dom

DOM library for Go and WASM

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Add NodeType() function to NodeBase type

smoyer64 opened this issue · comments

Needed to properly iterate over just child elements as desired in #38.

See https://developer.mozilla.org/en-US/docs/Web/API/Node/nodeType for enumerated node types.

PR #44 allows the test described in #38 to be simplified to e.NodeType() == ElementNode.