servo/components/script_bindings/webidls/WorkerNavigator.webidl
Siddhant N Trivedi 7ee9d07a9a
content/dom: set navigator.onLine attribute to true (#36560)
Sets the navigator.onLine attribute to true.

Testing:
Ran `./mach run https://pinterest.com
--enable-experimental-web-platform-features`. This doesn't show the
"Hmm..you're not connected to the internet" text anymore.
<img width="1027" alt="Screenshot 2025-04-16 at 11 31 02 AM"
src="https://github.com/user-attachments/assets/3745077b-dc51-42ce-88a0-38d5f157fc0c"
/>


part of: #36554

---------

Signed-off-by: Siddhant N. Trivedi <sidntrivedi012@gmail.com>
Signed-off-by: Siddhant N Trivedi <sidntrivedi012@gmail.com>
Co-authored-by: Josh Matthews <josh@joshmatthews.net>
2025-04-19 01:34:13 +00:00

19 lines
709 B
Text

/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at https://mozilla.org/MPL/2.0/. */
// https://html.spec.whatwg.org/multipage/#workernavigator
[Exposed=Worker]
interface WorkerNavigator {};
WorkerNavigator includes NavigatorID;
WorkerNavigator includes NavigatorLanguage;
WorkerNavigator includes NavigatorOnLine;
WorkerNavigator includes NavigatorConcurrentHardware;
// https://w3c.github.io/permissions/#navigator-and-workernavigator-extension
[Exposed=(Worker)]
partial interface WorkerNavigator {
[Pref="dom_permissions_enabled"] readonly attribute Permissions permissions;
};