-
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
chore(macros/AvailableinWorkers): add last 5 possible cases #11907
base: main
Are you sure you want to change the base?
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.
Some suggestions for zh-CN translation:
Co-authored-by: A1lo <[email protected]>
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 👍
This pull request has merge conflicts that must be resolved before it can be merged. |
Summary
Problem
the
Performance.measureUserAgentSpecificMemory()
is only expose to Window, SharedWorker and ServiceWorker (see https://wicg.github.io/performance-measure-memory/ and https://source.chromium.org/chromium/chromium/src/+/main:third_party/blink/renderer/core/timing/performance.idl;l=72?q=performance.idl), but currently the macros does not support this casepreviously another case is just added, I think simply add all left cases together in one PR to avoid more edit to this macros in the future
see mdn/content#36060 (comment) for the research
total is 16 cases, 9 cases included yet, 2 cases omited (not handled by this macros), and this is 5 cases left here
these are window_and_worker_except_dedicated, worker_except_shared, worker_except_dedicated, window_and_shared, shared
previous work include: #11888, #10968, #10029 (#10009)
Also adjust cases order to make it more clear and organized.
zh-CN translation included yet, /cc @yin1999 @JasonLamv-t @jasonren0403
Solution
same as title
Screenshots
Before
None.
After
How did you test this change?
included the macro call with new arguments in a page locally and watch the develop preview and observe the terminal output