mokr.execution.handle.javascript ================================ .. py:module:: mokr.execution.handle.javascript Attributes ---------- .. autoapisummary:: mokr.execution.handle.javascript.LOGGER Classes ------- .. autoapisummary:: mokr.execution.handle.javascript.JavascriptHandle Module Contents --------------- .. py:data:: LOGGER .. py:class:: JavascriptHandle(context: mokr.execution.context.ExecutionContext, client: mokr.connection.DevtoolsConnection, remote_object: dict) Representative of a JavaScript object within the frame. JavascriptHandles are created automatically by `mokr.frame.FrameManager` and `mokr.browser.WebWorker`. :param context: `mokr.execution.ExecutionContext` of the `mokr.frame.FrameManager` that spawned this. :type context: ExecutionContext :param client: Remote connection from parent. :type client: DevtoolsConnection :param remote_object: The raw response from the remote connection representing the object. :type remote_object: dict .. py:property:: execution_context :type: mokr.execution.context.ExecutionContext Get `mokr.execution.ExecutionContext` of this handle. .. py:method:: get_property(property_name: str) -> JavascriptHandle :async: Get a property of the remote object related to this handle. :param property_name: Name of the target property. :type property_name: str :returns: Newly created `JavascriptHandle` from the result. :rtype: JavascriptHandle .. py:method:: get_properties() -> dict[str, JavascriptHandle] :async: Get all properties of the remote object related to this handle. :returns: Dictionary keyed as "property name" to newly created `JavascriptHandle`s from the results. :rtype: dict[str, JavascriptHandle] .. py:method:: json() -> dict :async: Get and JSONify the values of the remote object this handle represents. :returns: Dictionary of JSONified values. :rtype: dict .. py:method:: dispose() -> None :async: Stop referencing this handle. Allows it to be garbage-collected by the browser. .. py:method:: to_string() -> str Get a string representation of the remote object this represents. :returns: String representation of remote object. May contain object data or just the type. :rtype: str