v3.1.4
Patch release protecting DOM property access from named elements that shadow native properties. Adds two shared helpers while preserving existing node classification and array handling.
Fixed
- Read
nodeTypethrough DOM prototypes so form controls named or identified asnodeTypeno longer break DOM predicates. - Protect window detection from named elements that shadow a document's
defaultView. - Keep forms and windows affected by these collisions from being treated as array-like values or expanded by
wrap().
Added
- Exported
getDOMProperty(node, property)andcallDOMMethod(node, method, ...args)with the correct getter and method receivers, without requiring browser globals, DOM constructors, or new runtime dependencies.
Changed
- Shared an internal node-type lookup across DOM predicates.
isNode()still recognizes Element, Text, and Comment nodes only. - Preserved ordinary property access for non-DOM values, including plain document stand-ins and null-prototype objects. DOM prototype lookups intentionally bypass own properties even when the result is
undefined. - Added focused regression coverage and documented the new helpers. Array identity and existing iterable handling are preserved.
- Rebuilt the distribution bundles and source maps.