-
Notifications
You must be signed in to change notification settings - Fork 2.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add IntersectionObserver target requirement to Event Loops Processing Model #8016
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
|
@@ -3965,9 +3965,13 @@ a.setAttribute('href', 'https://example.com/'); // change the content attribute | |||||
<ul class="brief"> | ||||||
<li><dfn data-x-href="https://w3c.github.io/IntersectionObserver/#run-the-update-intersection-observations-steps">run the update intersection observations steps</dfn></li> | ||||||
<li><dfn data-x-href="https://w3c.github.io/IntersectionObserver/#intersectionobserver"><code>IntersectionObserver</code></dfn></li> | ||||||
<li><dfn data-x-href="https://w3c.github.io/IntersectionObserver/#intersectionobserver-implicit-root-observer"><code>implicit root observer</code></dfn></li> | ||||||
<li><dfn data-x-href="https://w3c.github.io/IntersectionObserver/#intersectionobserverentry"><code>IntersectionObserverEntry</code></dfn></li> | ||||||
<li><dfn data-x-href="https://w3c.github.io/IntersectionObserver/#dictdef-intersectionobserverinit"><code>IntersectionObserverInit</code></dfn></li> | ||||||
<li><dfn data-x-href="https://w3c.github.io/IntersectionObserver/#dom-intersectionobserver-observe" data-x="dom-IntersectionObserver-observe"><code>observe</code></dfn></li> | ||||||
<li><dfn data-x-href="https://w3c.github.io/IntersectionObserver/#dom-intersectionobserver-unobserve" data-x="dom-IntersectionObserver-unobserve"><code>unobserve</code></dfn></li> | ||||||
<li><dfn data-x-href="https://w3c.github.io/IntersectionObserver/#dom-intersectionobserver-root" data-x="dom-IntersectionObserver-root"><code>root</code></dfn></li> | ||||||
<li><dfn data-x-href="https://w3c.github.io/IntersectionObserver/#dom-intersectionobserver-observationtargets-slot" data-x="dom-IntersectionObserver-observedtargets-slot"><code>slot</code></dfn></li> | ||||||
<li><dfn data-x-href="https://w3c.github.io/IntersectionObserver/#dom-intersectionobserverentry-isintersecting" data-x="dom-IntersectionObserverEntry-isIntersecting"><code>isIntersecting</code></dfn></li> | ||||||
<li><dfn data-x-href="https://w3c.github.io/IntersectionObserver/#dom-intersectionobserverentry-target" data-x="dom-IntersectionObserverEntry-target"><code>target</code></dfn></li> | ||||||
</ul> | ||||||
|
@@ -96586,12 +96590,30 @@ import "https://example.com/foo/../module2.mjs";</code></pre> | |||||
|
||||||
<li> | ||||||
<p><i>Unnecessary rendering</i>: Remove from <var>docs</var> all <code>Document</code> objects | ||||||
which meet both of the following conditions:</p> | ||||||
which meet all of the following conditions:</p> | ||||||
|
||||||
<ul class="brief"> | ||||||
<ul> | ||||||
<li>The user agent believes that updating the rendering of the <code>Document</code>'s <span | ||||||
data-x="concept-document-bc">browsing context</span> would have no visible effect, and</li> | ||||||
<li>The <code>Document</code>'s <span>map of animation frame callbacks</span> is empty.</li> | ||||||
<li> | ||||||
<p>The <code>Document</code> does not have <span>pending initial IntersectionObserver | ||||||
targets</span>.</p> | ||||||
|
||||||
<p>A <code>Document</code> is said to have <dfn>pending initial IntersectionObserver | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
targets</dfn> if there is at least one <span>IntersectionObserver</span> meeting these | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
criteria:</p> | ||||||
<ol class="brief"> | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
<li>The <span data-x="IntersectionObserver">observer</span>'s <span | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
data-x="dom-IntersectionObserver-root">root</span> is in the <code>Document</code> (for | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. "is in the Document" is not precise enough. For example, how does this interact with shadow DOM? I suspect you want to check if its [shadow-including root] is document. |
||||||
the <span>top-level browsing context</span>, this includes any <span | ||||||
data-x="implicit root observer">implicit root observers</span>).</li> | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I don't understand this parenthetical at all. Parentheticals usually restate what's previous to them, but from what I can tell this is just a totally different criterion. It's saying something like "in addition to the two bullet points here, a Document also has pending initial IntersectionObserver targets if its browsing context is a top-level browsing context and there exists any IntersectionObserver whose root is null." But even that doesn't make sense... What if there's an IntersectionObserver with null root in tab A, and tab B is a top-level browsing context whose Document we're considering? You need to scope this to the Document under consideration somehow. And I don't see how to do that, if the IntersectionObserver's root is null... then it has no connection to a Document, and it's just floating freely, disconnected from any document or browsing context. This might just be something very broken about the IntersectionObserver spec? |
||||||
<li> The <span data-x="IntersectionObserver">observer</span> has at least one | ||||||
<em>target</em> in its <span data-x="dom-IntersectionObserver-observedtargets-slot"> | ||||||
ObservationTargets slot</span> for which no <span>IntersectionObserverEntry</span> has | ||||||
yet been queued.</li> | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I don't understand what the latter part of this sentence means. So I have an observer, and I look at observer.[[ObservationTargets]]. That's a list... of what, the IntersectionObserver spec doesn't say. But how do I go from a target object target, to a boolean saying whether or not an IntersectionObserverEntry has been queued for that target? Do I need to loop over some global list of queued IntersectionObserverEntrys? Where is that list? |
||||||
</ol> | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
</li> | ||||||
</ul> | ||||||
</li> | ||||||
|
||||||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.