Skip to main content

EmscriptenDownloadMonitor

Monitors the download #progress of Emscripten modules

Usage:

  const downloadMonitor = new EmscriptenDownloadMonitor();
const php = await startPHP(
phpLoaderModule,
'web',
downloadMonitor.phpArgs
);
downloadMonitor.addEventListener('#progress', (e) => {
console.log( e.detail.#progress);
})

Hierarchy

  • EventTarget
    • EmscriptenDownloadMonitor

Index

Constructors

externalconstructor

Methods

expectAssets

  • expectAssets(assets: Record<string, number>): void
  • Parameters

    • assets: Record<string, number>

    Returns void

monitorFetch

  • monitorFetch(fetchPromise: Promise<Response>): Promise<Response>
  • Parameters

    • fetchPromise: Promise<Response>

    Returns Promise<Response>