-
Notifications
You must be signed in to change notification settings - Fork 22.9k
Modernize DOM guide (2): rename two pages, new Anatomy of the DOM page #41569
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
Conversation
files/en-us/web/api/document_object_model/anatomy_of_the_dom/index.md
Outdated
Show resolved
Hide resolved
files/en-us/web/api/document_object_model/anatomy_of_the_dom/index.md
Outdated
Show resolved
Hide resolved
files/en-us/web/api/document_object_model/anatomy_of_the_dom/index.md
Outdated
Show resolved
Hide resolved
- 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: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we have anywhere to link to from 'bitmask'? I don't find anything appropriate
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think so; perhaps one day we should write a glossary
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great! Couple of comments to consider, but looking good to go, IMO 👍🏻
Co-authored-by: Brian Smith <brian@smith.berlin>
@bsmth If I send a PR to shared-assets, would you be able to run |
Actually never mind, I can just export from the online playground! |
Great, taking a look now |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks a lot. Another +1 on the delta since last review, looking great 👍🏻
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.