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

Custom elements: built-in element extensions lose their is attribute #2799

Open
barneycarroll opened this issue Sep 5, 2022 · 2 comments
Open
Assignees
Labels
Area: Core For anything dealing with Mithril core itself Type: Bug For bugs and any other unexpected breakage

Comments

@barneycarroll
Copy link
Member

As demonstrated here, a custom element that extends a built-in via the is attribute behaves strangely. The extension is recognised and the custom element is constructed as expected; but the is attribute that determined this behaviour is not present on the rendered element. Having been specified in hyperscript, I would expect it to remain.

@barneycarroll barneycarroll added the Type: Bug For bugs and any other unexpected breakage label Sep 5, 2022
@barneycarroll barneycarroll self-assigned this Sep 5, 2022
@pygy
Copy link
Member

pygy commented Sep 5, 2022

As long as we deal with [is], we have a render bug in the update phase. is should be considered part of the element identity along with the tag name when diffing.

@dead-claudia dead-claudia added the Area: Core For anything dealing with Mithril core itself label Sep 2, 2024
@github-project-automation github-project-automation bot moved this to Needs triage in Triage/bugs Sep 2, 2024
@dead-claudia dead-claudia moved this from Needs triage to Low priority in Triage/bugs Sep 2, 2024
@dead-claudia dead-claudia mentioned this issue Oct 13, 2024
8 tasks
@kfule
Copy link
Contributor

kfule commented Nov 8, 2024

When creating elements in Javascript, “is” may need to be given not only with createElement() but also explicitly with setAttribute().

flems (same issue without mithril)

As for mithril, it may be enough to just remove the "is" exclusion below and let setAttr() work like any other attribute.

if (key === "key" || key === "is" || value == null || isLifecycleMethod(key) || (old === value && !isFormAttribute(vnode, key)) && typeof value !== "object") return

kfule added a commit to kfule/mithril.js that referenced this issue Nov 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: Core For anything dealing with Mithril core itself Type: Bug For bugs and any other unexpected breakage
Projects
Status: Low priority
Development

No branches or pull requests

4 participants