Change requestFullscreen to return Promise<void>.

This matches the current state of the API specification and TypeScript
3.1+'s DOM definitions.

This fixes a problem where this file re-opens HTMLElement in an
incompatible way, which in turn causes various subtyping failures in
lib.dom.d.ts.

See also https://fullscreen.spec.whatwg.org/#api
This commit is contained in:
Martin Probst 2018-12-17 15:17:50 +01:00
parent 6a5e2cc314
commit 7ddfc0b2a9
2 changed files with 4 additions and 1 deletions

View File

@ -13274,7 +13274,7 @@ interface HTMLElement {
/**
* Unprefixed version are not available as of Chrome 68, in Chrome apps
*/
requestFullscreen(): void;
requestFullscreen(): Promise<void>;
/**
* Unprefixed version are not available as of Chrome 68, in Chrome apps
*/

View File

@ -2012,5 +2012,8 @@ appview.connect('id of app');
document.appendChild(appview);
//#endregion
// #region HTMLElement correctly subtypes Element in TS3.1.
const htmlElement = document.querySelector('zzzzzz') as HTMLElement;
//#endregion