Modernize DOM guide (2): rename two pages, new Anatomy of the DOM page#41569
Merged
Modernize DOM guide (2): rename two pages, new Anatomy of the DOM page#41569
Conversation
Contributor
bsmth
reviewed
Oct 17, 2025
bsmth
reviewed
Oct 17, 2025
bsmth
reviewed
Oct 17, 2025
bsmth
reviewed
Oct 17, 2025
bsmth
reviewed
Oct 17, 2025
bsmth
reviewed
Oct 17, 2025
bsmth
reviewed
Oct 17, 2025
| - For `Attr`, the `name` (more accurately, the `namespaceURI`, `prefix`, and `localName`; we will introduce these in the [XML namespaces](/en-US/docs/Web/API/Document_Object_Model/XML_namespaces) guide) and `value` properties need to be compared. | ||
| - For all `CharacterData` nodes (`Text`, `CDATASection`, `Comment`, and `ProcessingInstruction`), the `data` property needs to be compared. For `ProcessingInstruction`, the `target` property also needs to be compared. | ||
|
|
||
| The `a.compareDocumentPosition(b)` method compares two nodes by tree order. It returns a bitmask indicating their relative positions. The possible cases are: |
Member
There was a problem hiding this comment.
Do we have anywhere to link to from 'bitmask'? I don't find anything appropriate
Member
Author
There was a problem hiding this comment.
I don't think so; perhaps one day we should write a glossary
bsmth
reviewed
Oct 17, 2025
bsmth
reviewed
Oct 17, 2025
bsmth
approved these changes
Oct 17, 2025
Member
bsmth
left a comment
There was a problem hiding this comment.
Great! Couple of comments to consider, but looking good to go, IMO 👍🏻
Co-authored-by: Brian Smith <brian@smith.berlin>
Member
Author
|
@bsmth If I send a PR to shared-assets, would you be able to run |
Member
Author
|
Actually never mind, I can just export from the online playground! |
Member
Great, taking a look now |
bsmth
approved these changes
Oct 20, 2025
Member
bsmth
left a comment
There was a problem hiding this comment.
Thanks a lot. Another +1 on the delta since last review, looking great 👍🏻
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Follow up of #41381. In this PR, I introduced the fundamental APIs for DOM in the "Anatomy of the DOM" guide, which is important for further guides. In preparation of more rewrites, I'm generalizing the other two oddly specific DOM guide pages, and it should be apparent what I plan to add to them.