Options
All
  • Public
  • Public/Protected
  • All
Menu

JSHandle represents an in-page JavaScript object.

Hierarchy

Index

Methods

asElement

  • Returns a ElementHandle

    Returns ElementHandle | null

dispose

  • dispose(): Promise<void>
  • Stops referencing the element handle.

    Returns Promise<void>

executionContext

  • executionContext(): any
  • Gets the execution context.

    Returns any

getProperties

  • getProperties(): Promise<Map<string, JSHandle>>
  • Returns a map with property names as keys and JSHandle instances for the property values.

    Returns Promise<Map<string, JSHandle>>

getProperty

  • getProperty(propertyName: string): Promise<JSHandle>
  • Fetches a single property from the objectHandle.

    Parameters

    • propertyName: string

      The property to get.

    Returns Promise<JSHandle>

jsonValue

  • jsonValue(): Promise<any>
  • 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.

    throws

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

    Returns Promise<any>