Skip to main content
Deno 2 is finally here 🎉️
Learn more
Module

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

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

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