Skip to main content
Module

x/evt/lib/types/lib.dom.ts>ScreenOrientation

💧EventEmitter's typesafe replacement
Go to Latest
interface ScreenOrientation
implements EventTarget
import { type ScreenOrientation } from "https://deno.land/x/evt@v2.3.1/lib/types/lib.dom.ts";

Properties

readonly
angle: number
onchange: ((this: ScreenOrientation, ev: Event) => any) | null
readonly
type: OrientationType

Methods

lock(orientation: OrientationLockType): Promise<void>
unlock(): void
addEventListener<K extends keyof ScreenOrientationEventMap>(
type: K,
listener: (this: ScreenOrientation, ev: ScreenOrientationEventMap[K]) => any,
options?: boolean | AddEventListenerOptions,
): void
addEventListener(
type: string,
options?: boolean | AddEventListenerOptions,
): void
removeEventListener<K extends keyof ScreenOrientationEventMap>(
type: K,
listener: (this: ScreenOrientation, ev: ScreenOrientationEventMap[K]) => any,
options?: boolean | EventListenerOptions,
): void
removeEventListener(
type: string,
options?: boolean | EventListenerOptions,
): void