You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Oct 7, 2020. It is now read-only.
Creating elements by constructor incorrectly produces an is attribute and doesn't call attachedCallback in Firefox. (It works correctly in Safari, and I didn't test IE.)
var ctor = document.registerElement("my-element", {});
new ctor();
produces <my-element></my-element> in Safari, but <my element is="false"></my-element> in Firefox. After some digging, this is because the constructor returned by document.registerElement calls document.createElement("my-element", false) in Firefox, and that false argument is then stringified into the is attribute.
More seriously, the bad is attribute causes attachedCallback to never fire.
Tested in document-register-element 4.0 and Firefox 37-38. (I checked the tests, and there don't appear to be any unit tests covering constructors or attachedCallback.)
The text was updated successfully, but these errors were encountered:
rconnamacher
changed the title
Element constructor broken in Firefox: attachedCallback never fires due to bad is attribute
Element constructor broken in Firefox: attachedCallback never fires
May 22, 2015
rconnamacher
changed the title
Element constructor broken in Firefox: attachedCallback never fires
Element constructor produces incorrect is attribute and doesn't call attachedCallback in Firefox
May 22, 2015
Creating elements by constructor incorrectly produces an
is
attribute and doesn't callattachedCallback
in Firefox. (It works correctly in Safari, and I didn't test IE.)produces
<my-element></my-element>
in Safari, but<my element is="false"></my-element>
in Firefox. After some digging, this is because the constructor returned bydocument.registerElement
callsdocument.createElement("my-element", false)
in Firefox, and that false argument is then stringified into theis
attribute.More seriously, the bad
is
attribute causesattachedCallback
to never fire.Tested in document-register-element 4.0 and Firefox 37-38. (I checked the tests, and there don't appear to be any unit tests covering constructors or attachedCallback.)
The text was updated successfully, but these errors were encountered: