IntersectionObserver: console warning for non-descendant targets?
Reported by
l446240525@gmail.com,
Jun 4 2016
|
||||||
Issue description
<body>
<div id=root></div>
<div id=target></div>
</body>
<script>
new IntersectionObserver(callback, {root: root}).observe(target) // a warning in the Console
</script>
,
Jun 6 2016
@rnimmagadda see https://bugs.chromium.org/p/chromium/issues/detail?id=540528#c52 Dev team will look into this issue.
,
Jun 6 2016
@l446240525: Do you want me to merge this issue into - 540528 ?
,
Jun 6 2016
@rnimmagadda: No, please label this issue as a feature request.
,
Jun 6 2016
Thank you for providing more feedback. Adding requester "rnimmagadda@chromium.org" for another review and adding "Needs-Review" label for tracking. For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
,
Jun 7 2016
Could someone from DevTools team please look into this feature request. Thank you.
,
Jun 8 2016
mpb@, if you are implementing Interaction Observers, would adding a warning be something under your attention?
,
Jun 8 2016
+szager, who did the current IO implementation.
,
Jun 8 2016
I have a patch in-flight to add the warning: https://codereview.chromium.org/2048853002/
,
Jun 9 2016
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/33e0e1347fd2172236dc961805e956fecc159b80 commit 33e0e1347fd2172236dc961805e956fecc159b80 Author: szager <szager@chromium.org> Date: Thu Jun 09 05:46:29 2016 IntersectionObserver: Warn when target is not a descendant of root. BUG= 617393 R=eae@chromium.org Review-Url: https://codereview.chromium.org/2048853002 Cr-Commit-Position: refs/heads/master@{#398794} [add] https://crrev.com/33e0e1347fd2172236dc961805e956fecc159b80/third_party/WebKit/LayoutTests/intersection-observer/containing-block-warning-expected.txt [add] https://crrev.com/33e0e1347fd2172236dc961805e956fecc159b80/third_party/WebKit/LayoutTests/intersection-observer/containing-block-warning.html [modify] https://crrev.com/33e0e1347fd2172236dc961805e956fecc159b80/third_party/WebKit/Source/core/dom/IntersectionObserver.cpp
,
Jun 9 2016
Nice job, szager@!
,
Feb 24 2017
Hello, I did not set the root elem, but the chrome still give this warning: target element is not a descendant of root, is this wrong? I did not understand. |
||||||
►
Sign in to add a comment |
||||||
Comment 1 by rnimmagadda@chromium.org
, Jun 6 2016Labels: Needs-Feedback