ScriptStrategy
When a script runs: beforeInteractive blocks parsing (for code the page needs first), afterInteractive loads asynchronously as soon as possible, lazyOnload loads after the window's load event, from the browser.
When a script runs: beforeInteractive blocks parsing (for code the page needs first), afterInteractive
loads asynchronously as soon as possible, lazyOnload loads after the window's load event, from the browser.
Import#
ts
import type { ScriptStrategy } from "@shadow-js/dusk";
Signature#
ts
type ScriptStrategy = "beforeInteractive" | "afterInteractive" | "lazyOnload"