JSHandle

Playwright\JSHandle\JSHandleInterface

Methods

asElement()

?object

Returns the element handle if this is an element, null otherwise.

function asElement(): ?object

dispose()

void

Disposes the handle.

function dispose(): void

evaluate()

mixed

Evaluates expression in the context of the handle.

function evaluate(string $expression, mixed $arg = null): mixed

evaluateHandle()

JSHandleInterface

Evaluates expression in the context of the handle and returns a JSHandle.

function evaluateHandle(string $expression, mixed $arg = null): JSHandleInterface

getProperties()

array

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

function getProperties(): array

getProperty()

JSHandleInterface

Fetches a single property from the referenced object.

function getProperty(string $propertyName): JSHandleInterface

jsonValue()

mixed

Returns a JSON representation of the object.

function jsonValue(): mixed