Skip to content

Changes to element creation during parsing per F2F #366

Closed

Description

@domenic

During parsing, the moment the open tag is seen:

  1. Increment the ignore destructive writes counter
  2. Drop out of the parser, like you do for script elements
  3. Queue the constructor.
  4. Queue the attributeChangedCallbacks, in order, as you see new attributes.
  5. Run the custom element callbacks queue, synchronously
  6. If the return value of the constructor is not of the correct registered name, just create a HTMLUnknownElement instead and stop processing the queue
  7. If any of the callbacks run throw, just create a HTMLUnknownElement instead and stop processing the queue
  8. Decrement the counter
  9. Resume parsing

Still TBD: does innerHTML do step "run the custom element callbacks queue, synchronously" or not? At the meeting we determined innerHTML uses nanotasks, like all other IDL APIs

Activity

  1. domenic commented on Mar 10, 2016

    @domenic
    CollaboratorAuthor

    This should now be implemented:

    There are a couple rough edges:

    Review appreciated!

  2. added a commit that references this issue on Jul 30, 2025
    fbc5787
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions