wpt icon indicating copy to clipboard operation
wpt copied to clipboard

HTML: navigate cancels iframe lazy-load

Open zcorpan opened this issue 1 year ago • 4 comments

See https://github.com/whatwg/html/pull/10226

zcorpan avatar Apr 10 '24 15:04 zcorpan

would be interesting to test also what happens when the iframe receives lazy steps after a navigation is started but before it's committed. e.g. you have an about:blank with lazy and without a src, you navigate it with a link, then set a src, and the new document is ready to commit before the lazy steps are run I think what chromium does here would differ from your spec PR (not saying here what the "right" solution is)

noamr avatar Apr 10 '24 15:04 noamr

@noamr per spec, when the iframe is first inserted, process the iframe attributes is run but returns at 2.2. Then something navigates. Then setting src will again call process the iframe attributes, which sets the lazy load resumption steps in 2.6.1.

zcorpan avatar Apr 11 '24 09:04 zcorpan

These are unstable in Chrome:

  • /html/semantics/embedded-content/the-iframe-element/iframe-loading-lazy-nav-location-replace-set-src.html
  • /html/semantics/embedded-content/the-iframe-element/iframe-loading-lazy-nav-meta-refresh.optional.html

The first one I think should be stable per spec, since the lazy navigation happens after location.replace and it sets the ongoing navigation which should abort the previous navigation.

The meta refresh could arguably be unstable per spec if the UA decides to delay the navigation by the same amount of time as the test's step_timeout. But changing the timeout to 5s doesn't help, so it doesn't explain the instability in Chrome.

zcorpan avatar Apr 11 '24 12:04 zcorpan

Sorry for the delay, I took some time off last week and early this week. Getting through my backlog so I will take a look at this as soon as I can

domfarolino avatar Apr 24 '24 20:04 domfarolino