Closed
Bug 1231265
Opened 9 years ago
Closed 7 years ago
support custom-element lifecycle callbacks with content from external document
Categories
(Core :: DOM: Core & HTML, defect)
Tracking
()
RESOLVED
INVALID
People
(Reporter: shogun70, Assigned: edgar)
References
Details
(Whiteboard: btpp-backlog)
Attachments
(1 file)
9.21 KB,
text/html
|
Details |
User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.6; rv:42.0) Gecko/20100101 Firefox/42.0 Build ID: 20151029151421 Steps to reproduce: With webcomponents enabled in Firefox, navigate to http://playground.meekostuff.net/test/custom-elements/customelement-externalcontent.html This will run a test which: 1. Installs a custom-element registration which logs lifecycle callbacks document.registerElement('custom-element', ...) 2. Creates an inert HTMLDocument var doc = document.implementation.createHTMLDocument('') 3. Adds some content including a custom-element doc.body.innerHTML = '<div><custom-element /></div>' 4. Inserts the content into the current document document.body.appendChild(content) Actual results: The createCallback() is called immediately after the content is created **in the inert external document**, even though that document has no custom-element registrations. The attachedCallback() is called immediately after the content is inserted into the current document. As it should. Expected results: The createdCallback() should be called when the custom-element node becomes part of the current document. That is, it should be called after the node is inserted into the current document and before the attachedCallback() is called.
Reporter | ||
Comment 1•9 years ago
|
||
The URL mentioned above can be used to demonstrate other (presumably related) bugs. A. Navigate to http://playground.meekostuff.net/test/custom-elements/customelement-externalcontent.html?creation=DOMParser&adoption=none This creates the same content but using (new DOMParser).parserFromString() to create the external document. In this case neither createdCallback() or attachedCallback() are ever called. They should both be called when the node is inserted into the current document. B. Navigate to http://playground.meekostuff.net/test/custom-elements/customelement-externalcontent.html?creation=DOMParser&adoption=adopt This is the same as (A) but uses document.adoptNode() to explicitly bring the external content into the current document. Again, neither createdCallback() or attachedCallback() are ever called. C. Navigate to http://playground.meekostuff.net/test/custom-elements/customelement-externalcontent.html?creation=XHR&adoption=adopt This is the same as (B) but uses XHR to obtain an external document which contains a custom-element. Again, neither createdCallback() or attachedCallback() are ever called.
Comment 2•9 years ago
|
||
Hi, I have tested this on Mac OS X 10.6 with FF Nightly 45.0a1 and when I go to the link that you suggested, I receive a message:"Aborting: This browser doesn't support CustomElements." it's an expected situation to receive this message? Please download the Firefox Nightly from here: https://nightly.mozilla.org/ and retest the problem.
Flags: needinfo?(shogun70)
OS: Unspecified → Mac OS X
Hardware: Unspecified → x86
Reporter | ||
Comment 3•9 years ago
|
||
Hi Ovidiu Boca, That is the message you will get if `document.registerElement` isn't defined. Did you enable web-components? Sean
Flags: needinfo?(shogun70)
Comment 4•9 years ago
|
||
User Agent Mozilla/5.0 (Macintosh; Intel Mac OS X 10.10; rv:46.0) Gecko/20100101 Firefox/46.0 Build ID 20151217072309 Hi Sean, I enable dom.webcomponents and I tested this on Mac 10.6 and 10.10 with FF Nightly 46.0a1 and I receive the same thing like you from the attachment: customelement-externalcontent.html Phil can you please take a look at this bug? I saw that you are working with this type of problems. Can you help me to choose the right component for this bug? Thank you very much.
Flags: needinfo?(philringnalda)
Comment 5•9 years ago
|
||
I finally figured out what connection I have to custom elements - I filed a bug about the fact that an automated custom element test fails sometimes. That is the only thing I know about them.
Flags: needinfo?(philringnalda)
Comment 6•8 years ago
|
||
Hi William can you please take a look at this bug? Thank you
Component: Untriaged → DOM
Flags: needinfo?(wchen)
Product: Firefox → Core
Comment 7•8 years ago
|
||
Jocelyn may be interested in this as she's working on Custom Elements.
Flags: needinfo?(wchen) → needinfo?(joliu)
Comment 8•8 years ago
|
||
The bug was filed based on our existing experimental implementation which is different from the latest spec we are going to support. We don't think we will spend time on fixing the existing behavior, but we will make sure lifecycle callbacks work well with the new stuff. I will set the dependency to the meta bug for the new implementation.
Blocks: custom-elements-initial-release
Flags: needinfo?(joliu)
Updated•8 years ago
|
Summary: Bugs in custom-element lifecycle callbacks with content from external document → support custom-element lifecycle callbacks with content from external document
Updated•8 years ago
|
Whiteboard: btpp-backlog
Assignee | ||
Comment 9•7 years ago
|
||
Created callback is removed from the latest custom elements spec, and we plan to remove the implementation for created callback in bug 1396620.
Assignee | ||
Comment 10•7 years ago
|
||
Mark as INVALID per comment #9.
Assignee: nobody → echen
Status: UNCONFIRMED → RESOLVED
Closed: 7 years ago
Resolution: --- → INVALID
Updated•5 years ago
|
Component: DOM → DOM: Core & HTML
You need to log in
before you can comment on or make changes to this bug.
Description
•