@@ -7330,14 +7330,14 @@ a.setAttribute('href', 'https://example.com/'); // change the content attribute
7330
7330
<li><p>Return false.</p></li>
7331
7331
</ol>
7332
7332
7333
- <p>Each <code>img</code> and <code>iframe </code> element has associated <dfn>lazy load resumption
7334
- steps</dfn>, initially null.</p>
7333
+ <p>Each <code>img</code>, <code>iframe</code> and <code>video </code> element has associated
7334
+ <dfn>lazy load resumption steps</dfn>, initially null.</p>
7335
7335
7336
- <p class="note">For <code>img</code> and <code>iframe</code> elements that <span data-x="will lazy
7337
- load element steps">will lazy load</span>, these steps are run from the <span>lazy load
7338
- intersection observer</span>'s callback or when their <span>lazy loading attribute</span> is set
7339
- to the <span data-x="attr-loading-eager-state">Eager</span> state. This causes the element to
7340
- continue loading.</p>
7336
+ <p class="note">For <code>img</code>, <code>iframe</code> and <code>video</code> elements that
7337
+ <span data-x="will lazy load element steps">will lazy load</span>, these steps are run from the
7338
+ <span>lazy load intersection observer</span>'s callback or when their <span>lazy loading
7339
+ attribute</span> is set to the <span data-x="attr-loading-eager-state">Eager</span> state. This
7340
+ causes the element to continue loading.</p>
7341
7341
7342
7342
<p>Each <code>Document</code> has a <dfn>lazy load intersection observer</dfn>, initially set to
7343
7343
null but can be set to an <code>IntersectionObserver</code> instance.</p>
@@ -33271,6 +33271,7 @@ interface <dfn interface>HTMLObjectElement</dfn> : <span>HTMLElement</span> {
33271
33271
<dd><code data-x="attr-media-src">src</code></dd>
33272
33272
<dd><code data-x="attr-media-crossorigin">crossorigin</code></dd>
33273
33273
<dd><code data-x="attr-video-poster">poster</code></dd>
33274
+ <dd><code data-x="attr-video-posterloading">posterloading</code></dd>
33274
33275
<dd><code data-x="attr-media-preload">preload</code></dd>
33275
33276
<dd><code data-x="attr-media-autoplay">autoplay</code></dd>
33276
33277
<dd><code data-x="attr-video-playsinline">playsinline</code></dd>
@@ -33294,6 +33295,7 @@ interface <dfn interface>HTMLVideoElement</dfn> : <span>HTMLMediaElement</span>
33294
33295
readonly attribute unsigned long <span data-x="dom-video-videoWidth">videoWidth</span>;
33295
33296
readonly attribute unsigned long <span data-x="dom-video-videoHeight">videoHeight</span>;
33296
33297
[<span>CEReactions</span>] attribute USVString <span data-x="dom-video-poster">poster</span>;
33298
+ [<span>CEReactions</span>] attribute DOMString <span data-x="dom-video-posterloading">posterloading</span>;
33297
33299
[<span>CEReactions</span>] attribute boolean <span data-x="dom-video-playsInline">playsInline</span>;
33298
33300
};</code></pre>
33299
33301
</dd>
@@ -33333,8 +33335,29 @@ interface <dfn interface>HTMLVideoElement</dfn> : <span>HTMLMediaElement</span>
33333
33335
data is available. The attribute, if present, must contain a <span>valid non-empty URL
33334
33336
potentially surrounded by spaces</span>.</p>
33335
33337
33338
+ <p>The <dfn element-attr for="video"><code
33339
+ data-x="attr-video-posterloading">posterloading</code></dfn> attribute is a <span>lazy
33340
+ loading attribute</span>. Its purpose is to indicate the policy for loading the image given by the
33341
+ <code data-x="attr-video-poster">poster</code> attribute of <code>video</code> elements that are
33342
+ outside the viewport.</p>
33343
+
33336
33344
<div w-nodev>
33337
33345
33346
+ <p>When the <code data-x="attr-video-posterloading">posterloading</code> attribute's state is
33347
+ changed to the <span data-x="attr-loading-eager-state">Eager</span> state, the user agent must run
33348
+ these steps:</p>
33349
+
33350
+ <ol>
33351
+ <li><p>Let <var>resumptionSteps</var> be the <code>video</code> element's <span>lazy load
33352
+ resumption steps</span>.</p></li>
33353
+
33354
+ <li><p>If <var>resumptionSteps</var> is null, then return.</p></li>
33355
+
33356
+ <li><p>Set the <code>video</code>'s <span>lazy load resumption steps</span> to null.</p></li>
33357
+
33358
+ <li><p>Invoke <var>resumptionSteps</var>.</p></li>
33359
+ </ol>
33360
+
33338
33361
<p>If the specified resource is to be used, then, when the element is created or when the <code
33339
33362
data-x="attr-video-poster">poster</code> attribute is set, changed, or removed, the user agent must
33340
33363
run the following steps to determine the element's <dfn>poster frame</dfn> (regardless of the
@@ -33361,13 +33384,41 @@ interface <dfn interface>HTMLVideoElement</dfn> : <span>HTMLMediaElement</span>
33361
33384
data-x="concept-request-credentials-mode">credentials mode</span> is "<code
33362
33385
data-x="">include</code>", and whose <span>use-URL-credentials flag</span> is set.
33363
33386
33364
- <!--FETCH--><li><p><span data-x="concept-fetch">Fetch</span> <var>request</var>, with
33365
- <i data-x="processResponseEndOfBody">processResponseEndOfBody</i> given
33366
- <span data-x="concept-response">response</span> <var>res</var> set to
33367
- <span>finalize and report timing</span> with <var>res</var>, the element's
33368
- <span>node document</span>'s <span>relevant global object</span>, and
33369
- "<code data-x="">video</code>". This must <span>delay the load event</span> of the element's
33370
- <span>node document</span>.</p></li>
33387
+ <li><p>Let <var>delay load event</var> be true if the <code>video</code>'s <span>lazy loading
33388
+ attribute</span> is in the <span data-x="attr-loading-eager-state">Eager</span> state, or if
33389
+ <span data-x="concept-n-noscript">scripting is disabled</span> for the <code>video</code>, and
33390
+ false otherwise.</p></li>
33391
+
33392
+ <li>
33393
+ <p>If the <span>will lazy load element steps</span> given the <code>video</code> return true,
33394
+ then:</p>
33395
+
33396
+ <ol>
33397
+ <li><p>Set the <code>video</code>'s <span>lazy load resumption steps</span> to the rest of this
33398
+ algorithm starting with the step labeled <i>fetch the poster image</i>.</p></li>
33399
+
33400
+ <li><p><span>Start intersection-observing a lazy loading element</span> for the
33401
+ <code>video</code> element.</p></li>
33402
+
33403
+ <li><p>Return.</p></li>
33404
+ </ol>
33405
+ </li>
33406
+
33407
+ <li>
33408
+ <!--FETCH-->
33409
+ <p><i>Fetch the poster image</i>: <span data-x="concept-fetch">Fetch</span>
33410
+ <var>request</var>, with <i data-x="processResponseEndOfBody">processResponseEndOfBody</i>
33411
+ given <span data-x="concept-response">response</span> <var>res</var> set to
33412
+ <span>finalize and report timing</span> with <var>res</var>, the element's
33413
+ <span>node document</span>'s <span>relevant global object</span>, and
33414
+ "<code data-x="">video</code>".</p>
33415
+
33416
+ <!-- similar text in <img>, <input type=image> -->
33417
+ <p>When <var>delay load event</var> is true, fetching the image must <span>delay the load
33418
+ event</span> of the element's <span>node document</span> until the <span
33419
+ data-x="concept-task">task</span> that is <span data-x="queue a task">queued</span> by the
33420
+ <span>networking task source</span> once the resource has been fetched has been run.
33421
+ </li>
33371
33422
33372
33423
<!-- could define how to sniff for an image here -->
33373
33424
@@ -33580,6 +33631,11 @@ interface <dfn interface>HTMLVideoElement</dfn> : <span>HTMLMediaElement</span>
33580
33631
IDL attribute must <span>reflect</span> the <code data-x="attr-video-poster">poster</code> content
33581
33632
attribute.</p>
33582
33633
33634
+ <p>The <dfn attribute for="HTMLVideoElement"><code
33635
+ data-x="dom-video-posterloading">posterloading</code></dfn> IDL attribute must
33636
+ <span>reflect</span> the <code data-x="attr-video-posterloading">posterloading</code> content
33637
+ attribute, <span>limited to only known values</span>.</p>
33638
+
33583
33639
<p>The <dfn attribute for="HTMLVideoElement"><code
33584
33640
data-x="dom-video-playsInline">playsInline</code></dfn> IDL attribute must <span>reflect</span>
33585
33641
the <code data-x="attr-video-playsinline">playsinline</code> content attribute.</p>
@@ -125318,6 +125374,7 @@ interface <dfn interface>External</dfn> {
125318
125374
<code data-x="attr-media-src">src</code>;
125319
125375
<code data-x="attr-media-crossorigin">crossorigin</code>;
125320
125376
<code data-x="attr-video-poster">poster</code>;
125377
+ <code data-x="attr-video-posterloading">posterloading</code>;
125321
125378
<code data-x="attr-media-preload">preload</code>;
125322
125379
<code data-x="attr-media-autoplay">autoplay</code>;
125323
125380
<code data-x="attr-video-playsinline">playsinline</code>;
@@ -126438,6 +126495,12 @@ interface <dfn interface>External</dfn> {
126438
126495
<td> <code data-x="attr-video-poster">video</code>
126439
126496
<td> Poster frame to show prior to video playback
126440
126497
<td> <span>Valid non-empty URL potentially surrounded by spaces</span>
126498
+ <tr>
126499
+ <th> <code data-x="">posterloading</code>
126500
+ <td> <code data-x="attr-video-posterloading">video</code>
126501
+ <td> Used when determining loading deferral of the poster frame
126502
+ <td> "<code data-x="attr-loading-lazy">lazy</code>";
126503
+ "<code data-x="attr-loading-eager">eager</code>"
126441
126504
<tr>
126442
126505
<th> <code data-x="">preload</code>
126443
126506
<td> <code data-x="attr-media-preload">audio</code>;
0 commit comments