Skip to main content
This release is 1 version behind 0.0.3 — the latest version of @async/loader. Jump to latest

Built and signed on GitHub Actions

This package works with Browsers
This package works with Browsers
JSR Score
70%
Published
9 months ago (0.0.2)
function createEvent
createEvent<T extends CustomEvent = any>(
eventName: string,
detail?: T["detail"],
): unknown

Set up event listening for browser.

Determine all the browser events and set up global listeners for them. If browser triggers event search for the lazy load URL and import() it.

Type Parameters

T extends CustomEvent = any

Parameters

eventName: string
optional
detail: T["detail"]

Return Type

unknown