Closed
Bug 1121994
Opened 10 years ago
Closed 7 years ago
Implement adopted callback for custom elements
Categories
(Core :: DOM: Core & HTML, defect, P3)
Core
DOM: Core & HTML
Tracking
()
RESOLVED
FIXED
mozilla58
Tracking | Status | |
---|---|---|
firefox58 | --- | fixed |
People
(Reporter: gkrizsanits, Assigned: jdai)
References
Details
(Whiteboard: dom-ce-m3)
Attachments
(1 file, 1 obsolete file)
35.40 KB,
patch
|
jdai
:
review+
|
Details | Diff | Splinter Review |
The spec does not mention this callback yet, but there were numerous talks where everybody agreed that we need this callback.
Reporter | ||
Comment 1•10 years ago
|
||
Do you think this callback could end up in the spec soonish? Is there any disagreement about it? Do we know exactly when it should be called? (I'm just trying to decide when would it make sense to start working on this)
Assignee: nobody → gkrizsanits
Flags: needinfo?(annevk)
Comment 2•10 years ago
|
||
I think there's still disagreement about whether callbacks should have symbols as names or not. If not, I would expect "adoptedCallback" that is passed the old and new document.
Flags: needinfo?(annevk)
Comment 3•9 years ago
|
||
Mark this bug as a duplicate of bug 1293921 since we plan to implement all lifecycle callback in bug 1293921.
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → DUPLICATE
Comment 4•8 years ago
|
||
On a second thought, we decide splitting bug 1293921 into smaller pieces, so re-open this bug for implementing adoptedCallback.
Blocks: custom-elements-initial-release, 1293921
Status: RESOLVED → REOPENED
Resolution: DUPLICATE → ---
Updated•8 years ago
|
Priority: -- → P3
Whiteboard: dom-ce-m3
Assignee | ||
Updated•7 years ago
|
Assignee: gkrizsanits → jdai
Assignee | ||
Comment 5•7 years ago
|
||
Follow the spec[1] implements adopted callback for custom elements. I only tested on my local, hence, could you give me some feedback about this patch? Thank you.
[1] https://dom.spec.whatwg.org/#concept-node-adopt
Flags: needinfo?(bugs)
Comment 6•7 years ago
|
||
Comment on attachment 8905947 [details] [diff] [review]
patch, v1
>+++ b/dom/base/CustomElementRegistry.h
>@@ -35,41 +35,55 @@ class Promise;
> struct LifecycleCallbackArgs
> {
> nsString name;
> nsString oldValue;
> nsString newValue;
> nsString namespaceURI;
> };
>
>+struct LifecycleAdoptedCallbackArgs
>+{
>+ nsIDocument* oldDocument;
>+ nsIDocument* newDocument;
>+};
I think these both should be nsCOMPtr<nsIDocument>. And normal coding style would be to
call them mOldDocument and mNewDocument, but I see the previous struct doesn't use that either, so naming is up to you.
Flags: needinfo?(bugs)
Attachment #8905947 -
Flags: review+
Assignee | ||
Comment 7•7 years ago
|
||
Rebase and carry r+.
Try: https://treeherder.mozilla.org/#/jobs?repo=try&revision=efa3e65f823ca2adce00b974fa25b6d8889aa34c&filter-tier=1&group_state=expanded
Attachment #8905947 -
Attachment is obsolete: true
Attachment #8914212 -
Flags: review+
Assignee | ||
Updated•7 years ago
|
Keywords: checkin-needed
Pushed by ryanvm@gmail.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/0ad5ea4a3f1c
Implement adopted callback for custom elements. r=smaug
Keywords: checkin-needed
Comment 9•7 years ago
|
||
bugherder |
Status: REOPENED → RESOLVED
Closed: 9 years ago → 7 years ago
status-firefox58:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla58
Updated•6 years ago
|
Component: DOM → DOM: Core & HTML
You need to log in
before you can comment on or make changes to this bug.
Description
•