Skip to content

New principle: Some APIs should only be exposed to dedicated workers #404

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

Merged
merged 5 commits into from
Feb 7, 2023

Conversation

hober
Copy link
Contributor

@hober hober commented Dec 5, 2022

Fixes #360.


Preview | Diff

@hober hober requested a review from cynthia December 5, 2022 18:43
@hober hober self-assigned this Dec 5, 2022
@hober hober requested a review from annevk December 5, 2022 19:04
https://github.com/w3ctag/design-principles/issues/325
https://github.com/w3ctag/design-principles/issues/360
-->

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Member

@annevk annevk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It might make sense to focus a bit more on what we don't want (main thread blocking) and then offer a variety of solutions, such as dedicated workers, shared workers, service workers, worklets, and promise-returning APIs.

in the Web Audio API
because use of {{ScriptProcessorNode}} from the main thread
frequently resulted in a poor user experience. [[WebAudio]]
</p>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This example suggests worklets are a good alternative, but the text doesn't really go into that.

cynthia and others added 2 commits February 7, 2023 10:35
Co-authored-by: Anne van Kesteren <[email protected]>
Co-authored-by: Anne van Kesteren <[email protected]>
@cynthia cynthia merged commit a35df00 into main Feb 7, 2023
hober added a commit that referenced this pull request Apr 20, 2023
…404)

* New principle: Some APIs should only be exposed to dedicated workers

* improve line breaking in new example.

* smart quotes. link to definition of jank.

* Update index.bs

Co-authored-by: Anne van Kesteren <[email protected]>

* Update index.bs

Co-authored-by: Anne van Kesteren <[email protected]>

---------

Co-authored-by: Sangwhan "fish" Moon <[email protected]>
Co-authored-by: Anne van Kesteren <[email protected]>
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.

Guidance in exposing some APIs only off the main thread
3 participants