Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

<canvas> width/height attributes can throw? #7798

Open
annevk opened this issue Apr 7, 2022 · 0 comments
Open

<canvas> width/height attributes can throw? #7798

annevk opened this issue Apr 7, 2022 · 0 comments

Comments

@annevk
Copy link
Member

annevk commented Apr 7, 2022

When setting the value of the width or height attribute, if the context mode of the canvas element is set to placeholder, the user agent must throw an "InvalidStateError" DOMException and leave the attribute's value unchanged.

This would mean that canvas.setAttribute("width", x) can throw, which is really weird as setAttribute() cannot throw (except with Trusted Types I suppose, but that's very much opt-in and also not an accepted standard).

(The placeholder mode is a result of calling transferControlToOffscreen().)

cc @whatwg/canvas

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

1 participant