Skip to main content
The Deno 2 Release Candidate is here
Learn more
Module

x/ogone/src/ogone.dom.d.ts>Notification

Advanced Web Composition for Future
Latest
interface Notification
implements EventTarget
import { type Notification } from "https://deno.land/x/ogone@revb3/src/ogone.dom.d.ts";

This Notifications API export interface is used to configure and display desktop notifications to the user.

Properties

readonly
actions: ReadonlyArray<NotificationAction>
readonly
badge: string
readonly
body: string
readonly
data: any
readonly
icon: string
readonly
image: string
readonly
lang: string
onclick: ((this: Notification, ev: Event) => any) | null
onclose: ((this: Notification, ev: Event) => any) | null
onerror: ((this: Notification, ev: Event) => any) | null
onshow: ((this: Notification, ev: Event) => any) | null
readonly
renotify: boolean
readonly
requireInteraction: boolean
readonly
silent: boolean
readonly
tag: string
readonly
timestamp: number
readonly
title: string
readonly
vibrate: ReadonlyArray<number>

Methods

close(): void
addEventListener<K extends keyof NotificationEventMap>(
type: K,
listener: (this: Notification, ev: NotificationEventMap[K]) => any,
options?: boolean | AddEventListenerOptions,
): void
addEventListener(
type: string,
options?: boolean | AddEventListenerOptions,
): void
removeEventListener<K extends keyof NotificationEventMap>(
type: K,
listener: (this: Notification, ev: NotificationEventMap[K]) => any,
options?: boolean | EventListenerOptions,
): void
removeEventListener(
type: string,
options?: boolean | EventListenerOptions,
): void