WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
183931
connectedCallback is invoked by the HTML parser after child nodes had been inserted
https://bugs.webkit.org/show_bug.cgi?id=183931
Summary
connectedCallback is invoked by the HTML parser after child nodes had been in...
Andrea Giammarchi
Reported
2018-03-23 04:05:08 PDT
Accordingly with this Chromium bug:
https://bugs.chromium.org/p/chromium/issues/detail?id=821831
It looks like Webkit/Safari have a bug related to Custom Elements and their connectedCallback invoke, always triggered *after* DOMContentLoaded, even if the definition of the element is known, and the page is also already served. Accordingly, using this test page as reference:
https://webreflection.github.io/eyeo/tests/ce.html
The correct result should most likely the following one: ``` constructor: 0 attributeChangedCallback: 0 a b c connectedCallback: 3 ready: 3 ``` In Webkit/Safari the result is instead this one: ``` constructor: 0 a b c ready: 3 attributeChangedCallback: 3 connectedCallback: 3 ```
Attachments
Fixes the bug
(3.92 KB, patch)
2018-08-14 21:42 PDT
,
Ryosuke Niwa
achristensen
: review+
Details
Formatted Diff
Diff
View All
Add attachment
proposed patch, testcase, etc.
Radar WebKit Bug Importer
Comment 1
2018-03-25 10:51:20 PDT
<
rdar://problem/38843548
>
Kent Tamura
Comment 2
2018-04-02 01:55:24 PDT
We're adding test cases for this issue to WPT.
https://github.com/w3c/web-platform-tests/pull/10251
Ryosuke Niwa
Comment 3
2018-08-14 16:33:19 PDT
We pass almost all test cases once the patch for the
bug 188189
is landed but there's one test case in custom-elements/parser/parser-sets-attributes-and-children.html we fail: HTML parser should call connectedCallback before appending child nodes
Ryosuke Niwa
Comment 4
2018-08-14 21:42:55 PDT
Created
attachment 347149
[details]
Fixes the bug
Alex Christensen
Comment 5
2018-08-15 09:01:13 PDT
Comment on
attachment 347149
[details]
Fixes the bug View in context:
https://bugs.webkit.org/attachment.cgi?id=347149&action=review
> Source/WebCore/ChangeLog:19 > + (WebCore::HTMLConstructionSite::insertCustomElement): Fixed the bug by manually executign the scheduled tasks.
executing
Ryosuke Niwa
Comment 6
2018-08-15 11:59:21 PDT
Committed
r234893
: <
https://trac.webkit.org/changeset/234893
>
Frédéric Wang (:fredw)
Comment 7
2018-08-22 03:02:58 PDT
Comment on
attachment 347149
[details]
Fixes the bug View in context:
https://bugs.webkit.org/attachment.cgi?id=347149&action=review
> Source/WebCore/ChangeLog:9 > + Invoke the custom element reactions after constructing and inserting a custom element as specifed in step 3.3 of:
nit: specified
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug