Browser

Import

TypeScript
import { checkModernBrowser, copy, isMobile, isModernBrowser,} from 'vanilla-jui';

isMobile

Checks whether the current environment is a mobile device.

TypeScript
export function isMobile(): boolean {}

isModernBrowser

Checks whether the current runtime supports the ES2022 capabilities required by modern browsers.

TypeScript
export function isModernBrowser(): boolean {}

copy

Copies text to the clipboard.

TypeScript
/** * Copy text to the clipboard. * * - Prefer the Clipboard API * - Fall back to execCommand * * @param {unknown} text Text to copy. Any type is accepted and safely converted to string internally. * @returns {Promise<boolean>} Whether the copy succeeded. */export async function copy(text: unknown): Promise<boolean> {}
Last updated 2026-09-22 16:24:06 UTC+8