Skip to content

img doesn't seem to handle opaque responses from fetch API #3483

@wanderview

Description

@wanderview

The img element processing model uses Fetch API to load the image data in step 22 here:

https://html.spec.whatwg.org/#update-the-image-data

It basically just says:

⌛ Fetch request. Let this instance of the fetching algorithm be associated with image request.

The resource obtained in this fashion, if any, is image request's image data. It can be either CORS-same-origin or CORS-cross-origin; this affects the origin of the image itself (e.g. when used on a canvas).

It does reference CORS-cross-origin here, but it doesn't actually say to reach inside the filtered opaque response and extract the nested response's body.

This is kind of a nit at this point, but it would be nice if the body consumption was more explicitly spelled out.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions