yari icon indicating copy to clipboard operation
yari copied to clipboard

chore(macros/AvailableinWorkers): add last 5 possible cases

Open skyclouds2001 opened this issue 1 year ago • 0 comments

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 case

previously 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 https://github.com/mdn/content/pull/36060#issuecomment-2381445162 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: https://github.com/mdn/yari/pull/11888, https://github.com/mdn/yari/pull/10968, https://github.com/mdn/yari/pull/10029 (https://github.com/mdn/yari/issues/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

image


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

skyclouds2001 avatar Oct 03 '24 23:10 skyclouds2001