Aller au contenu principal

StartPlaygroundOptions

Index

Properties

optionalblueprint

blueprint?: Blueprint

optionalcorsProxy

corsProxy?: string

Proxy URL to use for cross-origin requests.

For example, if corsProxy is set to "https://cors.wordpress.net/proxy.php", then the CORS requests to https://github.com/WordPress/wordpress-playground.git would actually be made to https://cors.wordpress.net/proxy.php?https://github.com/WordPress/wordpress-playground.git.

The Blueprints library will arbitrarily choose which requests to proxy. If you need to proxy every single request, do not use this option. Instead, you should preprocess your Blueprint to replace all cross-origin URLs with the proxy URL.

optionaldisableProgressBar

disableProgressBar?: boolean

iframe

iframe: HTMLIFrameElement

optionalmounts

mounts?: MountDescriptor[]

optionalonBeforeBlueprint

onBeforeBlueprint?: () => Promise<void>

Called before the blueprint steps are run, allows the caller to delay the Blueprint execution once the Playground is booted.

@returns

Type declaration

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

optionalonBlueprintStepCompleted

onBlueprintStepCompleted?: OnStepCompleted

optionalonClientConnected

onClientConnected?: (playground: PlaygroundClient) => void

Called when the playground client is connected, but before the blueprint steps are run.

@returns

Type declaration

optionalprogressTracker

progressTracker?: ProgressTracker

remoteUrl

remoteUrl: string

optionalscope

scope?: string

The string prefix used in the site URL served by the currently running remote.html. E.g. for a prefix like /scope:playground/, the scope would be playground. See the @php-wasm/scopes package for more details.

optionalshouldInstallWordPress

shouldInstallWordPress?: boolean

optionalsqliteDriverVersion

sqliteDriverVersion?: string

The version of the SQLite driver to use. Defaults to the latest development version.