script: implement navigator.hardwareConcurrency (#31268)

Signed-off-by: syvb <me@iter.ca>
This commit is contained in:
Smitty 2024-02-07 13:41:58 -05:00 committed by GitHub
parent 044b94d5eb
commit 20404a72c0
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
14 changed files with 32 additions and 40 deletions

View file

@ -15,6 +15,7 @@ Navigator includes NavigatorLanguage;
Navigator includes NavigatorPlugins;
Navigator includes NavigatorCookies;
Navigator includes NavigatorGPU;
Navigator includes NavigatorConcurrentHardware;
// https://html.spec.whatwg.org/multipage/#navigatorid
[Exposed=(Window,Worker)]
@ -70,3 +71,8 @@ partial interface Navigator {
partial interface Navigator {
[Pref="dom.gamepad.enabled"] GamepadList getGamepads();
};
// https://html.spec.whatwg.org/multipage/#navigatorconcurrenthardware
interface mixin NavigatorConcurrentHardware {
readonly attribute unsigned long long hardwareConcurrency;
};

View file

@ -8,6 +8,7 @@ interface WorkerNavigator {};
WorkerNavigator includes NavigatorID;
WorkerNavigator includes NavigatorLanguage;
//WorkerNavigator includes NavigatorOnLine;
WorkerNavigator includes NavigatorConcurrentHardware;
// https://w3c.github.io/permissions/#navigator-and-workernavigator-extension