Options
All
  • Public
  • Public/Protected
  • All
Menu
deprecated:use

the new Automation API instead. Easier to use and more powerful.

IMPORTANT. Improvements are coming!: the Chrome usage of this feature will be enhanced in the near future to offer more control and automation. If you would like to be notified directly when these improvements occur, please contact Support@PhantomJsCloud.com

properties exposed to your custom scripts via window._pjscMeta

Hierarchy

  • IScriptPjscMeta

Index

Properties

forceFinish

forceFinish: boolean

set to false by default. set to true to force rendering immediately. good for example, when you want to render as soon as domReady happens

manualWait

manualWait: boolean

set to false by default. if true, will delay rendering until you set it back to false. good if you are waiting on an AJAX event.

optionsOverrides

optionsOverrides: { clipRectangle?: IClipOptions }

allows you to override specific IPageRequest options with values you compute in your script (based on the document at runtime)

Type declaration

  • Optional clipRectangle?: IClipOptions

    set the clipRectangle for image rendering. here is an example you can run in your domReady or loadFinished script: _pjscMeta.optionsOverrides.clipRectangle = document.querySelector("h1").getBoundingClientRect();

Optional pageResponse

pageResponse: IPageResponse
deprecated:

For WebKit backend only. (not for Chrome). Scripts can access (readonly) details about the page being loaded via window._pjscMeta.pageResponse See IPageResponse for more details.

scriptOutput

scriptOutput: any

Your scripts can return data to you in the pageResponse.scriptOutput object. You can access this directly via windows._pjscMeta.scriptOutput or your script can simply return a value and it will be set as the scriptOutput (not available on external, url loaded scripts)

scriptsExecuted

scriptsExecuted: number

how many custom scripts have been loaded so far