-
Notifications
You must be signed in to change notification settings - Fork 509
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
enhance(macros/AvailableInWorkers): add "only available in Web Workers" case #10968
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM for the zh-CN translation 👍
@teoli2003 @bsmth @hamishwillee What do you think about this additional case? |
LGTM, curious what others think. This should be every case covered by now, right? |
This makes sense - I am sure there are at least a few worker-only features, in particular around things that have no UI.
No, about half. The possible cases are all variations of: window, service worker, dedicated worker, shared worker - which is 2^4 = 16 variants. But I suspect this covers the cases which make sense in the spec for now. |
Yes, I think currently this has covered all cases in the spec for now |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, just two nits that I will apply.
Summary
the {{AvailableInWorkers}} macro that adds a message indicating a feature is available in web workers
in #10029, more cases is supported for the {{AvailableInWorkers}} macro
but there is still some cases that the {{AvailableInWorkers}} macro does not support
like:
WorkerLocation
WorkerNavigator
and so on)Problem
when working on mdn/content#31675, noticed that there's some cases that {{AvailableInWorkers}} macros can not cover
Solution
the macro's parameter support more available value
seom possible usage like: {{AvailableInWorkers("worker")}}
Screenshots
Before
None
After
How did you test this change?
Test by hand.