import { ExecutionContext } from "https://deno.land/x/puppeteer@14.1.1/vendor/puppeteer-core/puppeteer/api-docs-entry.js";
This class represents a context for JavaScript execution. A [Page] might have many execution contexts:
- each frame has "default" execution context that is always created after frame is attached to DOM. This context is returned by the Frame.executionContext method.
- Extension's content scripts create additional execution contexts.
Besides pages, execution contexts can be found in workers.
Constructors
Methods
_adoptBackendNodeId(backendNodeId: Protocol.DOM.BackendNodeId): Promise<ElementHandle>
_adoptElementHandle(elementHandle: ElementHandle): Promise<ElementHandle>
evaluate<ReturnType>(pageFunction: Function | string, ...args: unknown[]): Promise<ReturnType>
evaluateHandle<HandleType extends JSHandle | ElementHandle = JSHandle>(pageFunction: EvaluateHandleFn, ...args: SerializableOrJSHandle[]): Promise<HandleType>
queryObjects(prototypeHandle: JSHandle): Promise<JSHandle>
This method iterates the JavaScript heap and finds all the objects with the given prototype.