[Webkit-unassigned] [Bug 183583] New: connectedCallback called when disconnected

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Mar 12 15:44:04 PDT 2018


https://bugs.webkit.org/show_bug.cgi?id=183583

            Bug ID: 183583
           Summary: connectedCallback called when disconnected
           Product: WebKit
           Version: Safari 11
          Hardware: Unspecified
                OS: Unspecified
            Status: NEW
          Severity: Normal
          Priority: P2
         Component: HTML DOM
          Assignee: webkit-unassigned at lists.webkit.org
          Reporter: jridgewell at google.com
                CC: cdumez at apple.com

Created attachment 335654

  --> https://bugs.webkit.org/attachment.cgi?id=335654&action=review

test.html

Safari Version: 11.0.3 (13604.5.6)
Safari Tech Preview: Release 50 (Safari 11.2, WebKit 13606.1.5)
OS: Mac OS X 10.13.3

What steps will reproduce the problem?
(1) Go to https://output.jsbin.com/qumape/3/quiet
(2) Custom element 1 (Reparenter) defines a `connectedCallback` that will reparent all children nodes into a new div element (which it then appends to itself).
(3) Custom element 2 (Child) has any connectedCallback.
(4) Create a second Document tree, with the innerHTML `<x-parenter><x-child></x-child></x-parenter>`
(5) Import the second Document's body (deep: true), and append the result to the host body.

What is the expected result?
Child's connectedCallback should not fire when it is appended to the disconnected div. It should fire when the div is appended to the Reparenter (and the Reparenter is in the host DOM tree).


What happens instead?
Child's connectedCallback fires when it is appended to the disconneted div (making it disconnected from DOM tree).

(This is displayed by adding the h1 element to the DOM)

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20180312/a0813949/attachment.html>


More information about the webkit-unassigned mailing list