-
Notifications
You must be signed in to change notification settings - Fork 378
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] attachedCallback and detechedCallback should be removed #286
Comments
Hmm, I'm a little confused how this squares with https://lists.w3.org/Archives/Public/public-webapps/2015AprJun/0517.html where (by my reading) @bzbarsky and @coonsta point out that the primitive inside implementations today is in fact the same as attachedCallback and detachedCallback, and @annevk agrees that it's probably best to update the DOM/HTML to work in terms of those concepts. See especially
So I'm not entirely sure what the proposal is here. Maybe it is for something similar to I could see advocating for the addition of insertedInto/removedFrom, but we'd also need attachedCallback/detachedCallback to handle the HTML spec's many in a document occurrences. |
The methods in Custom Elements spec certainly aren't the same what Gecko has. |
This will be resolved in the issue #362. |
In addition #222,
attachedCallback
anddetachedCallback
should be removed.While it's a viable optimization to avoid work in a custom element while the element is not in the document, there is a lot of work that needs to happen regardless of where an element is inserted.
Since the author can easily check the existence of the browsing context by checking
document.defaultView
or detect whether the element hasdisplay: none
as the used value or not, there is no need to have a separate callback.The text was updated successfully, but these errors were encountered: