Discussion:
Intent to implement and ship: img decode API support
Andrew Osmond
2018-11-07 16:15:32 UTC
Permalink
Web authors would like a way to guarantee an image has been fully decoded
and will display immediately when inserted into the DOM.

Bug: https://bugzilla.mozilla.org/show_bug.cgi?id=1501794

Link to standard:
https://html.spec.whatwg.org/multipage/embedded-content.html#dom-img-decode

Platform coverage: All

Target Release: 65

Do other browser engines implement this?: Chrome 64, Opera 51, Safari 11.1.

Is this feature enabled by default in sandboxed iframes?: This is simply a
new method for JS on image elements, so it should be unavailable.

Is this feature restricted to secure contexts?: No. This already ships on
Chrome and Safari in an insecure context.

web-platform-tests:
https://searchfox.org/mozilla-central/source/testing/web-platform/tests/html/semantics/embedded-content/the-img-element/decode/
Boris Zbarsky
2018-11-07 16:23:31 UTC
Permalink
Post by Andrew Osmond
This is simply a
new method for JS on image elements, so it should be unavailable.
Script can run in sandboxed iframes, depending on sandboxing flags.

It sounds like this feature is enabled by default in sandboxed iframes,
as long as script is enabled, right?

-Boris
Andrew Osmond
2018-11-07 16:28:14 UTC
Permalink
Ah, my bad. Yes, if scripts are available, this is available. It doesn't
allow you to do anything new, aside from forcing a decode to start (which
you could do by adding the image to the DOM tree, assuming it is visible)
and knowing when the decode has completed. The usual content restrictions
will continue to apply.
Post by Boris Zbarsky
Post by Andrew Osmond
This is simply a
new method for JS on image elements, so it should be unavailable.
Script can run in sandboxed iframes, depending on sandboxing flags.
It sounds like this feature is enabled by default in sandboxed iframes, as
long as script is enabled, right?
-Boris
_______________________________________________
dev-platform mailing list
https://lists.mozilla.org/listinfo/dev-platform
Loading...