メインコンテンツへスキップ

PlaygroundClient

The Playground Client interface.

Hierarchy

  • RemoteAPI<PlaygroundWorkerEndpoint & WebClientMixin>
    • PlaygroundClient

Index

Properties

addEventListener

addEventListener: any

backfillStaticFilesRemovedFromMinifiedBuild

backfillStaticFilesRemovedFromMinifiedBuild: Remote<() => Promise<void> & () => Promise<void>>

booted

booted: Promise<false> | Promise<true> = false

hasCachedStaticFilesRemovedFromMinifiedBuild

hasCachedStaticFilesRemovedFromMinifiedBuild: Remote<() => Promise<boolean> & () => Promise<boolean>>

isConnected

isConnected: () => Promise<void>

Resolves to true when the remote API is ready for Comlink communication, but not necessarily fully initialized yet.


Type declaration

    • (): Promise<void>
    • Returns Promise<void>

isReady

isReady: () => Promise<void>

Resolves to true when the remote API is declares it's fully loaded and ready to be used.


Type declaration

    • (): Promise<void>
    • Returns Promise<void>

journalFSEvents

journalFSEvents: Remote<(root: string, callback: (op: FilesystemOperation) => void) => Promise<() => any> & (root: string, callback: (op: FilesystemOperation) => void) => Promise<() => any>>

loadedWordPressVersion

loadedWordPressVersion: Promise<string>

A string representing the version of WordPress that was loaded.

onDownloadProgress

onDownloadProgress: any

The onDownloadProgress event listener.

removeEventListener

removeEventListener: any

replayFSJournal

replayFSJournal: Remote<(events: FilesystemOperation[]) => Promise<void> & (events: FilesystemOperation[]) => Promise<void>>

requestedWordPressVersion

requestedWordPressVersion: Promise<string>

A string representing the requested version of WordPress.

scope

scope: Promise<string>

A string representing the scope of the Playground instance.

unmounts

unmounts: Promise<Record<string, () => any>> = {}

Methods

boot

  • boot(...args: [WorkerBootOptions]): Promise<void>
  • Parameters

    • rest...args: [WorkerBootOptions]

    Returns Promise<void>

getCurrentURL

  • getCurrentURL(...args: []): Promise<string>
  • Parameters

    • rest...args: []

    Returns Promise<string>

getMinifiedWordPressVersions

  • getMinifiedWordPressVersions(...args: []): Promise<{ all: { 6.3: string; 6.4: string; 6.5: string; 6.6: string; 6.7: string; 6.8: string; beta: string; nightly: string }; latest: string }>
  • Parameters

    • rest...args: []

    Returns Promise<{ all: { 6.3: string; 6.4: string; 6.5: string; 6.6: string; 6.7: string; 6.8: string; beta: string; nightly: string }; latest: string }>

getWordPressModuleDetails

  • getWordPressModuleDetails(...args: []): Promise<{ majorVersion: string; staticAssetsDirectory: string }>

  • Parameters

    • rest...args: []

    Returns Promise<{ majorVersion: string; staticAssetsDirectory: string }>

    WordPress module details, including the static assets directory and default theme.

goTo

  • goTo(...args: [requestedPath: string]): Promise<void>
  • Parameters

    • rest...args: [requestedPath: string]

    Returns Promise<void>

hasOpfsMount

  • hasOpfsMount(...args: [mountpoint: string]): Promise<false> | Promise<true>
  • Parameters

    • rest...args: [mountpoint: string]

    Returns Promise<false> | Promise<true>

mountOpfs

onMessage

  • onMessage(...args: [listener: any]): Promise<() => Promise<void>>
  • Parameters

    • rest...args: [listener: any]

    Returns Promise<() => Promise<void>>

onNavigation

  • onNavigation(...args: [fn: (url: string) => void]): Promise<void>
  • Parameters

    • rest...args: [fn: (url: string) => void]

    Returns Promise<void>

setIframeSandboxFlags

  • setIframeSandboxFlags(...args: [flags: string[]]): Promise<void>
  • Parameters

    • rest...args: [flags: string[]]

    Returns Promise<void>

setLoaded

  • setLoaded(...args: []): Promise<void>
  • Parameters

    • rest...args: []

    Returns Promise<void>

setProgress

  • setProgress(...args: [options: ProgressBarOptions]): Promise<void>
  • Parameters

    • rest...args: [options: ProgressBarOptions]

    Returns Promise<void>

unmountOpfs

  • unmountOpfs(...args: [mountpoint: string]): Promise<void>
  • Parameters

    • rest...args: [mountpoint: string]

    Returns Promise<void>