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

Fix ImageCapture API (#2347) #2348

Merged
merged 2 commits into from
Nov 9, 2020

Conversation

dodomorandi
Copy link
Contributor

I literally copy-pasted the webidl from the working draft then run the wasm-bindgen-webidl to re-generate the bindings.

It looks fine, even if it could be considered breaking change because the methods depend on different set of features.

Closes #2347

@alexcrichton
Copy link
Contributor

Thanks! To confirm, were all these APIs basically broken and not working before? (asking because there's a bit of breakage)

@dodomorandi
Copy link
Contributor Author

I think that the API in the webidl file is very old (before December 2016), because I tried going back to a bunch of versions, without encountering something like the onerror attribute. Still being a working draft, there is a good possibility that this API was not used in production, even because the MDN shows a totally different interface respect to the webidl. I did not explicitly try all the APIs, but MDN shows a compatibility table that matches the new API.

In any case, I just realized that the issue #2202 was a subset of this problem.

@alexcrichton
Copy link
Contributor

If this WebIDL is still a draft, perhaps we should move it to the unstable directory?

@dodomorandi
Copy link
Contributor Author

You are probably right about this: the specs is in working draft, and it's not been touched since 21 June 2017. Surely I would rather have the current spec in the unstable than the old one in enabled. 😊

If you want, I can move the file in this PR, it is a breaking change (even if probably irrelevant) in any case.

@alexcrichton
Copy link
Contributor

The current WebIDL is so old it doesn't work right? If so it seems fine to delete since it doesn't work anywhere anyway.

@alexcrichton alexcrichton merged commit 1d2d345 into rustwasm:master Nov 9, 2020
@alexcrichton
Copy link
Contributor

Thanks!

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

Successfully merging this pull request may close these issues.

Expose and fix all ImageCapture APIs
2 participants