Skip to content

Commit 56ede21

Browse files
mhausnercopybara-github
authored andcommitted
Add missing standard externs declarations
PiperOrigin-RevId: 736284335
1 parent 4fc3d90 commit 56ede21

11 files changed

+653
-1
lines changed

externs/browser/fetchapi.js

+9
Original file line numberDiff line numberDiff line change
@@ -132,6 +132,9 @@ Body.prototype.arrayBuffer = function() {};
132132
/** @return {!Promise<!Blob>} */
133133
Body.prototype.blob = function() {};
134134

135+
/** @return {!Promise<!Uint8Array>} */
136+
Body.prototype.bytes = function() {};
137+
135138
/** @return {!Promise<!FormData>} */
136139
Body.prototype.formData = function() {};
137140

@@ -167,6 +170,9 @@ Request.prototype.arrayBuffer = function() {};
167170
/** @override */
168171
Request.prototype.blob = function() {};
169172

173+
/** @override */
174+
Request.prototype.bytes = function() {};
175+
170176
/** @override */
171177
Request.prototype.formData = function() {};
172178

@@ -344,6 +350,9 @@ Response.prototype.arrayBuffer = function() {};
344350
/** @override */
345351
Response.prototype.blob = function() {};
346352

353+
/** @override */
354+
Response.prototype.bytes = function() {};
355+
347356
/** @override */
348357
Response.prototype.formData = function() {};
349358

externs/browser/html5.js

+79
Original file line numberDiff line numberDiff line change
@@ -1686,6 +1686,12 @@ Worker.prototype.webkitPostMessage = function(message, transferOrOptions) {};
16861686
*/
16871687
Worker.prototype.onmessage;
16881688

1689+
/**
1690+
* @type {?function(!MessageEvent)}
1691+
* @see https://developer.mozilla.org/docs/Web/API/Worker/messageerror_event
1692+
*/
1693+
Worker.prototype.onmessageerror;
1694+
16891695
/**
16901696
* Sent when the worker thread encounters an error.
16911697
* @type {?function(!ErrorEvent): void}
@@ -2331,6 +2337,15 @@ HTMLMediaElement.prototype.buffered;
23312337
/** @type {?MediaStream} */
23322338
HTMLMediaElement.prototype.srcObject;
23332339

2340+
/** @type {boolean} */
2341+
HTMLMediaElement.prototype.defaultMuted;
2342+
2343+
/** @type {boolean} */
2344+
HTMLMediaElement.prototype.disableRemotePlayback;
2345+
2346+
/** @type {boolean} */
2347+
HTMLMediaElement.prototype.preservesPitch;
2348+
23342349
/**
23352350
* Loads the media element.
23362351
* @return {undefined}
@@ -2358,6 +2373,12 @@ HTMLMediaElement.prototype.oncanplaythrough;
23582373
/** @type {?function(!Event)} */
23592374
HTMLMediaElement.prototype.ondurationchange;
23602375

2376+
/** @type {?function(!MediaEncryptedEvent)} */
2377+
HTMLMediaElement.prototype.onencrypted;
2378+
2379+
/** @type {?function(!Event)} */
2380+
HTMLMediaElement.prototype.onwaitingforkey;
2381+
23612382
/** @type {?function(!Event)} */
23622383
HTMLMediaElement.prototype.onemptied;
23632384

@@ -2619,6 +2640,12 @@ TextTrack.prototype.addCue = function(cue) {};
26192640
*/
26202641
TextTrack.prototype.removeCue = function(cue) {};
26212642

2643+
/**
2644+
* @type {?function(!Event)}
2645+
* @see https://developer.mozilla.org/docs/Web/API/TextTrack/cuechange_event
2646+
*/
2647+
TextTrack.prototype.oncuechange;
2648+
26222649
/**
26232650
* @const {TextTrackCueList}
26242651
*/
@@ -2635,6 +2662,30 @@ TextTrack.prototype.cues;
26352662
*/
26362663
TextTrack.prototype.id;
26372664

2665+
/**
2666+
* @type {string}
2667+
* @see https://developer.mozilla.org/docs/Web/API/TextTrack/inBandMetadataTrackDispatchType
2668+
*/
2669+
TextTrack.prototype.inBandMetadataTrackDispatchType;
2670+
2671+
/**
2672+
* @type {string}
2673+
* @see https://developer.mozilla.org/docs/Web/API/TextTrack/kind
2674+
*/
2675+
TextTrack.prototype.kind;
2676+
2677+
/**
2678+
* @type {string}
2679+
* @see https://developer.mozilla.org/docs/Web/API/TextTrack/label
2680+
*/
2681+
TextTrack.prototype.label;
2682+
2683+
/**
2684+
* @type {string}
2685+
* @see https://developer.mozilla.org/docs/Web/API/TextTrack/language
2686+
*/
2687+
TextTrack.prototype.language;
2688+
26382689
/**
26392690
* @type {string}
26402691
*/
@@ -2835,6 +2886,9 @@ HTMLVideoElement.prototype.videoWidth;
28352886
/** @type {number} */
28362887
HTMLVideoElement.prototype.videoHeight;
28372888

2889+
/** @type {boolean} */
2890+
HTMLVideoElement.prototype.playsInline;
2891+
28382892
/** @type {string} */
28392893
HTMLVideoElement.prototype.poster;
28402894

@@ -3073,6 +3127,12 @@ MessagePort.prototype.close = function() {};
30733127
*/
30743128
MessagePort.prototype.onmessage;
30753129

3130+
/**
3131+
* @type {?function(!MessageEvent<*>): void}
3132+
* @see https://developer.mozilla.org/docs/Web/API/MessagePort/messageerror_event
3133+
*/
3134+
MessagePort.prototype.onmessageerror;
3135+
30763136
// HTML5 MessageEvent class
30773137
/**
30783138
* @typedef {Window|MessagePort|ServiceWorker}
@@ -3269,6 +3329,12 @@ BroadcastChannel.prototype.removeEventListener = function(
32693329
*/
32703330
BroadcastChannel.prototype.onmessage;
32713331

3332+
/**
3333+
* @type {?function(!MessageEvent<*>)}
3334+
* @see https://developer.mozilla.org/docs/Web/API/BroadcastChannel/messageerror_event
3335+
*/
3336+
BroadcastChannel.prototype.onmessageerror;
3337+
32723338
/**
32733339
* The name of the channel.
32743340
* @type {string}
@@ -5007,6 +5073,13 @@ ShadowRoot.prototype.innerHTML;
50075073
ShadowRoot.prototype.styleSheets;
50085074

50095075

5076+
/**
5077+
* @param {!GetHTMLOptions=} options
5078+
* @return {string}
5079+
* @see https://developer.mozilla.org/docs/Web/API/ShadowRoot/getHTML
5080+
*/
5081+
ShadowRoot.prototype.getHTML = function(options) {};
5082+
50105083
/**
50115084
* @typedef {string}
50125085
* @see https://dom.spec.whatwg.org/#enumdef-shadowrootmode
@@ -5826,6 +5899,12 @@ Navigator.prototype.setAppBadge = function(contents) {};
58265899
*/
58275900
Navigator.prototype.clearAppBadge = function() {};
58285901

5902+
/**
5903+
* @type {boolean}
5904+
* @see https://developer.mozilla.org/docs/Web/API/Navigator/pdfViewerEnabled
5905+
*/
5906+
Navigator.prototype.pdfViewerEnabled;
5907+
58295908
/**
58305909
* @constructor
58315910
* @implements NavigatorBadge

0 commit comments

Comments
 (0)