Warning in devtools when observing a node in a shadow root using IntersectionObserver |
||||
Issue descriptionVersion 54.0.2830.0 canary (64-bit) OS: OSX 10.11.6 (15G31) What steps will reproduce the problem? (1) Observe a node in a shadow root while root = null. Repro: http://jsbin.com/qaqumo/edit?html,output Code: <div id="test"></div> <script> let shadowRoot = document.querySelector('#test').createShadowRoot(); let div = document.createElement('div'); div.style.cssText = 'background-color: green;'; div.innerHTML = 'div'; shadowRoot.appendChild(div); let observer = new IntersectionObserver(changes => { for (change of changes) { console.log(change); } }); observer.observe(div); </script> What is the expected output? It shouldn't show a warning in devtools. What do you see instead? In Canary and Beta: IntersectionObserver.observe(target): target element is not a descendant of root. I do get the change record, but I thought it wasn't working because of the warning.
,
Aug 17 2016
,
Aug 30 2016
,
Sep 1 2016
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/257e833d93e4f9c7ed1cad01bcae892e6db79cde commit 257e833d93e4f9c7ed1cad01bcae892e6db79cde Author: szager <szager@chromium.org> Date: Thu Sep 01 01:42:11 2016 [IntersectionObserver] Enable observations across shadow DOM roots. BUG= 638434 R=ojan@chromium.org,eae@chromium.org Review-Url: https://codereview.chromium.org/2298933003 Cr-Commit-Position: refs/heads/master@{#415839} [add] https://crrev.com/257e833d93e4f9c7ed1cad01bcae892e6db79cde/third_party/WebKit/LayoutTests/intersection-observer/shadow-content-expected.txt [add] https://crrev.com/257e833d93e4f9c7ed1cad01bcae892e6db79cde/third_party/WebKit/LayoutTests/intersection-observer/shadow-content.html [modify] https://crrev.com/257e833d93e4f9c7ed1cad01bcae892e6db79cde/third_party/WebKit/Source/core/dom/IntersectionObserver.cpp
,
Sep 7 2016
|
||||
►
Sign in to add a comment |
||||
Comment 1 by egarciad@chromium.org
, Aug 17 2016