Skip to content

Commit 64189db

Browse files
authored
Merge pull request #372 from alan-agius4/feature/screen-lock
screen: add `lockOrientation` and `unlockOrientation`
2 parents ebfe161 + 875ac14 commit 64189db

File tree

2 files changed

+25
-0
lines changed

2 files changed

+25
-0
lines changed

baselines/dom.generated.d.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9617,6 +9617,8 @@ interface Screen extends EventTarget {
96179617
readonly width: number;
96189618
msLockOrientation(orientations: string | string[]): boolean;
96199619
msUnlockOrientation(): void;
9620+
lockOrientation(orientations: OrientationLockType | OrientationLockType[]): boolean;
9621+
unlockOrientation(): void;
96209622
addEventListener<K extends keyof ScreenEventMap>(type: K, listener: (this: Screen, ev: ScreenEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
96219623
addEventListener(type: string, listener: EventListener, options?: boolean | AddEventListenerOptions): void;
96229624
removeEventListener<K extends keyof ScreenEventMap>(type: K, listener: (this: Screen, ev: ScreenEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
@@ -15432,6 +15434,7 @@ type FormDataEntryValue = string | File;
1543215434
type InsertPosition = "beforebegin" | "afterbegin" | "beforeend" | "afterend";
1543315435
type HeadersInit = Headers | string[][] | { [key: string]: string };
1543415436
type AnimationKeyFrame = {offset?: number | null | (number | null)[]} & {[key: string]: string | number | number[] | string[]};
15437+
type OrientationLockType = "any" | "natural" | "portrait" | "landscape" | "portrait-primary" | "portrait-secondary" | "landscape-primary"| "landscape-secondary";
1543515438
type AppendMode = "segments" | "sequence";
1543615439
type AudioContextState = "suspended" | "running" | "closed";
1543715440
type BiquadFilterType = "lowpass" | "highpass" | "bandpass" | "lowshelf" | "highshelf" | "peaking" | "notch" | "allpass";

inputfiles/addedTypes.json

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2980,5 +2980,27 @@
29802980
"signatures": [
29812981
"animate(keyframes: AnimationKeyFrame | AnimationKeyFrame[], options: number | AnimationOptions): Animation"
29822982
]
2983+
},
2984+
{
2985+
"kind": "typedef",
2986+
"flavor": "Web",
2987+
"name": "OrientationLockType",
2988+
"type": "\"any\" | \"natural\" | \"portrait\" | \"landscape\" | \"portrait-primary\" | \"portrait-secondary\" | \"landscape-primary\"| \"landscape-secondary\""
2989+
},
2990+
{
2991+
"kind": "method",
2992+
"name": "lockOrientation",
2993+
"interface": "Screen",
2994+
"signatures": [
2995+
"lockOrientation(orientations: OrientationLockType | OrientationLockType[]): boolean"
2996+
]
2997+
},
2998+
{
2999+
"kind": "method",
3000+
"name": "unlockOrientation",
3001+
"interface": "Screen",
3002+
"signatures": [
3003+
"unlockOrientation(): void"
3004+
]
29833005
}
29843006
]

0 commit comments

Comments
 (0)