Skip to content

Commit

Permalink
Add ViewTransition related externs.
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 675600127
  • Loading branch information
Closure Team authored and copybara-github committed Sep 17, 2024
1 parent 1f9321a commit 072baf8
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 0 deletions.
26 changes: 26 additions & 0 deletions externs/browser/html5.js
Original file line number Diff line number Diff line change
Expand Up @@ -6382,3 +6382,29 @@ ValidityStateFlags.prototype.badInput;

/** @type {boolean|undefined} */
ValidityStateFlags.prototype.customError;

/**
* @see https://drafts.csswg.org/css-view-transitions/#dom-document-startviewtransition
* @param {function(): (undefined|!Promise<undefined>)} updateCallback
* @return {!ViewTransition}
*/
Document.prototype.startViewTransition = function(updateCallback) {};

/**
* @see https://drafts.csswg.org/css-view-transitions/#viewtransition
* @record
* @struct
*/
function ViewTransition() {}

/** @const {!Promise<undefined>} */
ViewTransition.prototype.finished;

/** @const {!Promise<undefined>} */
ViewTransition.prototype.ready;

/** @const {!Promise<undefined>} */
ViewTransition.prototype.updateCallbackDone;

/** @return {undefined} */
ViewTransition.prototype.skipTransition = function() {};
6 changes: 6 additions & 0 deletions externs/browser/w3c_css.js
Original file line number Diff line number Diff line change
Expand Up @@ -517,6 +517,12 @@ CSSStyleDeclaration.prototype.removeProperty = function(propertyName) {};
CSSStyleDeclaration.prototype.setProperty = function(
propertyName, value, opt_priority) {};

/**
* @type {string}
* @see https://drafts.csswg.org/css-view-transitions/#propdef-view-transition-name
*/
CSSStyleDeclaration.prototype.viewTransitionName;

// IE-specific

/**
Expand Down

0 comments on commit 072baf8

Please sign in to comment.