Skip to content

Commit 66b90e9

Browse files
committed
Add direct links to spec definitions for each property
Updated spec links annotations for consistency with extern lib format and some backwards compatibility with IDE plugins fetching JSDoc referenced resources
1 parent 4d32a01 commit 66b90e9

File tree

1 file changed

+21
-12
lines changed

1 file changed

+21
-12
lines changed

externs/browser/weblocksapi.js

+21-12
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
/**
1717
* @fileoverview Definitions for objects in the Web Locks API. Details of the
1818
* API are at:
19-
* https://wicg.github.io/web-locks/
19+
* @see https://w3c.github.io/web-locks/
2020
*
2121
* @externs
2222
* @author [email protected] (Colin Dunn)
@@ -25,21 +25,27 @@
2525
/**
2626
* Possible values are "shared" and "exclusive".
2727
* @typedef {string}
28-
* [Web Locks API Spec](https://wicg.github.io/web-locks/#idl-index)
28+
* @see https://w3c.github.io/web-locks/#enumdef-lockmode
2929
*/
3030
var LockMode;
3131

3232

3333
/**
3434
* @interface
35-
* [Web Locks API Spec](https://wicg.github.io/web-locks/#idl-index)
35+
* @see https://w3c.github.io/web-locks/#lock
3636
*/
3737
function Lock() {}
3838

39-
/** @const {string} */
39+
/**
40+
* @const {string}
41+
* @see https://w3c.github.io/web-locks/#lock-concept-name
42+
*/
4043
Lock.prototype.name;
4144

42-
/** @const {!LockMode} */
45+
/**
46+
* @const {!LockMode}
47+
* @see https://w3c.github.io/web-locks/#lock-concept-mode
48+
*/
4349
Lock.prototype.mode;
4450

4551

@@ -49,7 +55,7 @@ Lock.prototype.mode;
4955
* mode: !LockMode,
5056
* clientId: string
5157
* }}
52-
* [Web Locks API Spec](https://wicg.github.io/web-locks/#idl-index)
58+
* @see https://w3c.github.io/web-locks/#dictdef-lockinfo
5359
*/
5460
var LockInfo;
5561

@@ -61,7 +67,7 @@ var LockInfo;
6167
* steal: (boolean|undefined),
6268
* signal: (!AbortSignal|undefined)
6369
* }}
64-
* [Web Locks API Spec](https://wicg.github.io/web-locks/#idl-index)
70+
* @see https://w3c.github.io/web-locks/#dictdef-lockoptions
6571
*/
6672
var LockOptions;
6773

@@ -71,24 +77,26 @@ var LockOptions;
7177
* held: !Array<!LockInfo>,
7278
* pending: !Array<!LockInfo>
7379
* }}
74-
* [Web Locks API Spec](https://wicg.github.io/web-locks/#idl-index)
80+
* @see https://w3c.github.io/web-locks/#dictdef-lockmanagersnapshot
7581
*/
7682
var LockManagerSnapshot;
7783

7884

7985
/**
8086
* @typedef {(function(?Lock) : !Promise<*>)}
81-
* [Web Locks API Spec](https://wicg.github.io/web-locks/#idl-index)
87+
* @see https://w3c.github.io/web-locks/#callbackdef-lockgrantedcallback
8288
*/
8389
var LockGrantedCallback;
8490

8591

8692
/**
8793
* @interface
88-
* [Web Locks API Spec](https://wicg.github.io/web-locks/#idl-index)
94+
* @see https://w3c.github.io/web-locks/#lockmanager
8995
*/
9096
function LockManager() {}
97+
9198
/**
99+
* @see https://w3c.github.io/web-locks/#dom-lockmanager-request
92100
* @param {string} name
93101
* @param {(!LockOptions|!LockGrantedCallback)} optionsOrCallback
94102
* @param {!LockGrantedCallback=} callback
@@ -97,20 +105,21 @@ function LockManager() {}
97105
LockManager.prototype.request = function(name, optionsOrCallback, callback) {};
98106

99107
/**
108+
* @see https://w3c.github.io/web-locks/#dom-lockmanager-query
100109
* @return {!Promise<!LockManagerSnapshot>}
101110
*/
102111
LockManager.prototype.query = function() {};
103112

104113

105114
/**
106115
* @type {!LockManager}
107-
* [Web Locks API Spec](https://wicg.github.io/web-locks/#idl-index)
116+
* @see https://w3c.github.io/web-locks/#lockmanager
108117
*/
109118
Navigator.prototype.locks;
110119

111120

112121
/**
113122
* @type {!LockManager}
114-
* [Web Locks API Spec](https://wicg.github.io/web-locks/#idl-index)
123+
* @see https://w3c.github.io/web-locks/#lockmanager
115124
*/
116125
WorkerNavigator.prototype.locks;

0 commit comments

Comments
 (0)