PhantomJsCloud Automation API
    Preparing search index...

    Interface JSHandle

    JSHandle represents an in-page JavaScript object.

    The handles pjsc returns (from page.evaluateHandle and the handle members) are documented at JSHandle; members marked "Not available" below are not provided.

    interface JSHandle {
        asElement(): types.ElementHandle<Element>;
        dispose(): Promise<void>;
        executionContext(): any;
        getProperties(): Promise<Map<string, types.JSHandle>>;
        getProperty(propertyName: string): Promise<types.JSHandle>;
        jsonValue(): Promise<any>;
    }

    Hierarchy (View Summary)

    Index
    • Stops referencing the element handle.

      Returns Promise<void>

    • Not available.

      Gets the execution context.

      Returns any

    • Returns a map with property names as keys and JSHandle instances for the property values.

      Returns Promise<Map<string, types.JSHandle>>

    • Fetches a single property from the objectHandle.

      Parameters

      • propertyName: string

        The property to get.

      Returns Promise<types.JSHandle>

    • Returns a JSON representation of the object. The JSON is generated by running JSON.stringify on the object in page and consequent JSON.parse in puppeteer.

      Returns Promise<any>

      The method will throw if the referenced object is not stringifiable.