From c0a7bb5aba676466943a3d645e42a12f10e04b99 Mon Sep 17 00:00:00 2001
From: Simon Pieters If img's lazy loading attribute is in the Lazy state, img does not intersect the
- viewport, and img is not about to intersect the viewport, then
- return true. This allows for fetching the image during scrolling, when it does not, but is
- about to intersect the viewport.
Return false.
Each img
element have a boolean flag ready to be lazy loaded, initially
+ false.
For img
elements that will
+ lazy load, this flag can be set to true in the update the rendering steps,
+ which causes the image to load by continuing the update the image data steps.
Each Document
has a list of list of lazy loading images that
+ need intersection observation, initially empty.
This list is added to in the update the image data steps, and checked + in the run the lazy load intersection steps, which is called from the update + the rendering steps.
+ +The run the lazy load intersection steps steps for a Document
are as
+ follows:
For each img in the Document
's
+ list of lazy loading images that need intersection observation:
If img intersects the + viewport, or img is about to intersect the viewport, then set + img's ready to be lazy loaded flag to true.
+ +This allows for fetching the image during scrolling, when it does not, but is + about to intersect the viewport.
+Otherwise, observe img for intersection.
Empty the list of lazy loading images + that need intersection observation.
When the user agent is to update the image data of an img
element,
optionally with the restart animations flag set,
it must run the following steps:
Add the img
element to its node document's list of
+ lazy loading images that need intersection observation, if it isn't already
+ present.
Continue running this algorithm in parallel.
Wait until the will lazy load image steps no longer return true, given the +
Wait until the img
's ready to be lazy loaded flag is
+ true, or until the will lazy load image steps no longer return true, given the
img
.
Remove the img
element from its node document's list of
+ lazy loading images that need intersection observation, if it is present.
Queue an element task on the DOM manipulation task source
given the img
element to continue running the rest of this algorithm.
Document
, passing in now
as the timestamp.
+ For each fully active Document
in docs, run
+ the lazy load intersection steps for that Document
, passing in
+ now as the timestamp.
For each fully active Document
in docs, run
the update intersection observations steps for that Document
, passing in
now as the timestamp.
IntersectionObserver
IntersectionObserverInit
observe
unobserve
The will lazy load image steps, given an img
element img,
+ are as follows:
If scripting is disabled for img, return + false.
+ +This is an anti-tracking measure, because if a user agent supported lazy loading + when scripting is disabled, it would still be possible for a site to track a user's approximate + scroll position throughout a session, by strategically placing images in a page's markup such + that a server can track how many images are requested and when.
+If img's lazy loading attribute is in the Lazy state, then return true.
+Return false.
This algorithm cannot be called from steps running in parallel. If + a user agent needs to call this algorithm from steps running in parallel, it needs to + queue a task to do so.
+ +Each img
element have a boolean flag ready to be lazy loaded, initially
+ false.
For img
elements that will
+ lazy load, this flag can be set to true in the lazy load intersection
+ observer's callback, which causes the image to load by continuing the update the
+ image data steps.
Each Document
has a lazy load intersection observer, initially set to
+ null but can be set to an IntersectionObserver
instance.
To start intersection-observing a lazy loading element element, run these + steps:
+ +Let doc be element's node document.
If doc's lazy load intersection observer is null, set it to a new
+ IntersectionObserver
instance, initialized as follows:
The callback is these steps, with arguments entries and observer:
+ +For each entry in entries: + +
Set entry's ready to be lazy loaded flag to true.
Call observer's unobserve
method with entry
+ as the argument.
The options is an IntersectionObserverInit
dictionary with the
+ following dictionary members:
Set to doc.
UA-defined. See whatwg/html issue #5408.
+ +This allows for fetching the image during scrolling, when it does not, but + is about to intersect the viewport.
+Call doc's lazy load intersection observer's observe
method with element as the
+ argument.
To stop intersection-observing a lazy loading element element, run these + steps:
+ +Let doc be element's node document.
Assert: doc's lazy load intersection observer is not + null.
Call doc's lazy load intersection observer unobserve
method with element as
+ the argument.
The will lazy load image steps, given an img
element img,
- are as follows:
If scripting is disabled for img, return - false.
- -This is an anti-tracking measure, because if a user agent supported lazy loading - when scripting is disabled, it would still be possible for a site to track a user's approximate - scroll position throughout a session, by strategically placing images in a page's markup such - that a server can track how many images are requested and when.
-If img's lazy loading attribute is in the Lazy state, then return true.
-Return false.
This algorithm cannot be called from steps running in parallel. If - a user agent needs to call this algorithm from steps running in parallel, it needs to - queue a task to do so.
- -Each img
element have a boolean flag ready to be lazy loaded, initially
- false.
For img
elements that will
- lazy load, this flag can be set to true in the update the rendering steps,
- which causes the image to load by continuing the update the image data steps.
Each Document
has a list of list of lazy loading images that
- need intersection observation, initially empty.
This list is added to in the update the image data steps, and checked - in the run the lazy load intersection steps, which is called from the update - the rendering steps.
- -The run the lazy load intersection steps steps for a Document
are as
- follows:
For each img in the Document
's
- list of lazy loading images that need intersection observation:
If img intersects the - viewport, or img is about to intersect the viewport, then set - img's ready to be lazy loaded flag to true.
- -This allows for fetching the image during scrolling, when it does not, but is - about to intersect the viewport.
-Otherwise, observe img for intersection.
Empty the list of lazy loading images - that need intersection observation.
When the user agent is to update the image data of an img
element,
optionally with the restart animations flag set,
it must run the following steps:
Add the img
element to its node document's list of
- lazy loading images that need intersection observation, if it isn't already
- present.
Start intersection-observing a lazy loading element for the
+ img
element.
Continue running this algorithm in parallel.
img
.
- Remove the img
element from its node document's list of
- lazy loading images that need intersection observation, if it is present.
Stop intersection-observing a lazy loading element for the img
+ element.
Queue an element task on the DOM manipulation task source
given the img
element to continue running the rest of this algorithm.
Document
, passing in now
as the timestamp.
- For each fully active Document
in docs, run
- the lazy load intersection steps for that Document
, passing in
- now as the timestamp.
For each fully active Document
in docs, run
the update intersection observations steps for that Document
, passing in
now as the timestamp.
Each img
element have a boolean flag ready to be lazy loaded, initially
+
Each img
element has a boolean flag ready to be lazy loaded, initially
false.
For Return false.img
elements that will
From 1bf73107f4f640783be3a8f386e29aa8d35b0bf5 Mon Sep 17 00:00:00 2001
From: Simon Pieters
This algorithm cannot be called from steps running in parallel. If - a user agent needs to call this algorithm from steps running in parallel, it needs to - queue a task to do so.
-Each img
element has a boolean flag ready to be lazy loaded, initially
false.
This algorithm cannot be called from steps running in parallel. If + a user agent needs to call this algorithm from steps running in parallel, it needs to + queue a task to do so.
+When the user agent is to update the image data of an img
element,
optionally with the restart animations flag set,
it must run the following steps:
IntersectionObserverInit
observe
unobserve
isIntersecting
target
For each entry in entries:
Set entry's ready to be lazy loaded flag to true.
Call observer's unobserve
method with entry
- as the argument.
If entry.isIntersecting
is true, set
+ entry.target
's
+ ready to be lazy loaded flag to true.
Set to doc.
UA-defined. See This allows for fetching the image during scrolling, when it does not, but is about to intersect the viewport.
If img's lazy loading attribute is in the Lazy state, then return true.
-If img's lazy loading attribute is in the Lazy state, then return true.
Return false.
Each img
element has a boolean flag ready to be lazy loaded, initially
- false.
Each img
element has an associated ready to be lazy loaded boolean,
+ initially false.
For If doc's lazy load intersection observer is null, set it to a new
The intention here is to use the original value of the
+ The callback is these steps, with arguments entries and observer: If doc's lazy load intersection observer is null, set it to a new
The intention here is to use the original value of the
+ The intention is to use the original value of the
The callback is these steps, with arguments entries and observer: The callback is these steps, with arguments entries and
+ observer: For each entry in entries:
+ For each entry in entries (using a method of iteration which does
+ not trigger developer-modifiable array accessors or iteration hooks):
If entry. If entry. The intention is to use the original value of the
+ Call doc's lazy load intersection observer's Call doc's lazy load intersection observer's The intention is to use the original value of the To stop intersection-observing a lazy loading element element, run these
@@ -7012,9 +7029,16 @@ a.setAttribute('href', 'https://example.com/'); // change the content attribute
Assert: doc's lazy load intersection observer is not
null. Call doc's lazy load intersection observer Call doc's lazy load intersection observer The intention is to use the original value of the img
elements that will
lazy load, this flag can be set to true in the lazy load intersection
@@ -6957,6 +6955,13 @@ a.setAttribute('href', 'https://example.com/'); // change the content attribute
IntersectionObserver
instance, initialized as follows:IntersectionObserver
constructor, however we're forced to use the
+ JavaScript-exposed constructor in this specification, until IntersectionObserver exposes
+ low-level hooks for use in specifications. See bug w3c/IntersectionObserver#427
+ which tracks this.
- IntersectionObserver
IntersectionObserverInit
observe
observe
unobserve
isIntersecting
target
IntersectionObserver
instance, initialized as follows:IntersectionObserver
constructor, however we're forced to use the
JavaScript-exposed constructor in this specification, until IntersectionObserver exposes
low-level hooks for use in specifications. See bug
@@ -6998,9 +7008,16 @@ a.setAttribute('href', 'https://example.com/'); // change the content attribute
-
isIntersecting
is true, set
- entry.target
's
- ready to be lazy loaded flag to true.isIntersecting
is true, set
+ entry.target
's
+ ready to be lazy loaded boolean to true.isIntersecting
and
+ target
getters. See w3c/IntersectionObserver#427.
+ observe
method with element as the
- argument.observe
method with element as the
+ argument.observe
method. See w3c/IntersectionObserver#427.
+ unobserve
method with element as
- the argument.unobserve
method with element as
+ the argument.unobserve
method. See w3c/IntersectionObserver#427.
+
instead of subsection
---
source | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/source b/source
index 48c098316c1..e0652fb60a2 100644
--- a/source
+++ b/source
@@ -6912,7 +6912,7 @@ a.setAttribute('href', 'https://example.com/'); // change the content attribute
data-x="invalid value default">invalid value default are both the Eager state.
The will lazy load image steps, given an img
element img,
are as follows:
The will lazy load image steps, given an img
element img,
+
The will lazy load element steps, given an element element, are as follows:
If scripting is disabled for img, return - false.
+If scripting is disabled for element, + then return false.
This is an anti-tracking measure, because if a user agent supported lazy loading when scripting is disabled, it would still be possible for a site to track a user's approximate @@ -6928,7 +6928,7 @@ a.setAttribute('href', 'https://example.com/'); // change the content attribute that a server can track how many images are requested and when.
If img's lazy loading attribute is in the If element's lazy loading attribute is in the Lazy state, then return true.
Return false.
Each img
element has an associated ready to be lazy loaded boolean,
initially false.
For For If the will lazy load image steps given the If the will lazy load element steps given the Continue running this algorithm in parallel. Wait until the Stop intersection-observing a lazy loading element for the Each For For For The intention is to use the original value of the
- For each entry in entries (using a method of iteration which does
- not trigger developer-modifiable array accessors or iteration hooks):
+ For each entry in entries using a method of
+ iteration which does not trigger developer-modifiable array accessors or
+ iteration hooks:
The options is an img
elements that will
+ img
elements that will
lazy load, this flag can be set to true in the lazy load intersection
observer's callback, which causes the image to load by continuing the update the
image data steps.img
return true,
+ img
return true,
then:
@@ -27806,7 +27806,7 @@ was an English <a href="/wiki/Music_hall">music hall</a> singer, ...
img
's ready to be lazy loaded flag is
- true, or until the will lazy load image steps no longer return true, given the
+ true, or until the will lazy load element steps no longer return true, given the
img
.img
From dfdcec61212320666bfd40524db32cec113c00f1 Mon Sep 17 00:00:00 2001
From: Simon Pieters img
element has an associated ready to be lazy loaded boolean,
initially false.img
elements that will
- lazy load, this flag can be set to true in the lazy load intersection
+ img
elements that will lazy load, this flag can be set to true in the lazy load intersection
observer's callback, which causes the image to load by continuing the update the
image data steps.img
elements that will lazy load, this flag can be set to true in the lazy load intersection
+ steps">will lazy load, this can be set to true in the lazy load intersection
observer's callback, which causes the image to load by continuing the update the
image data steps.IntersectionObserver
instance, initialized as follows:IntersectionObserver
constructor, however we're forced to use the
- JavaScript-exposed constructor in this specification, until IntersectionObserver exposes
- low-level hooks for use in specifications. See bug IntersectionObserver constructor. However, we're forced to use the
+ JavaScript-exposed constructor in this specification, until Intersection Observer
+ exposes low-level hooks for use in specifications. See bug w3c/IntersectionObserver#427
which tracks this. with ordered map
syntax
---
source | 21 +++++++++------------
1 file changed, 9 insertions(+), 12 deletions(-)
diff --git a/source b/source
index 8bea82c9d7a..da9dc233eed 100644
--- a/source
+++ b/source
@@ -6969,8 +6969,9 @@ a.setAttribute('href', 'https://example.com/'); // change the content attribute
IntersectionObserverInit
dictionary with the
- following dictionary members:rootMargin
" → an
+ implementation-defined value ]»
UA-defined. See whatwg/html issue #5408.
+ -This allows for fetching the image during scrolling, when it does not, but - is about to intersect the viewport.
-This allows for fetching the image during scrolling, when it does not, but + is about to intersect the viewport.
From 581c24025aa85a25ccbbd7c40d7739a764ff0cde Mon Sep 17 00:00:00 2001 From: Simon PietersThis allows for fetching the image during scrolling, when it does not, but is about to intersect the viewport.
From 8a764c799d35e6a6a212c12e82f3c47d98d9af62 Mon Sep 17 00:00:00 2001 From: Simon PietersSee issue #5408.
-This allows for fetching the image during scrolling, when it does not, but - is about to intersect the viewport.
+This allows for fetching the image during scrolling, when it does not yet — + but is about to — intersect the viewport.