Skip to content

Commit e963a34

Browse files
mathe42saschanaz
andauthored
feat: add web loocks api (#1291)
Co-authored-by: saschanaz <[email protected]>
1 parent ede3321 commit e963a34

5 files changed

+24
-6
lines changed

baselines/dom.generated.d.ts

+6-1
Original file line numberDiff line numberDiff line change
@@ -9767,7 +9767,7 @@ declare var NavigationPreloadManager: {
97679767
};
97689768

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

9842+
/** Available only in secure contexts. */
9843+
interface NavigatorLocks {
9844+
readonly locks: LockManager;
9845+
}
9846+
98429847
interface NavigatorNetworkInformation {
98439848
readonly connection: NetworkInformation;
98449849
}

baselines/serviceworker.generated.d.ts

+6-1
Original file line numberDiff line numberDiff line change
@@ -2202,6 +2202,11 @@ interface NavigatorLanguage {
22022202
readonly languages: ReadonlyArray<string>;
22032203
}
22042204

2205+
/** Available only in secure contexts. */
2206+
interface NavigatorLocks {
2207+
readonly locks: LockManager;
2208+
}
2209+
22052210
interface NavigatorNetworkInformation {
22062211
readonly connection: NetworkInformation;
22072212
}
@@ -5192,7 +5197,7 @@ declare var WorkerLocation: {
51925197
};
51935198

51945199
/** 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. */
5195-
interface WorkerNavigator extends NavigatorConcurrentHardware, NavigatorID, NavigatorLanguage, NavigatorNetworkInformation, NavigatorOnLine, NavigatorStorage {
5200+
interface WorkerNavigator extends NavigatorConcurrentHardware, NavigatorID, NavigatorLanguage, NavigatorLocks, NavigatorNetworkInformation, NavigatorOnLine, NavigatorStorage {
51965201
readonly mediaCapabilities: MediaCapabilities;
51975202
}
51985203

baselines/sharedworker.generated.d.ts

+6-1
Original file line numberDiff line numberDiff line change
@@ -2121,6 +2121,11 @@ interface NavigatorLanguage {
21212121
readonly languages: ReadonlyArray<string>;
21222122
}
21232123

2124+
/** Available only in secure contexts. */
2125+
interface NavigatorLocks {
2126+
readonly locks: LockManager;
2127+
}
2128+
21242129
interface NavigatorNetworkInformation {
21252130
readonly connection: NetworkInformation;
21262131
}
@@ -5071,7 +5076,7 @@ declare var WorkerLocation: {
50715076
};
50725077

50735078
/** 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. */
5074-
interface WorkerNavigator extends NavigatorConcurrentHardware, NavigatorID, NavigatorLanguage, NavigatorNetworkInformation, NavigatorOnLine, NavigatorStorage {
5079+
interface WorkerNavigator extends NavigatorConcurrentHardware, NavigatorID, NavigatorLanguage, NavigatorLocks, NavigatorNetworkInformation, NavigatorOnLine, NavigatorStorage {
50755080
readonly mediaCapabilities: MediaCapabilities;
50765081
}
50775082

baselines/webworker.generated.d.ts

+6-1
Original file line numberDiff line numberDiff line change
@@ -2277,6 +2277,11 @@ interface NavigatorLanguage {
22772277
readonly languages: ReadonlyArray<string>;
22782278
}
22792279

2280+
/** Available only in secure contexts. */
2281+
interface NavigatorLocks {
2282+
readonly locks: LockManager;
2283+
}
2284+
22802285
interface NavigatorNetworkInformation {
22812286
readonly connection: NetworkInformation;
22822287
}
@@ -5351,7 +5356,7 @@ declare var WorkerLocation: {
53515356
};
53525357

53535358
/** 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. */
5354-
interface WorkerNavigator extends NavigatorConcurrentHardware, NavigatorID, NavigatorLanguage, NavigatorNetworkInformation, NavigatorOnLine, NavigatorStorage {
5359+
interface WorkerNavigator extends NavigatorConcurrentHardware, NavigatorID, NavigatorLanguage, NavigatorLocks, NavigatorNetworkInformation, NavigatorOnLine, NavigatorStorage {
53555360
readonly mediaCapabilities: MediaCapabilities;
53565361
}
53575362

inputfiles/removedTypes.jsonc

-2
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,6 @@
7878
"NavigatorDeviceMemory",
7979
"NavigatorFonts",
8080
"NavigatorGPU",
81-
"NavigatorLocks",
8281
"NavigatorML",
8382
"NavigatorUA"
8483
]
@@ -180,7 +179,6 @@
180179
"NavigatorDeviceMemory",
181180
"NavigatorFonts",
182181
"NavigatorGPU",
183-
"NavigatorLocks",
184182
"NavigatorML",
185183
"NavigatorUA"
186184
]

0 commit comments

Comments
 (0)