-
Notifications
You must be signed in to change notification settings - Fork 46
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
Guidance in exposing some APIs only off the main thread #360
Comments
in case it helps, WebIDLpedia now gives information on exposure sets, in particular which interfaces are exposed only in a given exposure, e.g. for
|
I think the answer here is yes. E.g., see precedent of having synchronous I/O APIs only available in dedicated workers. (You typically do not want to block shared/service workers either.) |
To @annevk's point, I think guidance in this space needs to recognize two distinct situations:
I think there is probably no controversy around recommending against the 1st type. There is obviously controversy on the 2nd type. Part of it I think is that APIs of the 2nd type can be used on the main thread in a way that guarantees it would not impact it - e.g. (as discussed before, I'm the opinion that not exposing them on |
Note that all the five interfaces only available in DedicatedWorker are the hotly contested items in WEBRTC. |
Following up on #325, which has already quite a bit of background on this:
is it appropriate to use non-exposure of an API on
Window
as a way to force developers to not do things on the main thread?That question has emerged in WebCodecs, WebRTC Encoded Transform, Media Capture Transform, WebNN, File API.
The text was updated successfully, but these errors were encountered: