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

Enqueueing custom element reactions is ineffective for customized built-in elements #1360

Closed
dominiccooney opened this issue May 31, 2016 · 3 comments · Fixed by #1369
Closed
Assignees
Labels
topic: custom elements Relates to custom elements (as defined in DOM and HTML)

Comments

@dominiccooney
Copy link

Enqueue a callback reaction step 4 says:

Let definition be the entry in registry with name equal to element's local name.

This will not find a definition for customized built-in elements because their local names (for example, "button") are not valid custom element names, hence no such definition exists.

Given the idea that changing an element's "is" attribute does not affect its behavior, this points to the need for extra state associated with the element which remembers the original value of "is" for lookups like this.

@domenic
Copy link
Member

domenic commented May 31, 2016

It seems like this is just a simple typo and it should be "with local name equal to element's local name"?

@domenic domenic added the topic: custom elements Relates to custom elements (as defined in DOM and HTML) label May 31, 2016
@domenic domenic self-assigned this May 31, 2016
@dominiccooney
Copy link
Author

That doesn't work for customized built-in elements; you might have <button is="pet-kittens"> and <button is="launch-missiles">; these definitions have the same local name but you want to pick a specific one and not get them mixed up.

@domenic
Copy link
Member

domenic commented May 31, 2016

Ah of course; thank you.

I guess everything is leaning toward storing an extra piece of state on the element. I'll try to make that change soon...

domenic added a commit to whatwg/dom that referenced this issue Jun 1, 2016
domenic added a commit to whatwg/dom that referenced this issue Jun 1, 2016
domenic added a commit that referenced this issue Jun 1, 2016
This uses the new "is value" concept introduced to DOM in
whatwg/dom#262, which more correctly implements
the intention that changing the is attribute after element creation does
not impact the processing model, and thus fixes #1298. This allows us to
then fix #1360: custom element callback reactions for customized
built-in elements were not correctly looking up their definition.
annevk pushed a commit to whatwg/dom that referenced this issue Jun 3, 2016
domenic added a commit that referenced this issue Jun 6, 2016
This uses the new "is value" concept introduced to DOM in
whatwg/dom#262, which more correctly implements
the intention that changing the is attribute after element creation does
not impact the processing model, and thus fixes #1298. This allows us to
then fix #1360: custom element callback reactions for customized
built-in elements were not correctly looking up their definition.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
topic: custom elements Relates to custom elements (as defined in DOM and HTML)
Development

Successfully merging a pull request may close this issue.

2 participants