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

x/ayonli_jsext/dialog/index.ts>confirm

A JavaScript extension package for building strong and modern applications.
Latest
function confirm
import { confirm } from "https://deno.land/x/ayonli_jsext@v0.9.72/dialog/index.ts";

Displays a dialog with a message, and to wait until the user either confirms or cancels the dialog.

Examples

Example 1

import { confirm } from "@ayonli/jsext/dialog";

if (await confirm("Are you sure?")) {
    console.log("Confirmed");
} else {
    console.log("Canceled");
}

Parameters

message: string
optional
options: DialogOptions = [UNSUPPORTED]

Returns

Promise<boolean>