Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DOM 4 deprecating node type for attributes #36

Open
njordhov opened this issue Mar 21, 2016 · 2 comments
Open

DOM 4 deprecating node type for attributes #36

njordhov opened this issue Mar 21, 2016 · 2 comments
Labels
category: parsing Correctness and Edge Cases. Hail the DOM status: dubious Where do I even begin? type: bug Something isn't working as intended

Comments

@njordhov
Copy link
Contributor

The ATTRIBUTE_NODE constant has been deprecated in DOM4. It should no longer be assumed that an attribute has a nodeType.

The changes to the Attribute interface is initially particularly relevant for the Clojurescript implementation of Hickory. It can be accommodated by not recursively mapping over attributes but instead convert attributes in place when building elements.

@njordhov
Copy link
Contributor Author

Case in point, in JSDom for Nodejs, attributes don't have a nodeType as they don't inherit from the Node interface.

@njordhov
Copy link
Contributor Author

The fix is to replace the recursive as-hickory in (map as-hickory (as-seq (aget this "attributes"))) to the equivalent of (fn [this] [(utils/lower-case-keyword (aget this "name")) (aget this "value")]). Ditto for as-hiccup.

@port19x port19x added type: bug Something isn't working as intended priority 3: low status: dubious Where do I even begin? category: parsing Correctness and Edge Cases. Hail the DOM and removed priority 3: low labels Apr 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
category: parsing Correctness and Edge Cases. Hail the DOM status: dubious Where do I even begin? type: bug Something isn't working as intended
Projects
None yet
Development

No branches or pull requests

2 participants