Skip to main content
Using Deno in production at your company? Earn free Deno merch.
Give us feedback
Module

x/yxz/typing/lib.dom.ts>Notification

Deno Standard Extensions
Go to Latest
interface Notification
implements EventTarget
import { type Notification } from "https://deno.land/x/yxz@0.17.0/typing/lib.dom.ts";

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

Properties

readonly
body: string
readonly
data: any
readonly
icon: 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
tag: string
readonly
title: string

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