New issue
Advanced search Search tips

Issue 638434 link

Starred by 2 users

Issue metadata

Status: Fixed
Owner:
Closed: Sep 2016
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: All
Pri: 1
Type: Bug



Sign in to add a comment

Warning in devtools when observing a node in a shadow root using IntersectionObserver

Project Member Reported by egarciad@chromium.org, Aug 17 2016

Issue description

Version 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.

 
Description: Show this description

Comment 2 by szager@chromium.org, Aug 17 2016

Labels: -Pri-3 Pri-1
Owner: szager@chromium.org
Components: Platform>DevTools Blink>Layout
Status: Fixed (was: Untriaged)

Sign in to add a comment