Open barneycarroll opened 2 years ago
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.
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. https://github.com/MithrilJS/mithril.js/blob/c6ffa188f2bf729fb761d857ea690ce4e3ac73af/render/render.js#L679
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 theis
attribute that determined this behaviour is not present on the rendered element. Having been specified in hyperscript, I would expect it to remain.