Skip to content

Commit

Permalink
Adds ExtendableMessageEvent to Closure service worker externs.
Browse files Browse the repository at this point in the history
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=202377882
  • Loading branch information
jimmyshen authored and brad4d committed Jun 28, 2018
1 parent cebb785 commit 3e3604e
Show file tree
Hide file tree
Showing 2 changed files with 51 additions and 1 deletion.
50 changes: 50 additions & 0 deletions externs/browser/w3c_serviceworker.js
Expand Up @@ -677,3 +677,53 @@ FetchEvent.prototype.default = function() {};
* }}
*/
var FetchEventInit;


/**
* @see https://www.w3.org/TR/service-workers/#extendablemessage-event-interface
* @param {string} type
* @param {!ExtendableMessageEventInit<T>=} opt_eventInitDict
* @constructor
* @extends {ExtendableEvent}
* @template T
*/
function ExtendableMessageEvent(type, opt_eventInitDict) {};

/** @type {T} */
ExtendableMessageEvent.prototype.data;

/** @type {string} */
ExtendableMessageEvent.prototype.origin;

/** @type {string} */
ExtendableMessageEvent.prototype.lastEventId;

/** @type {?ServiceWorkerClient|?ServiceWorker|?MessagePort} */
ExtendableMessageEvent.prototype.source;

/** @type {?Array<!MessagePort>} */
ExtendableMessageEvent.prototype.ports;


/**
* @see https://www.w3.org/TR/service-workers/#extendablemessage-event-init-dictionary
* @record
* @extends {ExtendableEventInit}
* @template T
*/
function ExtendableMessageEventInit() {};

/** @type {T} */
ExtendableMessageEventInit.prototype.data;

/** @type {string|undefined} */
ExtendableMessageEventInit.prototype.origin;

/** @type {string|undefined} */
ExtendableMessageEventInit.prototype.lastEventId;

/** @type {!ServiceWorkerClient|!ServiceWorker|!MessagePort|undefined} */
ExtendableMessageEventInit.prototype.source;

/** @type {!Array<!MessagePort>|undefined} */
ExtendableMessageEventInit.prototype.ports;
2 changes: 1 addition & 1 deletion src/com/google/javascript/jscomp/resources.json

Large diffs are not rendered by default.

0 comments on commit 3e3604e

Please sign in to comment.