diff --git a/index.bs b/index.bs index 747e900..b16a083 100644 --- a/index.bs +++ b/index.bs @@ -712,15 +712,20 @@ run these steps: Queue an IntersectionObserverEntry To queue an IntersectionObserverEntry for an {{IntersectionObserver}} |observer|, given a -{{document}} |document|; {{DOMHighResTimeStamp}} |time|; -{{DOMRect}}s |rootBounds|, |boundingClientRect|, |intersectionRect|, and |isIntersecting| flag; -and an {{Element}} |target|; -run these steps: - -1. Construct an {{IntersectionObserverEntry}}, passing in |time|, |rootBounds|, - |boundingClientRect|, |intersectionRect|, |isIntersecting|, and |target|. -2. Append it to |observer|'s internal {{[[QueuedEntries]]}} slot. -3. Queue an intersection observer task for |document|. +{{document}} |document|, {{DOMHighResTimeStamp}} |time|, {{DOMRect}}s |rootBounds|, +|boundingClientRect| and |intersectionRect|, booleans |isIntersecting| and |isVisible|, +a double |intersectionRatio|, and an {{Element}} |target|, run these steps: + +1. Let |entryRootBounds| be |rootBounds| if |target| is a same-origin-domain target, + and null otherwise. +2. Construct an {{IntersectionObserverEntry}} using an {{IntersectionObserverEntryInit}} + dictionary with members time, rootBounds, + boundingClientRect, intersectionRect, isIntersecting, + isVisible, intersectionRatio, and target set to + |time|, |entryRootBounds|, |boundingClientRect|, |intersectionRect|, |isIntersecting|, + |isVisible|, |intersectionRatio|, and |target| respectively. +3. Append it to |observer|'s internal {{[[QueuedEntries]]}} slot. +4. Queue an intersection observer task for |document|.

Compute the Intersection of a Target Element and the Root

@@ -752,7 +757,7 @@ run these steps:

Compute whether a Target is unoccluded, untransformed, unfiltered, and opaque.

-To compute the visibility of a target, run these steps: +To compute the visibility of a target |target| for an {{IntersectionObserver}} |observer|, run these steps: 1. If the |observer|'s {{IntersectionObserver/trackVisibility}} attribute is false, return false. 2. If the target has an effective transformation matrix other than a 2D translation or proportional 2D upscaling, return false. 3. If the target, or any element in its containing block chain, has an effective opacity other than 100%, return false. @@ -815,7 +820,7 @@ To run the update intersection observations steps for a 12. If |targetArea| is non-zero, let |intersectionRatio| be |intersectionArea| divided by |targetArea|.
Otherwise, let |intersectionRatio| be 1 if |isIntersecting| is true, or 0 if |isIntersecting| is false. 13. Set |thresholdIndex| to the index of the first entry in |observer|.{{thresholds}} whose value is greater than |intersectionRatio|, or the length of |observer|.{{thresholds}} if |intersectionRatio| is greater than or equal to the last entry in |observer|.{{thresholds}}. - 14. Let |isVisible| be the result of running the visibility algorithm on |target|. + 14. Let |isVisible| be the result of running the visibility algorithm on |target| for |observer|. 15. Let |previousThresholdIndex| be the |registration|'s {{IntersectionObserverRegistration/previousThresholdIndex}} property. 16. Let |previousIsIntersecting| be the |registration|'s @@ -826,9 +831,9 @@ To run the update intersection observations steps for a or if |isIntersecting| does not equal |previousIsIntersecting|, or if |isVisible| does not equal |previousIsVisible|, queue an IntersectionObserverEntry, - passing in |observer|, |time|, |rootBounds|, + passing in |observer|, |document|, |time|, |rootBounds|, |targetRect|, |intersectionRect|, |isIntersecting|, - |isVisible|, and |target|. + |isVisible|, |intersectionRatio|, and |target|. 19. Assign |thresholdIndex| to |registration|'s {{IntersectionObserverRegistration/previousThresholdIndex}} property. 20. Assign |isIntersecting| to |registration|'s