Skip to content

webapi: don't upgrade custom elements in a windowless document - #3409

Open
karlseguin wants to merge 1 commit into
mainfrom
contextless-custom-elements
Open

webapi: don't upgrade custom elements in a windowless document#3409
karlseguin wants to merge 1 commit into
mainfrom
contextless-custom-elements

Conversation

@karlseguin

Copy link
Copy Markdown
Collaborator

A custom element created in a windowless document (think DOMParser, or new Document(), ...) doesn't have a custom element registry and thus should remain undefined.

This repurposes the existing Frame._skip_custom_element_upgrade boolean into a tri-state enum to capture the 3 possible states: construct and bare_context capture the previous boolean state, and undefined is now used for this third state.

This fixes (non-fatal) errors on decathlon.com. It also fixes a few WPT cases and advances a few more (which are now failing for a different reason).

A custom element created in a windowless document (think DOMParser, or new
Document(), ...) doesn't have a custom element registry and thus should remain
undefined.

This repurposes the existing Frame._skip_custom_element_upgrade boolean into a
tri-state enum to capture the 3 possible states: `construct` and `bare_context`
capture the previous boolean state, and `undefined` is now used for this third
state.

This fixes (non-fatal) errors on decathlon.com. It also fixes a few WPT cases
and advances a few more (which are now failing for a different reason).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant