Skip to content

feat: add web loocks api #1291

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

Merged
merged 2 commits into from
Mar 15, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion baselines/dom.generated.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9767,7 +9767,7 @@ declare var NavigationPreloadManager: {
};

/** The state and the identity of the user agent. It allows scripts to query it and to register themselves to carry on some activities. */
interface Navigator extends NavigatorAutomationInformation, NavigatorConcurrentHardware, NavigatorContentUtils, NavigatorCookies, NavigatorID, NavigatorLanguage, NavigatorNetworkInformation, NavigatorOnLine, NavigatorPlugins, NavigatorStorage {
interface Navigator extends NavigatorAutomationInformation, NavigatorConcurrentHardware, NavigatorContentUtils, NavigatorCookies, NavigatorID, NavigatorLanguage, NavigatorLocks, NavigatorNetworkInformation, NavigatorOnLine, NavigatorPlugins, NavigatorStorage {
/** Available only in secure contexts. */
readonly clipboard: Clipboard;
/** Available only in secure contexts. */
Expand Down Expand Up @@ -9839,6 +9839,11 @@ interface NavigatorLanguage {
readonly languages: ReadonlyArray<string>;
}

/** Available only in secure contexts. */
interface NavigatorLocks {
readonly locks: LockManager;
}

interface NavigatorNetworkInformation {
readonly connection: NetworkInformation;
}
Expand Down
7 changes: 6 additions & 1 deletion baselines/serviceworker.generated.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2202,6 +2202,11 @@ interface NavigatorLanguage {
readonly languages: ReadonlyArray<string>;
}

/** Available only in secure contexts. */
interface NavigatorLocks {
readonly locks: LockManager;
}

interface NavigatorNetworkInformation {
readonly connection: NetworkInformation;
}
Expand Down Expand Up @@ -5192,7 +5197,7 @@ declare var WorkerLocation: {
};

/** A subset of the Navigator interface allowed to be accessed from a Worker. Such an object is initialized for each worker and is available via the WorkerGlobalScope.navigator property obtained by calling window.self.navigator. */
interface WorkerNavigator extends NavigatorConcurrentHardware, NavigatorID, NavigatorLanguage, NavigatorNetworkInformation, NavigatorOnLine, NavigatorStorage {
interface WorkerNavigator extends NavigatorConcurrentHardware, NavigatorID, NavigatorLanguage, NavigatorLocks, NavigatorNetworkInformation, NavigatorOnLine, NavigatorStorage {
readonly mediaCapabilities: MediaCapabilities;
}

Expand Down
7 changes: 6 additions & 1 deletion baselines/sharedworker.generated.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2121,6 +2121,11 @@ interface NavigatorLanguage {
readonly languages: ReadonlyArray<string>;
}

/** Available only in secure contexts. */
interface NavigatorLocks {
readonly locks: LockManager;
}

interface NavigatorNetworkInformation {
readonly connection: NetworkInformation;
}
Expand Down Expand Up @@ -5071,7 +5076,7 @@ declare var WorkerLocation: {
};

/** A subset of the Navigator interface allowed to be accessed from a Worker. Such an object is initialized for each worker and is available via the WorkerGlobalScope.navigator property obtained by calling window.self.navigator. */
interface WorkerNavigator extends NavigatorConcurrentHardware, NavigatorID, NavigatorLanguage, NavigatorNetworkInformation, NavigatorOnLine, NavigatorStorage {
interface WorkerNavigator extends NavigatorConcurrentHardware, NavigatorID, NavigatorLanguage, NavigatorLocks, NavigatorNetworkInformation, NavigatorOnLine, NavigatorStorage {
readonly mediaCapabilities: MediaCapabilities;
}

Expand Down
7 changes: 6 additions & 1 deletion baselines/webworker.generated.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2277,6 +2277,11 @@ interface NavigatorLanguage {
readonly languages: ReadonlyArray<string>;
}

/** Available only in secure contexts. */
interface NavigatorLocks {
readonly locks: LockManager;
}

interface NavigatorNetworkInformation {
readonly connection: NetworkInformation;
}
Expand Down Expand Up @@ -5351,7 +5356,7 @@ declare var WorkerLocation: {
};

/** A subset of the Navigator interface allowed to be accessed from a Worker. Such an object is initialized for each worker and is available via the WorkerGlobalScope.navigator property obtained by calling window.self.navigator. */
interface WorkerNavigator extends NavigatorConcurrentHardware, NavigatorID, NavigatorLanguage, NavigatorNetworkInformation, NavigatorOnLine, NavigatorStorage {
interface WorkerNavigator extends NavigatorConcurrentHardware, NavigatorID, NavigatorLanguage, NavigatorLocks, NavigatorNetworkInformation, NavigatorOnLine, NavigatorStorage {
readonly mediaCapabilities: MediaCapabilities;
}

Expand Down
2 changes: 0 additions & 2 deletions inputfiles/removedTypes.jsonc
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,6 @@
"NavigatorDeviceMemory",
"NavigatorFonts",
"NavigatorGPU",
"NavigatorLocks",
"NavigatorML",
"NavigatorUA"
]
Expand Down Expand Up @@ -180,7 +179,6 @@
"NavigatorDeviceMemory",
"NavigatorFonts",
"NavigatorGPU",
"NavigatorLocks",
"NavigatorML",
"NavigatorUA"
]
Expand Down