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

Add DOM - core, events, ranges, tree walker etc #2007

Open
wants to merge 19 commits into
base: main
Choose a base branch
from

Conversation

autonome
Copy link
Collaborator

@autonome autonome commented Oct 21, 2024

See #1380 for discussion on DOM as a standalone feature, ranges, etc:

  • we seem to be sticking w/ putting things w/ where they're used, so putting ranges w/ selection api
  • there was no conclusion on a general "DOM" feature

Looking at the spec-generated DOM draft, some thoughts and questions:

  • events seem like something that should stand alone as one or more features, and Caniuse has various separate related features: addEventListener, passive: true, CustomEvent, EventTarget.dispatchEvent and more
  • Document, DocumentFragment and DocumentType are proposed features in Add document, document fragment, document type #1983
  • MutationObserver seems standalone and Caniuse treats it that way too
  • the Node and Element keys together have so many "use it 10,000 times per day" APIs, could be a standalone feature probably
  • qS/A are standalone on Caniuse, which seems right
  • there's a set of list-ish APIs HTMLCollection, NamedNodeMap, NodeList, NodeIterator` - if we go big-dom-feature, could leave them all in there, for now at least
  • and then some bits like Attr, Comment, CharacterData, Text etc, some of which will align w/ their HTML spec counterparts - these each seem like standalone features of the web

Aside from the list-ish bits, there's not much left for a standalone DOM feature if we do the above... and those might actually be ok living in Document.

@github-actions github-actions bot added the feature definition Creating or defining new features or groups of features. label Oct 21, 2024
@autonome autonome changed the title Add bits of DOM - ranges, tree walker and more Add DOM - core, events, ranges, tree walker etc Oct 22, 2024
Copy link
Collaborator

@ddbeck ddbeck left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm feeling pretty positively toward this so far. I'm inclined toward lumping more stuff into the DOM feature itself (Node, Element, and maybe querySelector), which I've noted in a few places. But this is a good outline of what to do with a LOT of keys.

features/dom.yml Show resolved Hide resolved
features/events.yml Show resolved Hide resolved
features/mutations.yml Outdated Show resolved Hide resolved
features/dom.yml.dist Outdated Show resolved Hide resolved
features/node.yml Outdated Show resolved Hide resolved
features/queryselector.yml Outdated Show resolved Hide resolved
@autonome autonome marked this pull request as ready for review October 27, 2024 13:13
@autonome
Copy link
Collaborator Author

autonome commented Oct 27, 2024

Implemented the DOM rollup approach, and review feedback integrated.

Edit: Er, and subsequent files updated also.

@autonome autonome marked this pull request as draft October 28, 2024 04:47
@autonome autonome marked this pull request as ready for review October 28, 2024 04:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature definition Creating or defining new features or groups of features.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants