diff --git a/.gitignore b/.gitignore
index 12ce418..c9cafb1 100644
--- a/.gitignore
+++ b/.gitignore
@@ -12,4 +12,5 @@ __pycache__
/test_*
/*.log
.idea
-.DS_Store
\ No newline at end of file
+.DS_Store
+.claude
\ No newline at end of file
diff --git a/README.md b/README.md
index 8343608..122b715 100644
--- a/README.md
+++ b/README.md
@@ -1,5 +1,5 @@
# Python CDP
-#### Currently supports CDP [r1429850][2].
+#### Currently supports CDP [r1602427][2].
Python CDP Generator (shortened to PyCDP) is a library that provides
Python wrappers for the types, commands, and events specified in the [Chrome
@@ -151,7 +151,7 @@ PyCDP is licensed under the MIT License.
[1]: https://chromedevtools.github.io/devtools-protocol/
-[2]: https://github.com/ChromeDevTools/devtools-protocol/tree/e1bdcc8cda9709838002a1516058ec8b266cbe88
+[2]: https://github.com/ChromeDevTools/devtools-protocol/tree/169ca38d7bea8be83155ffb3062d42d40e60fe14
[3]: docs/getting_started.rst
[4]: https://github.com/hyperiongray/trio-chrome-devtools-protocol
[5]: https://python-poetry.org/docs/
diff --git a/docs/api/audits.rst b/docs/api/audits.rst
index a63bbf5..d75e16f 100644
--- a/docs/api/audits.rst
+++ b/docs/api/audits.rst
@@ -64,6 +64,16 @@ arguments to other commands.
:undoc-members:
:exclude-members: from_json, to_json
+.. autoclass:: PerformanceIssueType
+ :members:
+ :undoc-members:
+ :exclude-members: from_json, to_json
+
+.. autoclass:: PerformanceIssueDetails
+ :members:
+ :undoc-members:
+ :exclude-members: from_json, to_json
+
.. autoclass:: MixedContentResolutionStatus
:members:
:undoc-members:
@@ -129,11 +139,6 @@ arguments to other commands.
:undoc-members:
:exclude-members: from_json, to_json
-.. autoclass:: LowTextContrastIssueDetails
- :members:
- :undoc-members:
- :exclude-members: from_json, to_json
-
.. autoclass:: CorsIssueDetails
:members:
:undoc-members:
@@ -154,6 +159,16 @@ arguments to other commands.
:undoc-members:
:exclude-members: from_json, to_json
+.. autoclass:: UnencodedDigestError
+ :members:
+ :undoc-members:
+ :exclude-members: from_json, to_json
+
+.. autoclass:: ConnectionAllowlistError
+ :members:
+ :undoc-members:
+ :exclude-members: from_json, to_json
+
.. autoclass:: AttributionReportingIssueDetails
:members:
:undoc-members:
@@ -179,6 +194,16 @@ arguments to other commands.
:undoc-members:
:exclude-members: from_json, to_json
+.. autoclass:: UnencodedDigestIssueDetails
+ :members:
+ :undoc-members:
+ :exclude-members: from_json, to_json
+
+.. autoclass:: ConnectionAllowlistIssueDetails
+ :members:
+ :undoc-members:
+ :exclude-members: from_json, to_json
+
.. autoclass:: GenericIssueErrorType
:members:
:undoc-members:
@@ -249,12 +274,12 @@ arguments to other commands.
:undoc-members:
:exclude-members: from_json, to_json
-.. autoclass:: SelectElementAccessibilityIssueReason
+.. autoclass:: ElementAccessibilityIssueReason
:members:
:undoc-members:
:exclude-members: from_json, to_json
-.. autoclass:: SelectElementAccessibilityIssueDetails
+.. autoclass:: ElementAccessibilityIssueDetails
:members:
:undoc-members:
:exclude-members: from_json, to_json
@@ -279,6 +304,31 @@ arguments to other commands.
:undoc-members:
:exclude-members: from_json, to_json
+.. autoclass:: UserReidentificationIssueType
+ :members:
+ :undoc-members:
+ :exclude-members: from_json, to_json
+
+.. autoclass:: UserReidentificationIssueDetails
+ :members:
+ :undoc-members:
+ :exclude-members: from_json, to_json
+
+.. autoclass:: PermissionElementIssueType
+ :members:
+ :undoc-members:
+ :exclude-members: from_json, to_json
+
+.. autoclass:: PermissionElementIssueDetails
+ :members:
+ :undoc-members:
+ :exclude-members: from_json, to_json
+
+.. autoclass:: SelectivePermissionsInterventionIssueDetails
+ :members:
+ :undoc-members:
+ :exclude-members: from_json, to_json
+
.. autoclass:: InspectorIssueCode
:members:
:undoc-members:
@@ -311,8 +361,6 @@ commands, and ``z`` is the return type you should pay attention
to. For more information, see
:ref:`Getting Started: Commands `.
-.. autofunction:: check_contrast
-
.. autofunction:: check_forms_issues
.. autofunction:: disable
diff --git a/docs/api/bluetooth_emulation.rst b/docs/api/bluetooth_emulation.rst
index 765f8e3..0b966bf 100644
--- a/docs/api/bluetooth_emulation.rst
+++ b/docs/api/bluetooth_emulation.rst
@@ -25,6 +25,26 @@ arguments to other commands.
:undoc-members:
:exclude-members: from_json, to_json
+.. autoclass:: GATTOperationType
+ :members:
+ :undoc-members:
+ :exclude-members: from_json, to_json
+
+.. autoclass:: CharacteristicWriteType
+ :members:
+ :undoc-members:
+ :exclude-members: from_json, to_json
+
+.. autoclass:: CharacteristicOperationType
+ :members:
+ :undoc-members:
+ :exclude-members: from_json, to_json
+
+.. autoclass:: DescriptorOperationType
+ :members:
+ :undoc-members:
+ :exclude-members: from_json, to_json
+
.. autoclass:: ManufacturerData
:members:
:undoc-members:
@@ -40,6 +60,11 @@ arguments to other commands.
:undoc-members:
:exclude-members: from_json, to_json
+.. autoclass:: CharacteristicProperties
+ :members:
+ :undoc-members:
+ :exclude-members: from_json, to_json
+
Commands
--------
@@ -52,17 +77,54 @@ commands, and ``z`` is the return type you should pay attention
to. For more information, see
:ref:`Getting Started: Commands `.
+.. autofunction:: add_characteristic
+
+.. autofunction:: add_descriptor
+
+.. autofunction:: add_service
+
.. autofunction:: disable
.. autofunction:: enable
+.. autofunction:: remove_characteristic
+
+.. autofunction:: remove_descriptor
+
+.. autofunction:: remove_service
+
.. autofunction:: set_simulated_central_state
.. autofunction:: simulate_advertisement
+.. autofunction:: simulate_characteristic_operation_response
+
+.. autofunction:: simulate_descriptor_operation_response
+
+.. autofunction:: simulate_gatt_disconnection
+
+.. autofunction:: simulate_gatt_operation_response
+
.. autofunction:: simulate_preconnected_peripheral
Events
------
-*There are no events in this module.*
+Generally, you do not need to instantiate CDP events
+yourself. Instead, the API creates events for you and then
+you use the event's attributes.
+
+.. autoclass:: GattOperationReceived
+ :members:
+ :undoc-members:
+ :exclude-members: from_json, to_json
+
+.. autoclass:: CharacteristicOperationReceived
+ :members:
+ :undoc-members:
+ :exclude-members: from_json, to_json
+
+.. autoclass:: DescriptorOperationReceived
+ :members:
+ :undoc-members:
+ :exclude-members: from_json, to_json
diff --git a/docs/api/browser.rst b/docs/api/browser.rst
index 7d2e12c..ce926f5 100644
--- a/docs/api/browser.rst
+++ b/docs/api/browser.rst
@@ -67,6 +67,11 @@ arguments to other commands.
:undoc-members:
:exclude-members: from_json, to_json
+.. autoclass:: PrivacySandboxAPI
+ :members:
+ :undoc-members:
+ :exclude-members: from_json, to_json
+
Commands
--------
@@ -79,6 +84,8 @@ commands, and ``z`` is the return type you should pay attention
to. For more information, see
:ref:`Getting Started: Commands `.
+.. autofunction:: add_privacy_sandbox_coordinator_key_config
+
.. autofunction:: add_privacy_sandbox_enrollment_override
.. autofunction:: cancel_download
@@ -107,6 +114,8 @@ to. For more information, see
.. autofunction:: reset_permissions
+.. autofunction:: set_contents_size
+
.. autofunction:: set_dock_tile
.. autofunction:: set_download_behavior
diff --git a/docs/api/css.rst b/docs/api/css.rst
index 0c92b6d..d83a57f 100644
--- a/docs/api/css.rst
+++ b/docs/api/css.rst
@@ -24,11 +24,6 @@ yourself. Instead, the API creates objects for you as return
values from commands, and then you can use those objects as
arguments to other commands.
-.. autoclass:: StyleSheetId
- :members:
- :undoc-members:
- :exclude-members: from_json, to_json
-
.. autoclass:: StyleSheetOrigin
:members:
:undoc-members:
@@ -114,6 +109,11 @@ arguments to other commands.
:undoc-members:
:exclude-members: from_json, to_json
+.. autoclass:: ComputedStyleExtraFields
+ :members:
+ :undoc-members:
+ :exclude-members: from_json, to_json
+
.. autoclass:: CSSStyle
:members:
:undoc-members:
@@ -149,6 +149,11 @@ arguments to other commands.
:undoc-members:
:exclude-members: from_json, to_json
+.. autoclass:: CSSNavigation
+ :members:
+ :undoc-members:
+ :exclude-members: from_json, to_json
+
.. autoclass:: CSSScope
:members:
:undoc-members:
@@ -204,7 +209,7 @@ arguments to other commands.
:undoc-members:
:exclude-members: from_json, to_json
-.. autoclass:: CSSFontPaletteValuesRule
+.. autoclass:: CSSAtRule
:members:
:undoc-members:
:exclude-members: from_json, to_json
@@ -276,6 +281,8 @@ to. For more information, see
.. autofunction:: get_computed_style_for_node
+.. autofunction:: get_environment_variables
+
.. autofunction:: get_inline_styles_for_node
.. autofunction:: get_layers_for_node
@@ -304,6 +311,8 @@ to. For more information, see
.. autofunction:: set_media_text
+.. autofunction:: set_navigation_text
+
.. autofunction:: set_property_rule_property_name
.. autofunction:: set_rule_selector
diff --git a/docs/api/dom.rst b/docs/api/dom.rst
index 544e221..c75ec1b 100644
--- a/docs/api/dom.rst
+++ b/docs/api/dom.rst
@@ -33,6 +33,11 @@ arguments to other commands.
:undoc-members:
:exclude-members: from_json, to_json
+.. autoclass:: StyleSheetId
+ :members:
+ :undoc-members:
+ :exclude-members: from_json, to_json
+
.. autoclass:: BackendNode
:members:
:undoc-members:
@@ -134,6 +139,8 @@ to. For more information, see
.. autofunction:: focus
+.. autofunction:: force_show_popover
+
.. autofunction:: get_anchor_element
.. autofunction:: get_attributes
@@ -236,6 +243,11 @@ you use the event's attributes.
:undoc-members:
:exclude-members: from_json, to_json
+.. autoclass:: AdoptedStyleSheetsModified
+ :members:
+ :undoc-members:
+ :exclude-members: from_json, to_json
+
.. autoclass:: AttributeRemoved
:members:
:undoc-members:
@@ -291,6 +303,16 @@ you use the event's attributes.
:undoc-members:
:exclude-members: from_json, to_json
+.. autoclass:: AdRelatedStateUpdated
+ :members:
+ :undoc-members:
+ :exclude-members: from_json, to_json
+
+.. autoclass:: AffectedByStartingStylesFlagUpdated
+ :members:
+ :undoc-members:
+ :exclude-members: from_json, to_json
+
.. autoclass:: PseudoElementRemoved
:members:
:undoc-members:
diff --git a/docs/api/emulation.rst b/docs/api/emulation.rst
index a9578ae..f816ab1 100644
--- a/docs/api/emulation.rst
+++ b/docs/api/emulation.rst
@@ -102,6 +102,21 @@ arguments to other commands.
:undoc-members:
:exclude-members: from_json, to_json
+.. autoclass:: WorkAreaInsets
+ :members:
+ :undoc-members:
+ :exclude-members: from_json, to_json
+
+.. autoclass:: ScreenId
+ :members:
+ :undoc-members:
+ :exclude-members: from_json, to_json
+
+.. autoclass:: ScreenInfo
+ :members:
+ :undoc-members:
+ :exclude-members: from_json, to_json
+
.. autoclass:: DisabledImageType
:members:
:undoc-members:
@@ -119,18 +134,26 @@ commands, and ``z`` is the return type you should pay attention
to. For more information, see
:ref:`Getting Started: Commands `.
+.. autofunction:: add_screen
+
.. autofunction:: can_emulate
.. autofunction:: clear_device_metrics_override
.. autofunction:: clear_device_posture_override
+.. autofunction:: clear_display_features_override
+
.. autofunction:: clear_geolocation_override
.. autofunction:: clear_idle_override
.. autofunction:: get_overridden_sensor_information
+.. autofunction:: get_screen_infos
+
+.. autofunction:: remove_screen
+
.. autofunction:: reset_page_scale_factor
.. autofunction:: set_auto_dark_mode_override
@@ -139,6 +162,8 @@ to. For more information, see
.. autofunction:: set_cpu_throttling_rate
+.. autofunction:: set_data_saver_override
+
.. autofunction:: set_default_background_color_override
.. autofunction:: set_device_metrics_override
@@ -147,12 +172,16 @@ to. For more information, see
.. autofunction:: set_disabled_image_types
+.. autofunction:: set_display_features_override
+
.. autofunction:: set_document_cookie_disabled
.. autofunction:: set_emit_touch_events_for_mouse
.. autofunction:: set_emulated_media
+.. autofunction:: set_emulated_os_text_scale
+
.. autofunction:: set_emulated_vision_deficiency
.. autofunction:: set_focus_emulation_enabled
@@ -169,10 +198,14 @@ to. For more information, see
.. autofunction:: set_page_scale_factor
+.. autofunction:: set_pressure_data_override
+
.. autofunction:: set_pressure_source_override_enabled
.. autofunction:: set_pressure_state_override
+.. autofunction:: set_primary_screen
+
.. autofunction:: set_safe_area_insets_override
.. autofunction:: set_script_execution_disabled
@@ -183,6 +216,8 @@ to. For more information, see
.. autofunction:: set_sensor_override_readings
+.. autofunction:: set_small_viewport_height_difference_override
+
.. autofunction:: set_timezone_override
.. autofunction:: set_touch_emulation_enabled
@@ -193,6 +228,8 @@ to. For more information, see
.. autofunction:: set_visible_size
+.. autofunction:: update_screen
+
Events
------
@@ -204,3 +241,8 @@ you use the event's attributes.
:members:
:undoc-members:
:exclude-members: from_json, to_json
+
+.. autoclass:: ScreenOrientationLockChanged
+ :members:
+ :undoc-members:
+ :exclude-members: from_json, to_json
diff --git a/docs/api/extensions.rst b/docs/api/extensions.rst
index ef7538d..8c55c98 100644
--- a/docs/api/extensions.rst
+++ b/docs/api/extensions.rst
@@ -24,6 +24,11 @@ arguments to other commands.
:undoc-members:
:exclude-members: from_json, to_json
+.. autoclass:: ExtensionInfo
+ :members:
+ :undoc-members:
+ :exclude-members: from_json, to_json
+
Commands
--------
@@ -38,6 +43,8 @@ to. For more information, see
.. autofunction:: clear_storage_items
+.. autofunction:: get_extensions
+
.. autofunction:: get_storage_items
.. autofunction:: load_unpacked
@@ -46,6 +53,8 @@ to. For more information, see
.. autofunction:: set_storage_items
+.. autofunction:: trigger_action
+
.. autofunction:: uninstall
Events
diff --git a/docs/api/inspector.rst b/docs/api/inspector.rst
index cdc2a06..b55628f 100644
--- a/docs/api/inspector.rst
+++ b/docs/api/inspector.rst
@@ -51,3 +51,8 @@ you use the event's attributes.
:members:
:undoc-members:
:exclude-members: from_json, to_json
+
+.. autoclass:: WorkerScriptLoaded
+ :members:
+ :undoc-members:
+ :exclude-members: from_json, to_json
diff --git a/docs/api/media.rst b/docs/api/media.rst
index 30175fd..b2ebd44 100644
--- a/docs/api/media.rst
+++ b/docs/api/media.rst
@@ -1,7 +1,7 @@
Media
=====
-This domain allows detailed inspection of media elements
+This domain allows detailed inspection of media elements.
*This CDP domain is experimental.*
@@ -54,6 +54,11 @@ arguments to other commands.
:undoc-members:
:exclude-members: from_json, to_json
+.. autoclass:: Player
+ :members:
+ :undoc-members:
+ :exclude-members: from_json, to_json
+
Commands
--------
@@ -97,7 +102,7 @@ you use the event's attributes.
:undoc-members:
:exclude-members: from_json, to_json
-.. autoclass:: PlayersCreated
+.. autoclass:: PlayerCreated
:members:
:undoc-members:
:exclude-members: from_json, to_json
diff --git a/docs/api/network.rst b/docs/api/network.rst
index 9e1079f..63502aa 100644
--- a/docs/api/network.rst
+++ b/docs/api/network.rst
@@ -88,6 +88,11 @@ arguments to other commands.
:undoc-members:
:exclude-members: from_json, to_json
+.. autoclass:: RenderBlockingBehavior
+ :members:
+ :undoc-members:
+ :exclude-members: from_json, to_json
+
.. autoclass:: PostDataEntry
:members:
:undoc-members:
@@ -283,6 +288,16 @@ arguments to other commands.
:undoc-members:
:exclude-members: from_json, to_json
+.. autoclass:: NetworkConditions
+ :members:
+ :undoc-members:
+ :exclude-members: from_json, to_json
+
+.. autoclass:: BlockPattern
+ :members:
+ :undoc-members:
+ :exclude-members: from_json, to_json
+
.. autoclass:: DirectSocketDnsQueryType
:members:
:undoc-members:
@@ -293,7 +308,17 @@ arguments to other commands.
:undoc-members:
:exclude-members: from_json, to_json
-.. autoclass:: PrivateNetworkRequestPolicy
+.. autoclass:: DirectUDPSocketOptions
+ :members:
+ :undoc-members:
+ :exclude-members: from_json, to_json
+
+.. autoclass:: DirectUDPMessage
+ :members:
+ :undoc-members:
+ :exclude-members: from_json, to_json
+
+.. autoclass:: LocalNetworkAccessRequestPolicy
:members:
:undoc-members:
:exclude-members: from_json, to_json
@@ -313,6 +338,21 @@ arguments to other commands.
:undoc-members:
:exclude-members: from_json, to_json
+.. autoclass:: AdScriptIdentifier
+ :members:
+ :undoc-members:
+ :exclude-members: from_json, to_json
+
+.. autoclass:: AdAncestry
+ :members:
+ :undoc-members:
+ :exclude-members: from_json, to_json
+
+.. autoclass:: AdProvenance
+ :members:
+ :undoc-members:
+ :exclude-members: from_json, to_json
+
.. autoclass:: CrossOriginOpenerPolicyValue
:members:
:undoc-members:
@@ -368,6 +408,71 @@ arguments to other commands.
:undoc-members:
:exclude-members: from_json, to_json
+.. autoclass:: DeviceBoundSessionKey
+ :members:
+ :undoc-members:
+ :exclude-members: from_json, to_json
+
+.. autoclass:: DeviceBoundSessionWithUsage
+ :members:
+ :undoc-members:
+ :exclude-members: from_json, to_json
+
+.. autoclass:: DeviceBoundSessionCookieCraving
+ :members:
+ :undoc-members:
+ :exclude-members: from_json, to_json
+
+.. autoclass:: DeviceBoundSessionUrlRule
+ :members:
+ :undoc-members:
+ :exclude-members: from_json, to_json
+
+.. autoclass:: DeviceBoundSessionInclusionRules
+ :members:
+ :undoc-members:
+ :exclude-members: from_json, to_json
+
+.. autoclass:: DeviceBoundSession
+ :members:
+ :undoc-members:
+ :exclude-members: from_json, to_json
+
+.. autoclass:: DeviceBoundSessionEventId
+ :members:
+ :undoc-members:
+ :exclude-members: from_json, to_json
+
+.. autoclass:: DeviceBoundSessionFetchResult
+ :members:
+ :undoc-members:
+ :exclude-members: from_json, to_json
+
+.. autoclass:: DeviceBoundSessionFailedRequest
+ :members:
+ :undoc-members:
+ :exclude-members: from_json, to_json
+
+.. autoclass:: CreationEventDetails
+ :members:
+ :undoc-members:
+ :exclude-members: from_json, to_json
+
+.. autoclass:: RefreshEventDetails
+ :members:
+ :undoc-members:
+ :exclude-members: from_json, to_json
+
+.. autoclass:: TerminationEventDetails
+ :members:
+ :undoc-members:
+ :exclude-members: from_json, to_json
+
+.. autoclass:: ChallengeEventDetails
+ :members:
+ :undoc-members:
+ :exclude-members: from_json, to_json
+
.. autoclass:: LoadNetworkResourcePageResult
:members:
:undoc-members:
@@ -402,6 +507,8 @@ to. For more information, see
.. autofunction:: clear_browser_cookies
+.. autofunction:: configure_durable_messages
+
.. autofunction:: continue_intercepted_request
.. autofunction:: delete_cookies
@@ -410,10 +517,16 @@ to. For more information, see
.. autofunction:: emulate_network_conditions
+.. autofunction:: emulate_network_conditions_by_rule
+
.. autofunction:: enable
+.. autofunction:: enable_device_bound_sessions
+
.. autofunction:: enable_reporting_api
+.. autofunction:: fetch_schemeful_site
+
.. autofunction:: get_all_cookies
.. autofunction:: get_certificate
@@ -430,6 +543,8 @@ to. For more information, see
.. autofunction:: load_network_resource
+.. autofunction:: override_network_state
+
.. autofunction:: replay_xhr
.. autofunction:: search_in_response_body
@@ -587,47 +702,77 @@ you use the event's attributes.
:undoc-members:
:exclude-members: from_json, to_json
-.. autoclass:: RequestWillBeSentExtraInfo
+.. autoclass:: DirectTCPSocketChunkSent
:members:
:undoc-members:
:exclude-members: from_json, to_json
-.. autoclass:: ResponseReceivedExtraInfo
+.. autoclass:: DirectTCPSocketChunkReceived
:members:
:undoc-members:
:exclude-members: from_json, to_json
-.. autoclass:: ResponseReceivedEarlyHints
+.. autoclass:: DirectUDPSocketJoinedMulticastGroup
:members:
:undoc-members:
:exclude-members: from_json, to_json
-.. autoclass:: TrustTokenOperationDone
+.. autoclass:: DirectUDPSocketLeftMulticastGroup
:members:
:undoc-members:
:exclude-members: from_json, to_json
-.. autoclass:: PolicyUpdated
+.. autoclass:: DirectUDPSocketCreated
+ :members:
+ :undoc-members:
+ :exclude-members: from_json, to_json
+
+.. autoclass:: DirectUDPSocketOpened
:members:
:undoc-members:
:exclude-members: from_json, to_json
-.. autoclass:: SubresourceWebBundleMetadataReceived
+.. autoclass:: DirectUDPSocketAborted
:members:
:undoc-members:
:exclude-members: from_json, to_json
-.. autoclass:: SubresourceWebBundleMetadataError
+.. autoclass:: DirectUDPSocketClosed
:members:
:undoc-members:
:exclude-members: from_json, to_json
-.. autoclass:: SubresourceWebBundleInnerResponseParsed
+.. autoclass:: DirectUDPSocketChunkSent
:members:
:undoc-members:
:exclude-members: from_json, to_json
-.. autoclass:: SubresourceWebBundleInnerResponseError
+.. autoclass:: DirectUDPSocketChunkReceived
+ :members:
+ :undoc-members:
+ :exclude-members: from_json, to_json
+
+.. autoclass:: RequestWillBeSentExtraInfo
+ :members:
+ :undoc-members:
+ :exclude-members: from_json, to_json
+
+.. autoclass:: ResponseReceivedExtraInfo
+ :members:
+ :undoc-members:
+ :exclude-members: from_json, to_json
+
+.. autoclass:: ResponseReceivedEarlyHints
+ :members:
+ :undoc-members:
+ :exclude-members: from_json, to_json
+
+.. autoclass:: TrustTokenOperationDone
+ :members:
+ :undoc-members:
+ :exclude-members: from_json, to_json
+
+.. autoclass:: PolicyUpdated
:members:
:undoc-members:
:exclude-members: from_json, to_json
@@ -646,3 +791,13 @@ you use the event's attributes.
:members:
:undoc-members:
:exclude-members: from_json, to_json
+
+.. autoclass:: DeviceBoundSessionsAdded
+ :members:
+ :undoc-members:
+ :exclude-members: from_json, to_json
+
+.. autoclass:: DeviceBoundSessionEventOccurred
+ :members:
+ :undoc-members:
+ :exclude-members: from_json, to_json
diff --git a/docs/api/overlay.rst b/docs/api/overlay.rst
index accba4b..0e2da17 100644
--- a/docs/api/overlay.rst
+++ b/docs/api/overlay.rst
@@ -119,6 +119,11 @@ arguments to other commands.
:undoc-members:
:exclude-members: from_json, to_json
+.. autoclass:: InspectedElementAnchorConfig
+ :members:
+ :undoc-members:
+ :exclude-members: from_json, to_json
+
Commands
--------
@@ -173,6 +178,8 @@ to. For more information, see
.. autofunction:: set_show_hit_test_borders
+.. autofunction:: set_show_inspected_element_anchor
+
.. autofunction:: set_show_isolated_elements
.. autofunction:: set_show_layout_shift_regions
@@ -211,6 +218,16 @@ you use the event's attributes.
:undoc-members:
:exclude-members: from_json, to_json
+.. autoclass:: InspectPanelShowRequested
+ :members:
+ :undoc-members:
+ :exclude-members: from_json, to_json
+
+.. autoclass:: InspectedElementWindowRestored
+ :members:
+ :undoc-members:
+ :exclude-members: from_json, to_json
+
.. autoclass:: InspectModeCanceled
:members:
:undoc-members:
diff --git a/docs/api/page.rst b/docs/api/page.rst
index db038b6..f131729 100644
--- a/docs/api/page.rst
+++ b/docs/api/page.rst
@@ -37,11 +37,6 @@ arguments to other commands.
:undoc-members:
:exclude-members: from_json, to_json
-.. autoclass:: AdScriptId
- :members:
- :undoc-members:
- :exclude-members: from_json, to_json
-
.. autoclass:: SecureContextType
:members:
:undoc-members:
@@ -282,11 +277,6 @@ arguments to other commands.
:undoc-members:
:exclude-members: from_json, to_json
-.. autoclass:: AutoResponseMode
- :members:
- :undoc-members:
- :exclude-members: from_json, to_json
-
.. autoclass:: NavigationType
:members:
:undoc-members:
@@ -363,7 +353,9 @@ to. For more information, see
.. autofunction:: generate_test_report
-.. autofunction:: get_ad_script_id
+.. autofunction:: get_ad_script_ancestry
+
+.. autofunction:: get_annotated_page_content
.. autofunction:: get_app_id
diff --git a/docs/api/security.rst b/docs/api/security.rst
index d1c3e74..2a3c24b 100644
--- a/docs/api/security.rst
+++ b/docs/api/security.rst
@@ -1,8 +1,6 @@
Security
========
-Security
-
.. module:: cdp.security
* Types_
diff --git a/docs/api/service_worker.rst b/docs/api/service_worker.rst
index 3ec58a0..0b8568f 100644
--- a/docs/api/service_worker.rst
+++ b/docs/api/service_worker.rst
@@ -69,8 +69,6 @@ to. For more information, see
.. autofunction:: enable
-.. autofunction:: inspect_worker
-
.. autofunction:: set_force_update_on_page_load
.. autofunction:: skip_waiting
diff --git a/docs/api/smart_card_emulation.rst b/docs/api/smart_card_emulation.rst
new file mode 100644
index 0000000..c267299
--- /dev/null
+++ b/docs/api/smart_card_emulation.rst
@@ -0,0 +1,176 @@
+SmartCardEmulation
+==================
+
+*This CDP domain is experimental.*
+
+.. module:: cdp.smart_card_emulation
+
+* Types_
+* Commands_
+* Events_
+
+Types
+-----
+
+Generally, you do not need to instantiate CDP types
+yourself. Instead, the API creates objects for you as return
+values from commands, and then you can use those objects as
+arguments to other commands.
+
+.. autoclass:: ResultCode
+ :members:
+ :undoc-members:
+ :exclude-members: from_json, to_json
+
+.. autoclass:: ShareMode
+ :members:
+ :undoc-members:
+ :exclude-members: from_json, to_json
+
+.. autoclass:: Disposition
+ :members:
+ :undoc-members:
+ :exclude-members: from_json, to_json
+
+.. autoclass:: ConnectionState
+ :members:
+ :undoc-members:
+ :exclude-members: from_json, to_json
+
+.. autoclass:: ReaderStateFlags
+ :members:
+ :undoc-members:
+ :exclude-members: from_json, to_json
+
+.. autoclass:: ProtocolSet
+ :members:
+ :undoc-members:
+ :exclude-members: from_json, to_json
+
+.. autoclass:: Protocol
+ :members:
+ :undoc-members:
+ :exclude-members: from_json, to_json
+
+.. autoclass:: ReaderStateIn
+ :members:
+ :undoc-members:
+ :exclude-members: from_json, to_json
+
+.. autoclass:: ReaderStateOut
+ :members:
+ :undoc-members:
+ :exclude-members: from_json, to_json
+
+Commands
+--------
+
+Each command is a generator function. The return
+type ``Generator[x, y, z]`` indicates that the generator
+*yields* arguments of type ``x``, it must be resumed with
+an argument of type ``y``, and it returns type ``z``. In
+this library, types ``x`` and ``y`` are the same for all
+commands, and ``z`` is the return type you should pay attention
+to. For more information, see
+:ref:`Getting Started: Commands `.
+
+.. autofunction:: disable
+
+.. autofunction:: enable
+
+.. autofunction:: report_begin_transaction_result
+
+.. autofunction:: report_connect_result
+
+.. autofunction:: report_data_result
+
+.. autofunction:: report_error
+
+.. autofunction:: report_establish_context_result
+
+.. autofunction:: report_get_status_change_result
+
+.. autofunction:: report_list_readers_result
+
+.. autofunction:: report_plain_result
+
+.. autofunction:: report_release_context_result
+
+.. autofunction:: report_status_result
+
+Events
+------
+
+Generally, you do not need to instantiate CDP events
+yourself. Instead, the API creates events for you and then
+you use the event's attributes.
+
+.. autoclass:: EstablishContextRequested
+ :members:
+ :undoc-members:
+ :exclude-members: from_json, to_json
+
+.. autoclass:: ReleaseContextRequested
+ :members:
+ :undoc-members:
+ :exclude-members: from_json, to_json
+
+.. autoclass:: ListReadersRequested
+ :members:
+ :undoc-members:
+ :exclude-members: from_json, to_json
+
+.. autoclass:: GetStatusChangeRequested
+ :members:
+ :undoc-members:
+ :exclude-members: from_json, to_json
+
+.. autoclass:: CancelRequested
+ :members:
+ :undoc-members:
+ :exclude-members: from_json, to_json
+
+.. autoclass:: ConnectRequested
+ :members:
+ :undoc-members:
+ :exclude-members: from_json, to_json
+
+.. autoclass:: DisconnectRequested
+ :members:
+ :undoc-members:
+ :exclude-members: from_json, to_json
+
+.. autoclass:: TransmitRequested
+ :members:
+ :undoc-members:
+ :exclude-members: from_json, to_json
+
+.. autoclass:: ControlRequested
+ :members:
+ :undoc-members:
+ :exclude-members: from_json, to_json
+
+.. autoclass:: GetAttribRequested
+ :members:
+ :undoc-members:
+ :exclude-members: from_json, to_json
+
+.. autoclass:: SetAttribRequested
+ :members:
+ :undoc-members:
+ :exclude-members: from_json, to_json
+
+.. autoclass:: StatusRequested
+ :members:
+ :undoc-members:
+ :exclude-members: from_json, to_json
+
+.. autoclass:: BeginTransactionRequested
+ :members:
+ :undoc-members:
+ :exclude-members: from_json, to_json
+
+.. autoclass:: EndTransactionRequested
+ :members:
+ :undoc-members:
+ :exclude-members: from_json, to_json
diff --git a/docs/api/storage.rst b/docs/api/storage.rst
index 4e0dba2..6788ca6 100644
--- a/docs/api/storage.rst
+++ b/docs/api/storage.rst
@@ -57,7 +57,12 @@ arguments to other commands.
:undoc-members:
:exclude-members: from_json, to_json
-.. autoclass:: SharedStorageAccessType
+.. autoclass:: SharedStorageAccessScope
+ :members:
+ :undoc-members:
+ :exclude-members: from_json, to_json
+
+.. autoclass:: SharedStorageAccessMethod
:members:
:undoc-members:
:exclude-members: from_json, to_json
@@ -72,6 +77,11 @@ arguments to other commands.
:undoc-members:
:exclude-members: from_json, to_json
+.. autoclass:: SharedStoragePrivateAggregationConfig
+ :members:
+ :undoc-members:
+ :exclude-members: from_json, to_json
+
.. autoclass:: SharedStorageReportingMetadata
:members:
:undoc-members:
@@ -147,11 +157,6 @@ arguments to other commands.
:undoc-members:
:exclude-members: from_json, to_json
-.. autoclass:: AttributionReportingTriggerSpec
- :members:
- :undoc-members:
- :exclude-members: from_json, to_json
-
.. autoclass:: AttributionReportingTriggerDataMatching
:members:
:undoc-members:
@@ -172,6 +177,11 @@ arguments to other commands.
:undoc-members:
:exclude-members: from_json, to_json
+.. autoclass:: AttributionReportingNamedBudgetDef
+ :members:
+ :undoc-members:
+ :exclude-members: from_json, to_json
+
.. autoclass:: AttributionReportingSourceRegistration
:members:
:undoc-members:
@@ -212,6 +222,11 @@ arguments to other commands.
:undoc-members:
:exclude-members: from_json, to_json
+.. autoclass:: AttributionReportingNamedBudgetCandidate
+ :members:
+ :undoc-members:
+ :exclude-members: from_json, to_json
+
.. autoclass:: AttributionReportingTriggerRegistration
:members:
:undoc-members:
@@ -227,6 +242,11 @@ arguments to other commands.
:undoc-members:
:exclude-members: from_json, to_json
+.. autoclass:: AttributionReportingReportResult
+ :members:
+ :undoc-members:
+ :exclude-members: from_json, to_json
+
.. autoclass:: RelatedWebsiteSet
:members:
:undoc-members:
@@ -270,6 +290,8 @@ to. For more information, see
.. autofunction:: get_shared_storage_metadata
+.. autofunction:: get_storage_key
+
.. autofunction:: get_storage_key_for_frame
.. autofunction:: get_trust_tokens
@@ -294,6 +316,8 @@ to. For more information, see
.. autofunction:: set_interest_group_tracking
+.. autofunction:: set_protected_audience_k_anonymity
+
.. autofunction:: set_shared_storage_entry
.. autofunction:: set_shared_storage_tracking
@@ -363,6 +387,11 @@ you use the event's attributes.
:undoc-members:
:exclude-members: from_json, to_json
+.. autoclass:: SharedStorageWorkletOperationExecutionFinished
+ :members:
+ :undoc-members:
+ :exclude-members: from_json, to_json
+
.. autoclass:: StorageBucketCreatedOrUpdated
:members:
:undoc-members:
@@ -382,3 +411,13 @@ you use the event's attributes.
:members:
:undoc-members:
:exclude-members: from_json, to_json
+
+.. autoclass:: AttributionReportingReportSent
+ :members:
+ :undoc-members:
+ :exclude-members: from_json, to_json
+
+.. autoclass:: AttributionReportingVerboseDebugReportSent
+ :members:
+ :undoc-members:
+ :exclude-members: from_json, to_json
diff --git a/docs/api/system_info.rst b/docs/api/system_info.rst
index 5dbbd7b..ae9e0db 100644
--- a/docs/api/system_info.rst
+++ b/docs/api/system_info.rst
@@ -49,11 +49,6 @@ arguments to other commands.
:undoc-members:
:exclude-members: from_json, to_json
-.. autoclass:: ImageDecodeAcceleratorCapability
- :members:
- :undoc-members:
- :exclude-members: from_json, to_json
-
.. autoclass:: GPUInfo
:members:
:undoc-members:
diff --git a/docs/api/target.rst b/docs/api/target.rst
index 2f3c345..0bef803 100644
--- a/docs/api/target.rst
+++ b/docs/api/target.rst
@@ -86,10 +86,14 @@ to. For more information, see
.. autofunction:: get_browser_contexts
+.. autofunction:: get_dev_tools_target
+
.. autofunction:: get_target_info
.. autofunction:: get_targets
+.. autofunction:: open_dev_tools
+
.. autofunction:: send_message_to_target
.. autofunction:: set_auto_attach
diff --git a/docs/api/tracing.rst b/docs/api/tracing.rst
index ea7a0e5..b56021e 100644
--- a/docs/api/tracing.rst
+++ b/docs/api/tracing.rst
@@ -61,6 +61,8 @@ to. For more information, see
.. autofunction:: get_categories
+.. autofunction:: get_track_event_descriptor
+
.. autofunction:: record_clock_sync_marker
.. autofunction:: request_memory_dump
diff --git a/docs/api/web_mcp.rst b/docs/api/web_mcp.rst
new file mode 100644
index 0000000..327ebc3
--- /dev/null
+++ b/docs/api/web_mcp.rst
@@ -0,0 +1,59 @@
+WebMCP
+======
+
+*This CDP domain is experimental.*
+
+.. module:: cdp.web_mcp
+
+* Types_
+* Commands_
+* Events_
+
+Types
+-----
+
+Generally, you do not need to instantiate CDP types
+yourself. Instead, the API creates objects for you as return
+values from commands, and then you can use those objects as
+arguments to other commands.
+
+.. autoclass:: Annotation
+ :members:
+ :undoc-members:
+ :exclude-members: from_json, to_json
+
+.. autoclass:: Tool
+ :members:
+ :undoc-members:
+ :exclude-members: from_json, to_json
+
+Commands
+--------
+
+Each command is a generator function. The return
+type ``Generator[x, y, z]`` indicates that the generator
+*yields* arguments of type ``x``, it must be resumed with
+an argument of type ``y``, and it returns type ``z``. In
+this library, types ``x`` and ``y`` are the same for all
+commands, and ``z`` is the return type you should pay attention
+to. For more information, see
+:ref:`Getting Started: Commands `.
+
+.. autofunction:: enable
+
+Events
+------
+
+Generally, you do not need to instantiate CDP events
+yourself. Instead, the API creates events for you and then
+you use the event's attributes.
+
+.. autoclass:: ToolsAdded
+ :members:
+ :undoc-members:
+ :exclude-members: from_json, to_json
+
+.. autoclass:: ToolsRemoved
+ :members:
+ :undoc-members:
+ :exclude-members: from_json, to_json
diff --git a/pycdp/cdp/__init__.py b/pycdp/cdp/__init__.py
index 29e56ca..f1bc71e 100644
--- a/pycdp/cdp/__init__.py
+++ b/pycdp/cdp/__init__.py
@@ -3,4 +3,5 @@
# This file is generated from the CDP specification. If you need to make
# changes, edit the generator and regenerate all of the modules.
-from . import (accessibility, animation, audits, autofill, background_service, bluetooth_emulation, browser, css, cache_storage, cast, console, dom, dom_debugger, dom_snapshot, dom_storage, debugger, device_access, device_orientation, emulation, event_breakpoints, extensions, fed_cm, fetch, file_system, headless_experimental, heap_profiler, io, indexed_db, input_, inspector, layer_tree, log, media, memory, network, overlay, pwa, page, performance, performance_timeline, preload, profiler, runtime, schema, security, service_worker, storage, system_info, target, tethering, tracing, web_audio, web_authn)
\ No newline at end of file
+from . import (accessibility, animation, audits, autofill, background_service, bluetooth_emulation, browser, css, cache_storage, cast, console, dom, dom_debugger, dom_snapshot, dom_storage, debugger, device_access, device_orientation, emulation, event_breakpoints, extensions, fed_cm, fetch, file_system, headless_experimental, heap_profiler, io, indexed_db, input_, inspector, layer_tree, log, media, memory, network, overlay, pwa, page, performance, performance_timeline, preload, profiler, runtime, schema, security, service_worker, smart_card_emulation, storage, system_info, target, tethering, tracing, web_audio, web_authn, web_mcp)
+from .util import UnknownEvent, UnknownObject
\ No newline at end of file
diff --git a/pycdp/cdp/accessibility.py b/pycdp/cdp/accessibility.py
index e52c63a..ab16427 100644
--- a/pycdp/cdp/accessibility.py
+++ b/pycdp/cdp/accessibility.py
@@ -267,7 +267,8 @@ class AXPropertyName(enum.Enum):
- from 'live' to 'root': attributes which apply to nodes in live regions
- from 'autocomplete' to 'valuetext': attributes which apply to widgets
- from 'checked' to 'selected': states which apply to widgets
- - from 'activedescendant' to 'owns' - relationships between elements other than parent/child/sibling.
+ - from 'activedescendant' to 'owns': relationships between elements other than parent/child/sibling
+ - from 'activeFullscreenElement' to 'uninteresting': reasons why this noode is hidden
'''
ACTIONS = "actions"
BUSY = "busy"
@@ -310,6 +311,23 @@ class AXPropertyName(enum.Enum):
LABELLEDBY = "labelledby"
OWNS = "owns"
URL = "url"
+ ACTIVE_FULLSCREEN_ELEMENT = "activeFullscreenElement"
+ ACTIVE_MODAL_DIALOG = "activeModalDialog"
+ ACTIVE_ARIA_MODAL_DIALOG = "activeAriaModalDialog"
+ ARIA_HIDDEN_ELEMENT = "ariaHiddenElement"
+ ARIA_HIDDEN_SUBTREE = "ariaHiddenSubtree"
+ EMPTY_ALT = "emptyAlt"
+ EMPTY_TEXT = "emptyText"
+ INERT_ELEMENT = "inertElement"
+ INERT_SUBTREE = "inertSubtree"
+ LABEL_CONTAINER = "labelContainer"
+ LABEL_FOR = "labelFor"
+ NOT_RENDERED = "notRendered"
+ NOT_VISIBLE = "notVisible"
+ PRESENTATIONAL_ROLE = "presentationalRole"
+ PROBABLY_PRESENTATIONAL = "probablyPresentational"
+ INACTIVE_CAROUSEL_TAB_CONTENT = "inactiveCarouselTabContent"
+ UNINTERESTING = "uninteresting"
def to_json(self) -> str:
return self.value
diff --git a/pycdp/cdp/animation.py b/pycdp/cdp/animation.py
index b55c197..bf61384 100644
--- a/pycdp/cdp/animation.py
+++ b/pycdp/cdp/animation.py
@@ -154,9 +154,6 @@ class AnimationEffect:
#: ``AnimationEffect``'s iteration start.
iteration_start: float
- #: ``AnimationEffect``'s iterations.
- iterations: float
-
#: ``AnimationEffect``'s iteration duration.
#: Milliseconds for time based animations and
#: percentage [0 - 100] for scroll driven animations
@@ -172,6 +169,9 @@ class AnimationEffect:
#: ``AnimationEffect``'s timing function.
easing: str
+ #: ``AnimationEffect``'s iterations. Omitted if the value is infinite.
+ iterations: typing.Optional[float] = None
+
#: ``AnimationEffect``'s target node.
backend_node_id: typing.Optional[dom.BackendNodeId] = None
@@ -183,11 +183,12 @@ def to_json(self) -> T_JSON_DICT:
json['delay'] = self.delay
json['endDelay'] = self.end_delay
json['iterationStart'] = self.iteration_start
- json['iterations'] = self.iterations
json['duration'] = self.duration
json['direction'] = self.direction
json['fill'] = self.fill
json['easing'] = self.easing
+ if self.iterations is not None:
+ json['iterations'] = self.iterations
if self.backend_node_id is not None:
json['backendNodeId'] = self.backend_node_id.to_json()
if self.keyframes_rule is not None:
@@ -200,11 +201,11 @@ def from_json(cls, json: T_JSON_DICT) -> AnimationEffect:
delay=float(json['delay']),
end_delay=float(json['endDelay']),
iteration_start=float(json['iterationStart']),
- iterations=float(json['iterations']),
duration=float(json['duration']),
direction=str(json['direction']),
fill=str(json['fill']),
easing=str(json['easing']),
+ iterations=float(json['iterations']) if json.get('iterations', None) is not None else None,
backend_node_id=dom.BackendNodeId.from_json(json['backendNodeId']) if json.get('backendNodeId', None) is not None else None,
keyframes_rule=KeyframesRule.from_json(json['keyframesRule']) if json.get('keyframesRule', None) is not None else None,
)
diff --git a/pycdp/cdp/audits.py b/pycdp/cdp/audits.py
index dd9ecd8..c2008a0 100644
--- a/pycdp/cdp/audits.py
+++ b/pycdp/cdp/audits.py
@@ -94,8 +94,6 @@ class CookieExclusionReason(enum.Enum):
EXCLUDE_SAME_SITE_NONE_INSECURE = "ExcludeSameSiteNoneInsecure"
EXCLUDE_SAME_SITE_LAX = "ExcludeSameSiteLax"
EXCLUDE_SAME_SITE_STRICT = "ExcludeSameSiteStrict"
- EXCLUDE_INVALID_SAME_PARTY = "ExcludeInvalidSameParty"
- EXCLUDE_SAME_PARTY_CROSS_PARTY_CONTEXT = "ExcludeSamePartyCrossPartyContext"
EXCLUDE_DOMAIN_NON_ASCII = "ExcludeDomainNonASCII"
EXCLUDE_THIRD_PARTY_COOKIE_BLOCKED_IN_FIRST_PARTY_SET = "ExcludeThirdPartyCookieBlockedInFirstPartySet"
EXCLUDE_THIRD_PARTY_PHASEOUT = "ExcludeThirdPartyPhaseout"
@@ -253,6 +251,41 @@ def from_json(cls, json: T_JSON_DICT) -> CookieIssueDetails:
)
+class PerformanceIssueType(enum.Enum):
+ DOCUMENT_COOKIE = "DocumentCookie"
+
+ def to_json(self) -> str:
+ return self.value
+
+ @classmethod
+ def from_json(cls, json: str) -> PerformanceIssueType:
+ return cls(json)
+
+
+@dataclass
+class PerformanceIssueDetails:
+ '''
+ Details for a performance issue.
+ '''
+ performance_issue_type: PerformanceIssueType
+
+ source_code_location: typing.Optional[SourceCodeLocation] = None
+
+ def to_json(self) -> T_JSON_DICT:
+ json: T_JSON_DICT = dict()
+ json['performanceIssueType'] = self.performance_issue_type.to_json()
+ if self.source_code_location is not None:
+ json['sourceCodeLocation'] = self.source_code_location.to_json()
+ return json
+
+ @classmethod
+ def from_json(cls, json: T_JSON_DICT) -> PerformanceIssueDetails:
+ return cls(
+ performance_issue_type=PerformanceIssueType.from_json(json['performanceIssueType']),
+ source_code_location=SourceCodeLocation.from_json(json['sourceCodeLocation']) if json.get('sourceCodeLocation', None) is not None else None,
+ )
+
+
class MixedContentResolutionStatus(enum.Enum):
MIXED_CONTENT_BLOCKED = "MixedContentBlocked"
MIXED_CONTENT_AUTOMATICALLY_UPGRADED = "MixedContentAutomaticallyUpgraded"
@@ -595,46 +628,6 @@ def from_json(cls, json: T_JSON_DICT) -> SharedArrayBufferIssueDetails:
)
-@dataclass
-class LowTextContrastIssueDetails:
- violating_node_id: dom.BackendNodeId
-
- violating_node_selector: str
-
- contrast_ratio: float
-
- threshold_aa: float
-
- threshold_aaa: float
-
- font_size: str
-
- font_weight: str
-
- def to_json(self) -> T_JSON_DICT:
- json: T_JSON_DICT = dict()
- json['violatingNodeId'] = self.violating_node_id.to_json()
- json['violatingNodeSelector'] = self.violating_node_selector
- json['contrastRatio'] = self.contrast_ratio
- json['thresholdAA'] = self.threshold_aa
- json['thresholdAAA'] = self.threshold_aaa
- json['fontSize'] = self.font_size
- json['fontWeight'] = self.font_weight
- return json
-
- @classmethod
- def from_json(cls, json: T_JSON_DICT) -> LowTextContrastIssueDetails:
- return cls(
- violating_node_id=dom.BackendNodeId.from_json(json['violatingNodeId']),
- violating_node_selector=str(json['violatingNodeSelector']),
- contrast_ratio=float(json['contrastRatio']),
- threshold_aa=float(json['thresholdAA']),
- threshold_aaa=float(json['thresholdAAA']),
- font_size=str(json['fontSize']),
- font_weight=str(json['fontWeight']),
- )
-
-
@dataclass
class CorsIssueDetails:
'''
@@ -726,8 +719,10 @@ class SharedDictionaryError(enum.Enum):
WRITE_ERROR_INSUFFICIENT_RESOURCES = "WriteErrorInsufficientResources"
WRITE_ERROR_INVALID_MATCH_FIELD = "WriteErrorInvalidMatchField"
WRITE_ERROR_INVALID_STRUCTURED_HEADER = "WriteErrorInvalidStructuredHeader"
+ WRITE_ERROR_INVALID_TTL_FIELD = "WriteErrorInvalidTTLField"
WRITE_ERROR_NAVIGATION_REQUEST = "WriteErrorNavigationRequest"
WRITE_ERROR_NO_MATCH_FIELD = "WriteErrorNoMatchField"
+ WRITE_ERROR_NON_INTEGER_TTL_FIELD = "WriteErrorNonIntegerTTLField"
WRITE_ERROR_NON_LIST_MATCH_DEST_FIELD = "WriteErrorNonListMatchDestField"
WRITE_ERROR_NON_SECURE_CONTEXT = "WriteErrorNonSecureContext"
WRITE_ERROR_NON_STRING_ID_FIELD = "WriteErrorNonStringIdField"
@@ -768,6 +763,7 @@ class SRIMessageSignatureError(enum.Enum):
VALIDATION_FAILED_SIGNATURE_EXPIRED = "ValidationFailedSignatureExpired"
VALIDATION_FAILED_INVALID_LENGTH = "ValidationFailedInvalidLength"
VALIDATION_FAILED_SIGNATURE_MISMATCH = "ValidationFailedSignatureMismatch"
+ VALIDATION_FAILED_INTEGRITY_MISMATCH = "ValidationFailedIntegrityMismatch"
def to_json(self) -> str:
return self.value
@@ -777,6 +773,36 @@ def from_json(cls, json: str) -> SRIMessageSignatureError:
return cls(json)
+class UnencodedDigestError(enum.Enum):
+ MALFORMED_DICTIONARY = "MalformedDictionary"
+ UNKNOWN_ALGORITHM = "UnknownAlgorithm"
+ INCORRECT_DIGEST_TYPE = "IncorrectDigestType"
+ INCORRECT_DIGEST_LENGTH = "IncorrectDigestLength"
+
+ def to_json(self) -> str:
+ return self.value
+
+ @classmethod
+ def from_json(cls, json: str) -> UnencodedDigestError:
+ return cls(json)
+
+
+class ConnectionAllowlistError(enum.Enum):
+ INVALID_HEADER = "InvalidHeader"
+ MORE_THAN_ONE_LIST = "MoreThanOneList"
+ ITEM_NOT_INNER_LIST = "ItemNotInnerList"
+ INVALID_ALLOWLIST_ITEM_TYPE = "InvalidAllowlistItemType"
+ REPORTING_ENDPOINT_NOT_TOKEN = "ReportingEndpointNotToken"
+ INVALID_URL_PATTERN = "InvalidUrlPattern"
+
+ def to_json(self) -> str:
+ return self.value
+
+ @classmethod
+ def from_json(cls, json: str) -> ConnectionAllowlistError:
+ return cls(json)
+
+
@dataclass
class AttributionReportingIssueDetails:
'''
@@ -895,11 +921,17 @@ def from_json(cls, json: T_JSON_DICT) -> SharedDictionaryIssueDetails:
class SRIMessageSignatureIssueDetails:
error: SRIMessageSignatureError
+ signature_base: str
+
+ integrity_assertions: typing.List[str]
+
request: AffectedRequest
def to_json(self) -> T_JSON_DICT:
json: T_JSON_DICT = dict()
json['error'] = self.error.to_json()
+ json['signatureBase'] = self.signature_base
+ json['integrityAssertions'] = [i for i in self.integrity_assertions]
json['request'] = self.request.to_json()
return json
@@ -907,6 +939,48 @@ def to_json(self) -> T_JSON_DICT:
def from_json(cls, json: T_JSON_DICT) -> SRIMessageSignatureIssueDetails:
return cls(
error=SRIMessageSignatureError.from_json(json['error']),
+ signature_base=str(json['signatureBase']),
+ integrity_assertions=[str(i) for i in json['integrityAssertions']],
+ request=AffectedRequest.from_json(json['request']),
+ )
+
+
+@dataclass
+class UnencodedDigestIssueDetails:
+ error: UnencodedDigestError
+
+ request: AffectedRequest
+
+ def to_json(self) -> T_JSON_DICT:
+ json: T_JSON_DICT = dict()
+ json['error'] = self.error.to_json()
+ json['request'] = self.request.to_json()
+ return json
+
+ @classmethod
+ def from_json(cls, json: T_JSON_DICT) -> UnencodedDigestIssueDetails:
+ return cls(
+ error=UnencodedDigestError.from_json(json['error']),
+ request=AffectedRequest.from_json(json['request']),
+ )
+
+
+@dataclass
+class ConnectionAllowlistIssueDetails:
+ error: ConnectionAllowlistError
+
+ request: AffectedRequest
+
+ def to_json(self) -> T_JSON_DICT:
+ json: T_JSON_DICT = dict()
+ json['error'] = self.error.to_json()
+ json['request'] = self.request.to_json()
+ return json
+
+ @classmethod
+ def from_json(cls, json: T_JSON_DICT) -> ConnectionAllowlistIssueDetails:
+ return cls(
+ error=ConnectionAllowlistError.from_json(json['error']),
request=AffectedRequest.from_json(json['request']),
)
@@ -917,12 +991,17 @@ class GenericIssueErrorType(enum.Enum):
FORM_INPUT_WITH_NO_LABEL_ERROR = "FormInputWithNoLabelError"
FORM_AUTOCOMPLETE_ATTRIBUTE_EMPTY_ERROR = "FormAutocompleteAttributeEmptyError"
FORM_EMPTY_ID_AND_NAME_ATTRIBUTES_FOR_INPUT_ERROR = "FormEmptyIdAndNameAttributesForInputError"
- FORM_ARIA_LABELLED_BY_TO_NON_EXISTING_ID = "FormAriaLabelledByToNonExistingId"
+ FORM_ARIA_LABELLED_BY_TO_NON_EXISTING_ID_ERROR = "FormAriaLabelledByToNonExistingIdError"
FORM_INPUT_ASSIGNED_AUTOCOMPLETE_VALUE_TO_ID_OR_NAME_ATTRIBUTE_ERROR = "FormInputAssignedAutocompleteValueToIdOrNameAttributeError"
- FORM_LABEL_HAS_NEITHER_FOR_NOR_NESTED_INPUT = "FormLabelHasNeitherForNorNestedInput"
+ FORM_LABEL_HAS_NEITHER_FOR_NOR_NESTED_INPUT_ERROR = "FormLabelHasNeitherForNorNestedInputError"
FORM_LABEL_FOR_MATCHES_NON_EXISTING_ID_ERROR = "FormLabelForMatchesNonExistingIdError"
FORM_INPUT_HAS_WRONG_BUT_WELL_INTENDED_AUTOCOMPLETE_VALUE_ERROR = "FormInputHasWrongButWellIntendedAutocompleteValueError"
RESPONSE_WAS_BLOCKED_BY_ORB = "ResponseWasBlockedByORB"
+ NAVIGATION_ENTRY_MARKED_SKIPPABLE = "NavigationEntryMarkedSkippable"
+ AUTOFILL_AND_MANUAL_TEXT_POLICY_CONTROLLED_FEATURES_INFO = "AutofillAndManualTextPolicyControlledFeaturesInfo"
+ AUTOFILL_POLICY_CONTROLLED_FEATURE_INFO = "AutofillPolicyControlledFeatureInfo"
+ MANUAL_TEXT_POLICY_CONTROLLED_FEATURE_INFO = "ManualTextPolicyControlledFeatureInfo"
+ FORM_MODEL_CONTEXT_PARAMETER_MISSING_TITLE_AND_DESCRIPTION = "FormModelContextParameterMissingTitleAndDescription"
def to_json(self) -> str:
return self.value
@@ -1108,10 +1187,6 @@ class FederatedAuthRequestIssueReason(enum.Enum):
CONFIG_NO_RESPONSE = "ConfigNoResponse"
CONFIG_INVALID_RESPONSE = "ConfigInvalidResponse"
CONFIG_INVALID_CONTENT_TYPE = "ConfigInvalidContentType"
- CLIENT_METADATA_HTTP_NOT_FOUND = "ClientMetadataHttpNotFound"
- CLIENT_METADATA_NO_RESPONSE = "ClientMetadataNoResponse"
- CLIENT_METADATA_INVALID_RESPONSE = "ClientMetadataInvalidResponse"
- CLIENT_METADATA_INVALID_CONTENT_TYPE = "ClientMetadataInvalidContentType"
IDP_NOT_POTENTIALLY_TRUSTWORTHY = "IdpNotPotentiallyTrustworthy"
DISABLED_IN_SETTINGS = "DisabledInSettings"
DISABLED_IN_FLAGS = "DisabledInFlags"
@@ -1133,15 +1208,14 @@ class FederatedAuthRequestIssueReason(enum.Enum):
CANCELED = "Canceled"
RP_PAGE_NOT_VISIBLE = "RpPageNotVisible"
SILENT_MEDIATION_FAILURE = "SilentMediationFailure"
- THIRD_PARTY_COOKIES_BLOCKED = "ThirdPartyCookiesBlocked"
NOT_SIGNED_IN_WITH_IDP = "NotSignedInWithIdp"
MISSING_TRANSIENT_USER_ACTIVATION = "MissingTransientUserActivation"
REPLACED_BY_ACTIVE_MODE = "ReplacedByActiveMode"
- INVALID_FIELDS_SPECIFIED = "InvalidFieldsSpecified"
RELYING_PARTY_ORIGIN_IS_OPAQUE = "RelyingPartyOriginIsOpaque"
TYPE_NOT_MATCHING = "TypeNotMatching"
UI_DISMISSED_NO_EMBARGO = "UiDismissedNoEmbargo"
CORS_ERROR = "CorsError"
+ SUPPRESSED_BY_SEGMENTATION_PLATFORM = "SuppressedBySegmentationPlatform"
def to_json(self) -> str:
return self.value
@@ -1276,44 +1350,45 @@ def from_json(cls, json: T_JSON_DICT) -> PartitioningBlobURLIssueDetails:
)
-class SelectElementAccessibilityIssueReason(enum.Enum):
+class ElementAccessibilityIssueReason(enum.Enum):
DISALLOWED_SELECT_CHILD = "DisallowedSelectChild"
DISALLOWED_OPT_GROUP_CHILD = "DisallowedOptGroupChild"
NON_PHRASING_CONTENT_OPTION_CHILD = "NonPhrasingContentOptionChild"
INTERACTIVE_CONTENT_OPTION_CHILD = "InteractiveContentOptionChild"
INTERACTIVE_CONTENT_LEGEND_CHILD = "InteractiveContentLegendChild"
+ INTERACTIVE_CONTENT_SUMMARY_DESCENDANT = "InteractiveContentSummaryDescendant"
def to_json(self) -> str:
return self.value
@classmethod
- def from_json(cls, json: str) -> SelectElementAccessibilityIssueReason:
+ def from_json(cls, json: str) -> ElementAccessibilityIssueReason:
return cls(json)
@dataclass
-class SelectElementAccessibilityIssueDetails:
+class ElementAccessibilityIssueDetails:
'''
- This issue warns about errors in the select element content model.
+ This issue warns about errors in the select or summary element content model.
'''
node_id: dom.BackendNodeId
- select_element_accessibility_issue_reason: SelectElementAccessibilityIssueReason
+ element_accessibility_issue_reason: ElementAccessibilityIssueReason
has_disallowed_attributes: bool
def to_json(self) -> T_JSON_DICT:
json: T_JSON_DICT = dict()
json['nodeId'] = self.node_id.to_json()
- json['selectElementAccessibilityIssueReason'] = self.select_element_accessibility_issue_reason.to_json()
+ json['elementAccessibilityIssueReason'] = self.element_accessibility_issue_reason.to_json()
json['hasDisallowedAttributes'] = self.has_disallowed_attributes
return json
@classmethod
- def from_json(cls, json: T_JSON_DICT) -> SelectElementAccessibilityIssueDetails:
+ def from_json(cls, json: T_JSON_DICT) -> ElementAccessibilityIssueDetails:
return cls(
node_id=dom.BackendNodeId.from_json(json['nodeId']),
- select_element_accessibility_issue_reason=SelectElementAccessibilityIssueReason.from_json(json['selectElementAccessibilityIssueReason']),
+ element_accessibility_issue_reason=ElementAccessibilityIssueReason.from_json(json['elementAccessibilityIssueReason']),
has_disallowed_attributes=bool(json['hasDisallowedAttributes']),
)
@@ -1407,6 +1482,176 @@ def from_json(cls, json: T_JSON_DICT) -> PropertyRuleIssueDetails:
)
+class UserReidentificationIssueType(enum.Enum):
+ BLOCKED_FRAME_NAVIGATION = "BlockedFrameNavigation"
+ BLOCKED_SUBRESOURCE = "BlockedSubresource"
+ NOISED_CANVAS_READBACK = "NoisedCanvasReadback"
+
+ def to_json(self) -> str:
+ return self.value
+
+ @classmethod
+ def from_json(cls, json: str) -> UserReidentificationIssueType:
+ return cls(json)
+
+
+@dataclass
+class UserReidentificationIssueDetails:
+ '''
+ This issue warns about uses of APIs that may be considered misuse to
+ re-identify users.
+ '''
+ type_: UserReidentificationIssueType
+
+ #: Applies to BlockedFrameNavigation and BlockedSubresource issue types.
+ request: typing.Optional[AffectedRequest] = None
+
+ #: Applies to NoisedCanvasReadback issue type.
+ source_code_location: typing.Optional[SourceCodeLocation] = None
+
+ def to_json(self) -> T_JSON_DICT:
+ json: T_JSON_DICT = dict()
+ json['type'] = self.type_.to_json()
+ if self.request is not None:
+ json['request'] = self.request.to_json()
+ if self.source_code_location is not None:
+ json['sourceCodeLocation'] = self.source_code_location.to_json()
+ return json
+
+ @classmethod
+ def from_json(cls, json: T_JSON_DICT) -> UserReidentificationIssueDetails:
+ return cls(
+ type_=UserReidentificationIssueType.from_json(json['type']),
+ request=AffectedRequest.from_json(json['request']) if json.get('request', None) is not None else None,
+ source_code_location=SourceCodeLocation.from_json(json['sourceCodeLocation']) if json.get('sourceCodeLocation', None) is not None else None,
+ )
+
+
+class PermissionElementIssueType(enum.Enum):
+ INVALID_TYPE = "InvalidType"
+ FENCED_FRAME_DISALLOWED = "FencedFrameDisallowed"
+ CSP_FRAME_ANCESTORS_MISSING = "CspFrameAncestorsMissing"
+ PERMISSIONS_POLICY_BLOCKED = "PermissionsPolicyBlocked"
+ PADDING_RIGHT_UNSUPPORTED = "PaddingRightUnsupported"
+ PADDING_BOTTOM_UNSUPPORTED = "PaddingBottomUnsupported"
+ INSET_BOX_SHADOW_UNSUPPORTED = "InsetBoxShadowUnsupported"
+ REQUEST_IN_PROGRESS = "RequestInProgress"
+ UNTRUSTED_EVENT = "UntrustedEvent"
+ REGISTRATION_FAILED = "RegistrationFailed"
+ TYPE_NOT_SUPPORTED = "TypeNotSupported"
+ INVALID_TYPE_ACTIVATION = "InvalidTypeActivation"
+ SECURITY_CHECKS_FAILED = "SecurityChecksFailed"
+ ACTIVATION_DISABLED = "ActivationDisabled"
+ GEOLOCATION_DEPRECATED = "GeolocationDeprecated"
+ INVALID_DISPLAY_STYLE = "InvalidDisplayStyle"
+ NON_OPAQUE_COLOR = "NonOpaqueColor"
+ LOW_CONTRAST = "LowContrast"
+ FONT_SIZE_TOO_SMALL = "FontSizeTooSmall"
+ FONT_SIZE_TOO_LARGE = "FontSizeTooLarge"
+ INVALID_SIZE_VALUE = "InvalidSizeValue"
+
+ def to_json(self) -> str:
+ return self.value
+
+ @classmethod
+ def from_json(cls, json: str) -> PermissionElementIssueType:
+ return cls(json)
+
+
+@dataclass
+class PermissionElementIssueDetails:
+ '''
+ This issue warns about improper usage of the element.
+ '''
+ issue_type: PermissionElementIssueType
+
+ #: The value of the type attribute.
+ type_: typing.Optional[str] = None
+
+ #: The node ID of the element.
+ node_id: typing.Optional[dom.BackendNodeId] = None
+
+ #: True if the issue is a warning, false if it is an error.
+ is_warning: typing.Optional[bool] = None
+
+ #: Fields for message construction:
+ #: Used for messages that reference a specific permission name
+ permission_name: typing.Optional[str] = None
+
+ #: Used for messages about occlusion
+ occluder_node_info: typing.Optional[str] = None
+
+ #: Used for messages about occluder's parent
+ occluder_parent_node_info: typing.Optional[str] = None
+
+ #: Used for messages about activation disabled reason
+ disable_reason: typing.Optional[str] = None
+
+ def to_json(self) -> T_JSON_DICT:
+ json: T_JSON_DICT = dict()
+ json['issueType'] = self.issue_type.to_json()
+ if self.type_ is not None:
+ json['type'] = self.type_
+ if self.node_id is not None:
+ json['nodeId'] = self.node_id.to_json()
+ if self.is_warning is not None:
+ json['isWarning'] = self.is_warning
+ if self.permission_name is not None:
+ json['permissionName'] = self.permission_name
+ if self.occluder_node_info is not None:
+ json['occluderNodeInfo'] = self.occluder_node_info
+ if self.occluder_parent_node_info is not None:
+ json['occluderParentNodeInfo'] = self.occluder_parent_node_info
+ if self.disable_reason is not None:
+ json['disableReason'] = self.disable_reason
+ return json
+
+ @classmethod
+ def from_json(cls, json: T_JSON_DICT) -> PermissionElementIssueDetails:
+ return cls(
+ issue_type=PermissionElementIssueType.from_json(json['issueType']),
+ type_=str(json['type']) if json.get('type', None) is not None else None,
+ node_id=dom.BackendNodeId.from_json(json['nodeId']) if json.get('nodeId', None) is not None else None,
+ is_warning=bool(json['isWarning']) if json.get('isWarning', None) is not None else None,
+ permission_name=str(json['permissionName']) if json.get('permissionName', None) is not None else None,
+ occluder_node_info=str(json['occluderNodeInfo']) if json.get('occluderNodeInfo', None) is not None else None,
+ occluder_parent_node_info=str(json['occluderParentNodeInfo']) if json.get('occluderParentNodeInfo', None) is not None else None,
+ disable_reason=str(json['disableReason']) if json.get('disableReason', None) is not None else None,
+ )
+
+
+@dataclass
+class SelectivePermissionsInterventionIssueDetails:
+ '''
+ The issue warns about blocked calls to privacy sensitive APIs via the
+ Selective Permissions Intervention.
+ '''
+ #: Which API was intervened on.
+ api_name: str
+
+ #: Why the ad script using the API is considered an ad.
+ ad_ancestry: network.AdAncestry
+
+ #: The stack trace at the time of the intervention.
+ stack_trace: typing.Optional[runtime.StackTrace] = None
+
+ def to_json(self) -> T_JSON_DICT:
+ json: T_JSON_DICT = dict()
+ json['apiName'] = self.api_name
+ json['adAncestry'] = self.ad_ancestry.to_json()
+ if self.stack_trace is not None:
+ json['stackTrace'] = self.stack_trace.to_json()
+ return json
+
+ @classmethod
+ def from_json(cls, json: T_JSON_DICT) -> SelectivePermissionsInterventionIssueDetails:
+ return cls(
+ api_name=str(json['apiName']),
+ ad_ancestry=network.AdAncestry.from_json(json['adAncestry']),
+ stack_trace=runtime.StackTrace.from_json(json['stackTrace']) if json.get('stackTrace', None) is not None else None,
+ )
+
+
class InspectorIssueCode(enum.Enum):
'''
A unique identifier for the type of issue. Each type may use one of the
@@ -1419,7 +1664,6 @@ class InspectorIssueCode(enum.Enum):
HEAVY_AD_ISSUE = "HeavyAdIssue"
CONTENT_SECURITY_POLICY_ISSUE = "ContentSecurityPolicyIssue"
SHARED_ARRAY_BUFFER_ISSUE = "SharedArrayBufferIssue"
- LOW_TEXT_CONTRAST_ISSUE = "LowTextContrastIssue"
CORS_ISSUE = "CorsIssue"
ATTRIBUTION_REPORTING_ISSUE = "AttributionReportingIssue"
QUIRKS_MODE_ISSUE = "QuirksModeIssue"
@@ -1435,8 +1679,14 @@ class InspectorIssueCode(enum.Enum):
FEDERATED_AUTH_USER_INFO_REQUEST_ISSUE = "FederatedAuthUserInfoRequestIssue"
PROPERTY_RULE_ISSUE = "PropertyRuleIssue"
SHARED_DICTIONARY_ISSUE = "SharedDictionaryIssue"
- SELECT_ELEMENT_ACCESSIBILITY_ISSUE = "SelectElementAccessibilityIssue"
+ ELEMENT_ACCESSIBILITY_ISSUE = "ElementAccessibilityIssue"
SRI_MESSAGE_SIGNATURE_ISSUE = "SRIMessageSignatureIssue"
+ UNENCODED_DIGEST_ISSUE = "UnencodedDigestIssue"
+ CONNECTION_ALLOWLIST_ISSUE = "ConnectionAllowlistIssue"
+ USER_REIDENTIFICATION_ISSUE = "UserReidentificationIssue"
+ PERMISSION_ELEMENT_ISSUE = "PermissionElementIssue"
+ PERFORMANCE_ISSUE = "PerformanceIssue"
+ SELECTIVE_PERMISSIONS_INTERVENTION_ISSUE = "SelectivePermissionsInterventionIssue"
def to_json(self) -> str:
return self.value
@@ -1465,8 +1715,6 @@ class InspectorIssueDetails:
shared_array_buffer_issue_details: typing.Optional[SharedArrayBufferIssueDetails] = None
- low_text_contrast_issue_details: typing.Optional[LowTextContrastIssueDetails] = None
-
cors_issue_details: typing.Optional[CorsIssueDetails] = None
attribution_reporting_issue_details: typing.Optional[AttributionReportingIssueDetails] = None
@@ -1497,10 +1745,22 @@ class InspectorIssueDetails:
shared_dictionary_issue_details: typing.Optional[SharedDictionaryIssueDetails] = None
- select_element_accessibility_issue_details: typing.Optional[SelectElementAccessibilityIssueDetails] = None
+ element_accessibility_issue_details: typing.Optional[ElementAccessibilityIssueDetails] = None
sri_message_signature_issue_details: typing.Optional[SRIMessageSignatureIssueDetails] = None
+ unencoded_digest_issue_details: typing.Optional[UnencodedDigestIssueDetails] = None
+
+ connection_allowlist_issue_details: typing.Optional[ConnectionAllowlistIssueDetails] = None
+
+ user_reidentification_issue_details: typing.Optional[UserReidentificationIssueDetails] = None
+
+ permission_element_issue_details: typing.Optional[PermissionElementIssueDetails] = None
+
+ performance_issue_details: typing.Optional[PerformanceIssueDetails] = None
+
+ selective_permissions_intervention_issue_details: typing.Optional[SelectivePermissionsInterventionIssueDetails] = None
+
def to_json(self) -> T_JSON_DICT:
json: T_JSON_DICT = dict()
if self.cookie_issue_details is not None:
@@ -1515,8 +1775,6 @@ def to_json(self) -> T_JSON_DICT:
json['contentSecurityPolicyIssueDetails'] = self.content_security_policy_issue_details.to_json()
if self.shared_array_buffer_issue_details is not None:
json['sharedArrayBufferIssueDetails'] = self.shared_array_buffer_issue_details.to_json()
- if self.low_text_contrast_issue_details is not None:
- json['lowTextContrastIssueDetails'] = self.low_text_contrast_issue_details.to_json()
if self.cors_issue_details is not None:
json['corsIssueDetails'] = self.cors_issue_details.to_json()
if self.attribution_reporting_issue_details is not None:
@@ -1547,10 +1805,22 @@ def to_json(self) -> T_JSON_DICT:
json['federatedAuthUserInfoRequestIssueDetails'] = self.federated_auth_user_info_request_issue_details.to_json()
if self.shared_dictionary_issue_details is not None:
json['sharedDictionaryIssueDetails'] = self.shared_dictionary_issue_details.to_json()
- if self.select_element_accessibility_issue_details is not None:
- json['selectElementAccessibilityIssueDetails'] = self.select_element_accessibility_issue_details.to_json()
+ if self.element_accessibility_issue_details is not None:
+ json['elementAccessibilityIssueDetails'] = self.element_accessibility_issue_details.to_json()
if self.sri_message_signature_issue_details is not None:
json['sriMessageSignatureIssueDetails'] = self.sri_message_signature_issue_details.to_json()
+ if self.unencoded_digest_issue_details is not None:
+ json['unencodedDigestIssueDetails'] = self.unencoded_digest_issue_details.to_json()
+ if self.connection_allowlist_issue_details is not None:
+ json['connectionAllowlistIssueDetails'] = self.connection_allowlist_issue_details.to_json()
+ if self.user_reidentification_issue_details is not None:
+ json['userReidentificationIssueDetails'] = self.user_reidentification_issue_details.to_json()
+ if self.permission_element_issue_details is not None:
+ json['permissionElementIssueDetails'] = self.permission_element_issue_details.to_json()
+ if self.performance_issue_details is not None:
+ json['performanceIssueDetails'] = self.performance_issue_details.to_json()
+ if self.selective_permissions_intervention_issue_details is not None:
+ json['selectivePermissionsInterventionIssueDetails'] = self.selective_permissions_intervention_issue_details.to_json()
return json
@classmethod
@@ -1562,7 +1832,6 @@ def from_json(cls, json: T_JSON_DICT) -> InspectorIssueDetails:
heavy_ad_issue_details=HeavyAdIssueDetails.from_json(json['heavyAdIssueDetails']) if json.get('heavyAdIssueDetails', None) is not None else None,
content_security_policy_issue_details=ContentSecurityPolicyIssueDetails.from_json(json['contentSecurityPolicyIssueDetails']) if json.get('contentSecurityPolicyIssueDetails', None) is not None else None,
shared_array_buffer_issue_details=SharedArrayBufferIssueDetails.from_json(json['sharedArrayBufferIssueDetails']) if json.get('sharedArrayBufferIssueDetails', None) is not None else None,
- low_text_contrast_issue_details=LowTextContrastIssueDetails.from_json(json['lowTextContrastIssueDetails']) if json.get('lowTextContrastIssueDetails', None) is not None else None,
cors_issue_details=CorsIssueDetails.from_json(json['corsIssueDetails']) if json.get('corsIssueDetails', None) is not None else None,
attribution_reporting_issue_details=AttributionReportingIssueDetails.from_json(json['attributionReportingIssueDetails']) if json.get('attributionReportingIssueDetails', None) is not None else None,
quirks_mode_issue_details=QuirksModeIssueDetails.from_json(json['quirksModeIssueDetails']) if json.get('quirksModeIssueDetails', None) is not None else None,
@@ -1578,8 +1847,14 @@ def from_json(cls, json: T_JSON_DICT) -> InspectorIssueDetails:
property_rule_issue_details=PropertyRuleIssueDetails.from_json(json['propertyRuleIssueDetails']) if json.get('propertyRuleIssueDetails', None) is not None else None,
federated_auth_user_info_request_issue_details=FederatedAuthUserInfoRequestIssueDetails.from_json(json['federatedAuthUserInfoRequestIssueDetails']) if json.get('federatedAuthUserInfoRequestIssueDetails', None) is not None else None,
shared_dictionary_issue_details=SharedDictionaryIssueDetails.from_json(json['sharedDictionaryIssueDetails']) if json.get('sharedDictionaryIssueDetails', None) is not None else None,
- select_element_accessibility_issue_details=SelectElementAccessibilityIssueDetails.from_json(json['selectElementAccessibilityIssueDetails']) if json.get('selectElementAccessibilityIssueDetails', None) is not None else None,
+ element_accessibility_issue_details=ElementAccessibilityIssueDetails.from_json(json['elementAccessibilityIssueDetails']) if json.get('elementAccessibilityIssueDetails', None) is not None else None,
sri_message_signature_issue_details=SRIMessageSignatureIssueDetails.from_json(json['sriMessageSignatureIssueDetails']) if json.get('sriMessageSignatureIssueDetails', None) is not None else None,
+ unencoded_digest_issue_details=UnencodedDigestIssueDetails.from_json(json['unencodedDigestIssueDetails']) if json.get('unencodedDigestIssueDetails', None) is not None else None,
+ connection_allowlist_issue_details=ConnectionAllowlistIssueDetails.from_json(json['connectionAllowlistIssueDetails']) if json.get('connectionAllowlistIssueDetails', None) is not None else None,
+ user_reidentification_issue_details=UserReidentificationIssueDetails.from_json(json['userReidentificationIssueDetails']) if json.get('userReidentificationIssueDetails', None) is not None else None,
+ permission_element_issue_details=PermissionElementIssueDetails.from_json(json['permissionElementIssueDetails']) if json.get('permissionElementIssueDetails', None) is not None else None,
+ performance_issue_details=PerformanceIssueDetails.from_json(json['performanceIssueDetails']) if json.get('performanceIssueDetails', None) is not None else None,
+ selective_permissions_intervention_issue_details=SelectivePermissionsInterventionIssueDetails.from_json(json['selectivePermissionsInterventionIssueDetails']) if json.get('selectivePermissionsInterventionIssueDetails', None) is not None else None,
)
@@ -1689,25 +1964,6 @@ def enable() -> typing.Generator[T_JSON_DICT,T_JSON_DICT,None]:
json = yield cmd_dict
-def check_contrast(
- report_aaa: typing.Optional[bool] = None
- ) -> typing.Generator[T_JSON_DICT,T_JSON_DICT,None]:
- '''
- Runs the contrast check for the target page. Found issues are reported
- using Audits.issueAdded event.
-
- :param report_aaa: *(Optional)* Whether to report WCAG AAA level issues. Default is false.
- '''
- params: T_JSON_DICT = dict()
- if report_aaa is not None:
- params['reportAAA'] = report_aaa
- cmd_dict: T_JSON_DICT = {
- 'method': 'Audits.checkContrast',
- 'params': params,
- }
- json = yield cmd_dict
-
-
def check_forms_issues() -> typing.Generator[T_JSON_DICT,T_JSON_DICT,typing.List[GenericIssueDetails]]:
'''
Runs the form issues check for the target page. Found issues are reported
diff --git a/pycdp/cdp/autofill.py b/pycdp/cdp/autofill.py
index 1355fa4..d8e428e 100644
--- a/pycdp/cdp/autofill.py
+++ b/pycdp/cdp/autofill.py
@@ -55,6 +55,8 @@ def from_json(cls, json: T_JSON_DICT) -> CreditCard:
@dataclass
class AddressField:
#: address field name, for example GIVEN_NAME.
+ #: The full list of supported field names:
+ #: https://source.chromium.org/chromium/chromium/src/+/main:components/autofill/core/browser/field_types.cc;l=38
name: str
#: address field value, for example Jon Doe.
@@ -205,8 +207,9 @@ def from_json(cls, json: T_JSON_DICT) -> FilledField:
def trigger(
field_id: dom.BackendNodeId,
- card: CreditCard,
- frame_id: typing.Optional[page.FrameId] = None
+ frame_id: typing.Optional[page.FrameId] = None,
+ card: typing.Optional[CreditCard] = None,
+ address: typing.Optional[Address] = None
) -> typing.Generator[T_JSON_DICT,T_JSON_DICT,None]:
'''
Trigger autofill on a form identified by the fieldId.
@@ -214,13 +217,17 @@ def trigger(
:param field_id: Identifies a field that serves as an anchor for autofill.
:param frame_id: *(Optional)* Identifies the frame that field belongs to.
- :param card: Credit card information to fill out the form. Credit card data is not saved.
+ :param card: *(Optional)* Credit card information to fill out the form. Credit card data is not saved. Mutually exclusive with ```address````.
+ :param address: *(Optional)* Address to fill out the form. Address data is not saved. Mutually exclusive with ````card```.
'''
params: T_JSON_DICT = dict()
params['fieldId'] = field_id.to_json()
if frame_id is not None:
params['frameId'] = frame_id.to_json()
- params['card'] = card.to_json()
+ if card is not None:
+ params['card'] = card.to_json()
+ if address is not None:
+ params['address'] = address.to_json()
cmd_dict: T_JSON_DICT = {
'method': 'Autofill.trigger',
'params': params,
diff --git a/pycdp/cdp/bluetooth_emulation.py b/pycdp/cdp/bluetooth_emulation.py
index f307f15..1798630 100644
--- a/pycdp/cdp/bluetooth_emulation.py
+++ b/pycdp/cdp/bluetooth_emulation.py
@@ -28,6 +28,69 @@ def from_json(cls, json: str) -> CentralState:
return cls(json)
+class GATTOperationType(enum.Enum):
+ '''
+ Indicates the various types of GATT event.
+ '''
+ CONNECTION = "connection"
+ DISCOVERY = "discovery"
+
+ def to_json(self) -> str:
+ return self.value
+
+ @classmethod
+ def from_json(cls, json: str) -> GATTOperationType:
+ return cls(json)
+
+
+class CharacteristicWriteType(enum.Enum):
+ '''
+ Indicates the various types of characteristic write.
+ '''
+ WRITE_DEFAULT_DEPRECATED = "write-default-deprecated"
+ WRITE_WITH_RESPONSE = "write-with-response"
+ WRITE_WITHOUT_RESPONSE = "write-without-response"
+
+ def to_json(self) -> str:
+ return self.value
+
+ @classmethod
+ def from_json(cls, json: str) -> CharacteristicWriteType:
+ return cls(json)
+
+
+class CharacteristicOperationType(enum.Enum):
+ '''
+ Indicates the various types of characteristic operation.
+ '''
+ READ = "read"
+ WRITE = "write"
+ SUBSCRIBE_TO_NOTIFICATIONS = "subscribe-to-notifications"
+ UNSUBSCRIBE_FROM_NOTIFICATIONS = "unsubscribe-from-notifications"
+
+ def to_json(self) -> str:
+ return self.value
+
+ @classmethod
+ def from_json(cls, json: str) -> CharacteristicOperationType:
+ return cls(json)
+
+
+class DescriptorOperationType(enum.Enum):
+ '''
+ Indicates the various types of descriptor operation.
+ '''
+ READ = "read"
+ WRITE = "write"
+
+ def to_json(self) -> str:
+ return self.value
+
+ @classmethod
+ def from_json(cls, json: str) -> DescriptorOperationType:
+ return cls(json)
+
+
@dataclass
class ManufacturerData:
'''
@@ -126,6 +189,62 @@ def from_json(cls, json: T_JSON_DICT) -> ScanEntry:
)
+@dataclass
+class CharacteristicProperties:
+ '''
+ Describes the properties of a characteristic. This follows Bluetooth Core
+ Specification BT 4.2 Vol 3 Part G 3.3.1. Characteristic Properties.
+ '''
+ broadcast: typing.Optional[bool] = None
+
+ read: typing.Optional[bool] = None
+
+ write_without_response: typing.Optional[bool] = None
+
+ write: typing.Optional[bool] = None
+
+ notify: typing.Optional[bool] = None
+
+ indicate: typing.Optional[bool] = None
+
+ authenticated_signed_writes: typing.Optional[bool] = None
+
+ extended_properties: typing.Optional[bool] = None
+
+ def to_json(self) -> T_JSON_DICT:
+ json: T_JSON_DICT = dict()
+ if self.broadcast is not None:
+ json['broadcast'] = self.broadcast
+ if self.read is not None:
+ json['read'] = self.read
+ if self.write_without_response is not None:
+ json['writeWithoutResponse'] = self.write_without_response
+ if self.write is not None:
+ json['write'] = self.write
+ if self.notify is not None:
+ json['notify'] = self.notify
+ if self.indicate is not None:
+ json['indicate'] = self.indicate
+ if self.authenticated_signed_writes is not None:
+ json['authenticatedSignedWrites'] = self.authenticated_signed_writes
+ if self.extended_properties is not None:
+ json['extendedProperties'] = self.extended_properties
+ return json
+
+ @classmethod
+ def from_json(cls, json: T_JSON_DICT) -> CharacteristicProperties:
+ return cls(
+ broadcast=bool(json['broadcast']) if json.get('broadcast', None) is not None else None,
+ read=bool(json['read']) if json.get('read', None) is not None else None,
+ write_without_response=bool(json['writeWithoutResponse']) if json.get('writeWithoutResponse', None) is not None else None,
+ write=bool(json['write']) if json.get('write', None) is not None else None,
+ notify=bool(json['notify']) if json.get('notify', None) is not None else None,
+ indicate=bool(json['indicate']) if json.get('indicate', None) is not None else None,
+ authenticated_signed_writes=bool(json['authenticatedSignedWrites']) if json.get('authenticatedSignedWrites', None) is not None else None,
+ extended_properties=bool(json['extendedProperties']) if json.get('extendedProperties', None) is not None else None,
+ )
+
+
def enable(
state: CentralState,
le_supported: bool
@@ -216,3 +335,292 @@ def simulate_advertisement(
'params': params,
}
json = yield cmd_dict
+
+
+def simulate_gatt_operation_response(
+ address: str,
+ type_: GATTOperationType,
+ code: int
+ ) -> typing.Generator[T_JSON_DICT,T_JSON_DICT,None]:
+ '''
+ Simulates the response code from the peripheral with ``address`` for a
+ GATT operation of ``type``. The ``code`` value follows the HCI Error Codes from
+ Bluetooth Core Specification Vol 2 Part D 1.3 List Of Error Codes.
+
+ :param address:
+ :param type_:
+ :param code:
+ '''
+ params: T_JSON_DICT = dict()
+ params['address'] = address
+ params['type'] = type_.to_json()
+ params['code'] = code
+ cmd_dict: T_JSON_DICT = {
+ 'method': 'BluetoothEmulation.simulateGATTOperationResponse',
+ 'params': params,
+ }
+ json = yield cmd_dict
+
+
+def simulate_characteristic_operation_response(
+ characteristic_id: str,
+ type_: CharacteristicOperationType,
+ code: int,
+ data: typing.Optional[str] = None
+ ) -> typing.Generator[T_JSON_DICT,T_JSON_DICT,None]:
+ '''
+ Simulates the response from the characteristic with ``characteristicId`` for a
+ characteristic operation of ``type``. The ``code`` value follows the Error
+ Codes from Bluetooth Core Specification Vol 3 Part F 3.4.1.1 Error Response.
+ The ``data`` is expected to exist when simulating a successful read operation
+ response.
+
+ :param characteristic_id:
+ :param type_:
+ :param code:
+ :param data: *(Optional)*
+ '''
+ params: T_JSON_DICT = dict()
+ params['characteristicId'] = characteristic_id
+ params['type'] = type_.to_json()
+ params['code'] = code
+ if data is not None:
+ params['data'] = data
+ cmd_dict: T_JSON_DICT = {
+ 'method': 'BluetoothEmulation.simulateCharacteristicOperationResponse',
+ 'params': params,
+ }
+ json = yield cmd_dict
+
+
+def simulate_descriptor_operation_response(
+ descriptor_id: str,
+ type_: DescriptorOperationType,
+ code: int,
+ data: typing.Optional[str] = None
+ ) -> typing.Generator[T_JSON_DICT,T_JSON_DICT,None]:
+ '''
+ Simulates the response from the descriptor with ``descriptorId`` for a
+ descriptor operation of ``type``. The ``code`` value follows the Error
+ Codes from Bluetooth Core Specification Vol 3 Part F 3.4.1.1 Error Response.
+ The ``data`` is expected to exist when simulating a successful read operation
+ response.
+
+ :param descriptor_id:
+ :param type_:
+ :param code:
+ :param data: *(Optional)*
+ '''
+ params: T_JSON_DICT = dict()
+ params['descriptorId'] = descriptor_id
+ params['type'] = type_.to_json()
+ params['code'] = code
+ if data is not None:
+ params['data'] = data
+ cmd_dict: T_JSON_DICT = {
+ 'method': 'BluetoothEmulation.simulateDescriptorOperationResponse',
+ 'params': params,
+ }
+ json = yield cmd_dict
+
+
+def add_service(
+ address: str,
+ service_uuid: str
+ ) -> typing.Generator[T_JSON_DICT,T_JSON_DICT,str]:
+ '''
+ Adds a service with ``serviceUuid`` to the peripheral with ``address``.
+
+ :param address:
+ :param service_uuid:
+ :returns: An identifier that uniquely represents this service.
+ '''
+ params: T_JSON_DICT = dict()
+ params['address'] = address
+ params['serviceUuid'] = service_uuid
+ cmd_dict: T_JSON_DICT = {
+ 'method': 'BluetoothEmulation.addService',
+ 'params': params,
+ }
+ json = yield cmd_dict
+ return str(json['serviceId'])
+
+
+def remove_service(
+ service_id: str
+ ) -> typing.Generator[T_JSON_DICT,T_JSON_DICT,None]:
+ '''
+ Removes the service respresented by ``serviceId`` from the simulated central.
+
+ :param service_id:
+ '''
+ params: T_JSON_DICT = dict()
+ params['serviceId'] = service_id
+ cmd_dict: T_JSON_DICT = {
+ 'method': 'BluetoothEmulation.removeService',
+ 'params': params,
+ }
+ json = yield cmd_dict
+
+
+def add_characteristic(
+ service_id: str,
+ characteristic_uuid: str,
+ properties: CharacteristicProperties
+ ) -> typing.Generator[T_JSON_DICT,T_JSON_DICT,str]:
+ '''
+ Adds a characteristic with ``characteristicUuid`` and ``properties`` to the
+ service represented by ``serviceId``.
+
+ :param service_id:
+ :param characteristic_uuid:
+ :param properties:
+ :returns: An identifier that uniquely represents this characteristic.
+ '''
+ params: T_JSON_DICT = dict()
+ params['serviceId'] = service_id
+ params['characteristicUuid'] = characteristic_uuid
+ params['properties'] = properties.to_json()
+ cmd_dict: T_JSON_DICT = {
+ 'method': 'BluetoothEmulation.addCharacteristic',
+ 'params': params,
+ }
+ json = yield cmd_dict
+ return str(json['characteristicId'])
+
+
+def remove_characteristic(
+ characteristic_id: str
+ ) -> typing.Generator[T_JSON_DICT,T_JSON_DICT,None]:
+ '''
+ Removes the characteristic respresented by ``characteristicId`` from the
+ simulated central.
+
+ :param characteristic_id:
+ '''
+ params: T_JSON_DICT = dict()
+ params['characteristicId'] = characteristic_id
+ cmd_dict: T_JSON_DICT = {
+ 'method': 'BluetoothEmulation.removeCharacteristic',
+ 'params': params,
+ }
+ json = yield cmd_dict
+
+
+def add_descriptor(
+ characteristic_id: str,
+ descriptor_uuid: str
+ ) -> typing.Generator[T_JSON_DICT,T_JSON_DICT,str]:
+ '''
+ Adds a descriptor with ``descriptorUuid`` to the characteristic respresented
+ by ``characteristicId``.
+
+ :param characteristic_id:
+ :param descriptor_uuid:
+ :returns: An identifier that uniquely represents this descriptor.
+ '''
+ params: T_JSON_DICT = dict()
+ params['characteristicId'] = characteristic_id
+ params['descriptorUuid'] = descriptor_uuid
+ cmd_dict: T_JSON_DICT = {
+ 'method': 'BluetoothEmulation.addDescriptor',
+ 'params': params,
+ }
+ json = yield cmd_dict
+ return str(json['descriptorId'])
+
+
+def remove_descriptor(
+ descriptor_id: str
+ ) -> typing.Generator[T_JSON_DICT,T_JSON_DICT,None]:
+ '''
+ Removes the descriptor with ``descriptorId`` from the simulated central.
+
+ :param descriptor_id:
+ '''
+ params: T_JSON_DICT = dict()
+ params['descriptorId'] = descriptor_id
+ cmd_dict: T_JSON_DICT = {
+ 'method': 'BluetoothEmulation.removeDescriptor',
+ 'params': params,
+ }
+ json = yield cmd_dict
+
+
+def simulate_gatt_disconnection(
+ address: str
+ ) -> typing.Generator[T_JSON_DICT,T_JSON_DICT,None]:
+ '''
+ Simulates a GATT disconnection from the peripheral with ``address``.
+
+ :param address:
+ '''
+ params: T_JSON_DICT = dict()
+ params['address'] = address
+ cmd_dict: T_JSON_DICT = {
+ 'method': 'BluetoothEmulation.simulateGATTDisconnection',
+ 'params': params,
+ }
+ json = yield cmd_dict
+
+
+@event_class('BluetoothEmulation.gattOperationReceived')
+@dataclass
+class GattOperationReceived:
+ '''
+ Event for when a GATT operation of ``type`` to the peripheral with ``address``
+ happened.
+ '''
+ address: str
+ type_: GATTOperationType
+
+ @classmethod
+ def from_json(cls, json: T_JSON_DICT) -> GattOperationReceived:
+ return cls(
+ address=str(json['address']),
+ type_=GATTOperationType.from_json(json['type'])
+ )
+
+
+@event_class('BluetoothEmulation.characteristicOperationReceived')
+@dataclass
+class CharacteristicOperationReceived:
+ '''
+ Event for when a characteristic operation of ``type`` to the characteristic
+ respresented by ``characteristicId`` happened. ``data`` and ``writeType`` is
+ expected to exist when ``type`` is write.
+ '''
+ characteristic_id: str
+ type_: CharacteristicOperationType
+ data: typing.Optional[str]
+ write_type: typing.Optional[CharacteristicWriteType]
+
+ @classmethod
+ def from_json(cls, json: T_JSON_DICT) -> CharacteristicOperationReceived:
+ return cls(
+ characteristic_id=str(json['characteristicId']),
+ type_=CharacteristicOperationType.from_json(json['type']),
+ data=str(json['data']) if json.get('data', None) is not None else None,
+ write_type=CharacteristicWriteType.from_json(json['writeType']) if json.get('writeType', None) is not None else None
+ )
+
+
+@event_class('BluetoothEmulation.descriptorOperationReceived')
+@dataclass
+class DescriptorOperationReceived:
+ '''
+ Event for when a descriptor operation of ``type`` to the descriptor
+ respresented by ``descriptorId`` happened. ``data`` is expected to exist when
+ ``type`` is write.
+ '''
+ descriptor_id: str
+ type_: DescriptorOperationType
+ data: typing.Optional[str]
+
+ @classmethod
+ def from_json(cls, json: T_JSON_DICT) -> DescriptorOperationReceived:
+ return cls(
+ descriptor_id=str(json['descriptorId']),
+ type_=DescriptorOperationType.from_json(json['type']),
+ data=str(json['data']) if json.get('data', None) is not None else None
+ )
diff --git a/pycdp/cdp/browser.py b/pycdp/cdp/browser.py
index 51ab52b..01026df 100644
--- a/pycdp/cdp/browser.py
+++ b/pycdp/cdp/browser.py
@@ -13,6 +13,7 @@
from . import page
from . import target
+from deprecated.sphinx import deprecated # type: ignore
class BrowserContextID(str):
@@ -118,6 +119,9 @@ class PermissionType(enum.Enum):
IDLE_DETECTION = "idleDetection"
KEYBOARD_LOCK = "keyboardLock"
LOCAL_FONTS = "localFonts"
+ LOCAL_NETWORK = "localNetwork"
+ LOCAL_NETWORK_ACCESS = "localNetworkAccess"
+ LOOPBACK_NETWORK = "loopbackNetwork"
MIDI = "midi"
MIDI_SYSEX = "midiSysex"
NFC = "nfc"
@@ -219,6 +223,7 @@ class BrowserCommandId(enum.Enum):
'''
OPEN_TAB_SEARCH = "openTabSearch"
CLOSE_TAB_SEARCH = "closeTabSearch"
+ OPEN_GLIC = "openGlic"
def to_json(self) -> str:
return self.value
@@ -293,20 +298,34 @@ def from_json(cls, json: T_JSON_DICT) -> Histogram:
)
+class PrivacySandboxAPI(enum.Enum):
+ BIDDING_AND_AUCTION_SERVICES = "BiddingAndAuctionServices"
+ TRUSTED_KEY_VALUE = "TrustedKeyValue"
+
+ def to_json(self) -> str:
+ return self.value
+
+ @classmethod
+ def from_json(cls, json: str) -> PrivacySandboxAPI:
+ return cls(json)
+
+
def set_permission(
permission: PermissionDescriptor,
setting: PermissionSetting,
origin: typing.Optional[str] = None,
+ embedded_origin: typing.Optional[str] = None,
browser_context_id: typing.Optional[BrowserContextID] = None
) -> typing.Generator[T_JSON_DICT,T_JSON_DICT,None]:
'''
- Set permission settings for given origin.
+ Set permission settings for given embedding and embedded origins.
**EXPERIMENTAL**
:param permission: Descriptor of permission to override.
:param setting: Setting of the permission.
- :param origin: *(Optional)* Origin the permission applies to, all origins if not specified.
+ :param origin: *(Optional)* Embedding origin the permission applies to, all origins if not specified.
+ :param embedded_origin: *(Optional)* Embedded origin the permission applies to. It is ignored unless the embedding origin is present and valid. If the embedding origin is provided but the embedded origin isn't, the embedding origin is used as the embedded origin.
:param browser_context_id: *(Optional)* Context to override. When omitted, default browser context is used.
'''
params: T_JSON_DICT = dict()
@@ -314,6 +333,8 @@ def set_permission(
params['setting'] = setting.to_json()
if origin is not None:
params['origin'] = origin
+ if embedded_origin is not None:
+ params['embeddedOrigin'] = embedded_origin
if browser_context_id is not None:
params['browserContextId'] = browser_context_id.to_json()
cmd_dict: T_JSON_DICT = {
@@ -323,13 +344,17 @@ def set_permission(
json = yield cmd_dict
+@deprecated(version="1.3")
def grant_permissions(
permissions: typing.List[PermissionType],
origin: typing.Optional[str] = None,
browser_context_id: typing.Optional[BrowserContextID] = None
) -> typing.Generator[T_JSON_DICT,T_JSON_DICT,None]:
'''
- Grant specific permissions to the given origin and reject all others.
+ Grant specific permissions to the given origin and reject all others. Deprecated. Use
+ setPermission instead.
+
+ .. deprecated:: 1.3
**EXPERIMENTAL**
@@ -619,6 +644,33 @@ def set_window_bounds(
json = yield cmd_dict
+def set_contents_size(
+ window_id: WindowID,
+ width: typing.Optional[int] = None,
+ height: typing.Optional[int] = None
+ ) -> typing.Generator[T_JSON_DICT,T_JSON_DICT,None]:
+ '''
+ Set size of the browser contents resizing browser window as necessary.
+
+ **EXPERIMENTAL**
+
+ :param window_id: Browser window id.
+ :param width: *(Optional)* The window contents width in DIP. Assumes current width if omitted. Must be specified if 'height' is omitted.
+ :param height: *(Optional)* The window contents height in DIP. Assumes current height if omitted. Must be specified if 'width' is omitted.
+ '''
+ params: T_JSON_DICT = dict()
+ params['windowId'] = window_id.to_json()
+ if width is not None:
+ params['width'] = width
+ if height is not None:
+ params['height'] = height
+ cmd_dict: T_JSON_DICT = {
+ 'method': 'Browser.setContentsSize',
+ 'params': params,
+ }
+ json = yield cmd_dict
+
+
def set_dock_tile(
badge_label: typing.Optional[str] = None,
image: typing.Optional[str] = None
@@ -680,6 +732,36 @@ def add_privacy_sandbox_enrollment_override(
json = yield cmd_dict
+def add_privacy_sandbox_coordinator_key_config(
+ api: PrivacySandboxAPI,
+ coordinator_origin: str,
+ key_config: str,
+ browser_context_id: typing.Optional[BrowserContextID] = None
+ ) -> typing.Generator[T_JSON_DICT,T_JSON_DICT,None]:
+ '''
+ Configures encryption keys used with a given privacy sandbox API to talk
+ to a trusted coordinator. Since this is intended for test automation only,
+ coordinatorOrigin must be a .test domain. No existing coordinator
+ configuration for the origin may exist.
+
+ :param api:
+ :param coordinator_origin:
+ :param key_config:
+ :param browser_context_id: *(Optional)* BrowserContext to perform the action in. When omitted, default browser context is used.
+ '''
+ params: T_JSON_DICT = dict()
+ params['api'] = api.to_json()
+ params['coordinatorOrigin'] = coordinator_origin
+ params['keyConfig'] = key_config
+ if browser_context_id is not None:
+ params['browserContextId'] = browser_context_id.to_json()
+ cmd_dict: T_JSON_DICT = {
+ 'method': 'Browser.addPrivacySandboxCoordinatorKeyConfig',
+ 'params': params,
+ }
+ json = yield cmd_dict
+
+
@event_class('Browser.downloadWillBegin')
@dataclass
class DownloadWillBegin:
@@ -723,6 +805,10 @@ class DownloadProgress:
received_bytes: float
#: Download status.
state: str
+ #: If download is "completed", provides the path of the downloaded file.
+ #: Depending on the platform, it is not guaranteed to be set, nor the file
+ #: is guaranteed to exist.
+ file_path: typing.Optional[str]
@classmethod
def from_json(cls, json: T_JSON_DICT) -> DownloadProgress:
@@ -730,5 +816,6 @@ def from_json(cls, json: T_JSON_DICT) -> DownloadProgress:
guid=str(json['guid']),
total_bytes=float(json['totalBytes']),
received_bytes=float(json['receivedBytes']),
- state=str(json['state'])
+ state=str(json['state']),
+ file_path=str(json['filePath']) if json.get('filePath', None) is not None else None
)
diff --git a/pycdp/cdp/css.py b/pycdp/cdp/css.py
index 29ca421..8cffcf7 100644
--- a/pycdp/cdp/css.py
+++ b/pycdp/cdp/css.py
@@ -15,18 +15,6 @@
from . import page
-class StyleSheetId(str):
- def to_json(self) -> str:
- return self
-
- @classmethod
- def from_json(cls, json: str) -> StyleSheetId:
- return cls(json)
-
- def __repr__(self):
- return 'StyleSheetId({})'.format(super().__repr__())
-
-
class StyleSheetOrigin(enum.Enum):
'''
Stylesheet type: "injected" for stylesheets injected via extension, "user-agent" for user-agent
@@ -296,7 +284,7 @@ class CSSStyleSheetHeader:
CSS stylesheet metainformation.
'''
#: The stylesheet identifier.
- style_sheet_id: StyleSheetId
+ style_sheet_id: dom.StyleSheetId
#: Owner frame identifier.
frame_id: page.FrameId
@@ -385,7 +373,7 @@ def to_json(self) -> T_JSON_DICT:
@classmethod
def from_json(cls, json: T_JSON_DICT) -> CSSStyleSheetHeader:
return cls(
- style_sheet_id=StyleSheetId.from_json(json['styleSheetId']),
+ style_sheet_id=dom.StyleSheetId.from_json(json['styleSheetId']),
frame_id=page.FrameId.from_json(json['frameId']),
source_url=str(json['sourceURL']),
origin=StyleSheetOrigin.from_json(json['origin']),
@@ -422,11 +410,14 @@ class CSSRule:
#: The css style sheet identifier (absent for user agent stylesheet and user-specified
#: stylesheet rules) this rule came from.
- style_sheet_id: typing.Optional[StyleSheetId] = None
+ style_sheet_id: typing.Optional[dom.StyleSheetId] = None
#: Array of selectors from ancestor style rules, sorted by distance from the current rule.
nesting_selectors: typing.Optional[typing.List[str]] = None
+ #: The BackendNodeId of the DOM node that constitutes the origin tree scope of this rule.
+ origin_tree_scope_node_id: typing.Optional[dom.BackendNodeId] = None
+
#: Media list array (for rules involving media queries). The array enumerates media queries
#: starting with the innermost one, going outwards.
media: typing.Optional[typing.List[CSSMedia]] = None
@@ -454,6 +445,10 @@ class CSSRule:
#: The array enumerates @starting-style at-rules starting with the innermost one, going outwards.
starting_styles: typing.Optional[typing.List[CSSStartingStyle]] = None
+ #: @navigation CSS at-rule array.
+ #: The array enumerates @navigation at-rules starting with the innermost one, going outwards.
+ navigations: typing.Optional[typing.List[CSSNavigation]] = None
+
def to_json(self) -> T_JSON_DICT:
json: T_JSON_DICT = dict()
json['selectorList'] = self.selector_list.to_json()
@@ -463,6 +458,8 @@ def to_json(self) -> T_JSON_DICT:
json['styleSheetId'] = self.style_sheet_id.to_json()
if self.nesting_selectors is not None:
json['nestingSelectors'] = [i for i in self.nesting_selectors]
+ if self.origin_tree_scope_node_id is not None:
+ json['originTreeScopeNodeId'] = self.origin_tree_scope_node_id.to_json()
if self.media is not None:
json['media'] = [i.to_json() for i in self.media]
if self.container_queries is not None:
@@ -477,6 +474,8 @@ def to_json(self) -> T_JSON_DICT:
json['ruleTypes'] = [i.to_json() for i in self.rule_types]
if self.starting_styles is not None:
json['startingStyles'] = [i.to_json() for i in self.starting_styles]
+ if self.navigations is not None:
+ json['navigations'] = [i.to_json() for i in self.navigations]
return json
@classmethod
@@ -485,8 +484,9 @@ def from_json(cls, json: T_JSON_DICT) -> CSSRule:
selector_list=SelectorList.from_json(json['selectorList']),
origin=StyleSheetOrigin.from_json(json['origin']),
style=CSSStyle.from_json(json['style']),
- style_sheet_id=StyleSheetId.from_json(json['styleSheetId']) if json.get('styleSheetId', None) is not None else None,
+ style_sheet_id=dom.StyleSheetId.from_json(json['styleSheetId']) if json.get('styleSheetId', None) is not None else None,
nesting_selectors=[str(i) for i in json['nestingSelectors']] if json.get('nestingSelectors', None) is not None else None,
+ origin_tree_scope_node_id=dom.BackendNodeId.from_json(json['originTreeScopeNodeId']) if json.get('originTreeScopeNodeId', None) is not None else None,
media=[CSSMedia.from_json(i) for i in json['media']] if json.get('media', None) is not None else None,
container_queries=[CSSContainerQuery.from_json(i) for i in json['containerQueries']] if json.get('containerQueries', None) is not None else None,
supports=[CSSSupports.from_json(i) for i in json['supports']] if json.get('supports', None) is not None else None,
@@ -494,6 +494,7 @@ def from_json(cls, json: T_JSON_DICT) -> CSSRule:
scopes=[CSSScope.from_json(i) for i in json['scopes']] if json.get('scopes', None) is not None else None,
rule_types=[CSSRuleType.from_json(i) for i in json['ruleTypes']] if json.get('ruleTypes', None) is not None else None,
starting_styles=[CSSStartingStyle.from_json(i) for i in json['startingStyles']] if json.get('startingStyles', None) is not None else None,
+ navigations=[CSSNavigation.from_json(i) for i in json['navigations']] if json.get('navigations', None) is not None else None,
)
@@ -509,6 +510,7 @@ class CSSRuleType(enum.Enum):
SCOPE_RULE = "ScopeRule"
STYLE_RULE = "StyleRule"
STARTING_STYLE_RULE = "StartingStyleRule"
+ NAVIGATION_RULE = "NavigationRule"
def to_json(self) -> str:
return self.value
@@ -525,7 +527,7 @@ class RuleUsage:
'''
#: The css style sheet identifier (absent for user agent stylesheet and user-specified
#: stylesheet rules) this rule came from.
- style_sheet_id: StyleSheetId
+ style_sheet_id: dom.StyleSheetId
#: Offset of the start of the rule (including selector) from the beginning of the stylesheet.
start_offset: float
@@ -547,7 +549,7 @@ def to_json(self) -> T_JSON_DICT:
@classmethod
def from_json(cls, json: T_JSON_DICT) -> RuleUsage:
return cls(
- style_sheet_id=StyleSheetId.from_json(json['styleSheetId']),
+ style_sheet_id=dom.StyleSheetId.from_json(json['styleSheetId']),
start_offset=float(json['startOffset']),
end_offset=float(json['endOffset']),
used=bool(json['used']),
@@ -639,6 +641,25 @@ def from_json(cls, json: T_JSON_DICT) -> CSSComputedStyleProperty:
)
+@dataclass
+class ComputedStyleExtraFields:
+ #: Returns whether or not this node is being rendered with base appearance,
+ #: which happens when it has its appearance property set to base/base-select
+ #: or it is in the subtree of an element being rendered with base appearance.
+ is_appearance_base: bool
+
+ def to_json(self) -> T_JSON_DICT:
+ json: T_JSON_DICT = dict()
+ json['isAppearanceBase'] = self.is_appearance_base
+ return json
+
+ @classmethod
+ def from_json(cls, json: T_JSON_DICT) -> ComputedStyleExtraFields:
+ return cls(
+ is_appearance_base=bool(json['isAppearanceBase']),
+ )
+
+
@dataclass
class CSSStyle:
'''
@@ -652,7 +673,7 @@ class CSSStyle:
#: The css style sheet identifier (absent for user agent stylesheet and user-specified
#: stylesheet rules) this rule came from.
- style_sheet_id: typing.Optional[StyleSheetId] = None
+ style_sheet_id: typing.Optional[dom.StyleSheetId] = None
#: Style declaration text (if available).
css_text: typing.Optional[str] = None
@@ -677,7 +698,7 @@ def from_json(cls, json: T_JSON_DICT) -> CSSStyle:
return cls(
css_properties=[CSSProperty.from_json(i) for i in json['cssProperties']],
shorthand_entries=[ShorthandEntry.from_json(i) for i in json['shorthandEntries']],
- style_sheet_id=StyleSheetId.from_json(json['styleSheetId']) if json.get('styleSheetId', None) is not None else None,
+ style_sheet_id=dom.StyleSheetId.from_json(json['styleSheetId']) if json.get('styleSheetId', None) is not None else None,
css_text=str(json['cssText']) if json.get('cssText', None) is not None else None,
range_=SourceRange.from_json(json['range']) if json.get('range', None) is not None else None,
)
@@ -773,7 +794,7 @@ class CSSMedia:
range_: typing.Optional[SourceRange] = None
#: Identifier of the stylesheet containing this object (if exists).
- style_sheet_id: typing.Optional[StyleSheetId] = None
+ style_sheet_id: typing.Optional[dom.StyleSheetId] = None
#: Array of media queries.
media_list: typing.Optional[typing.List[MediaQuery]] = None
@@ -799,7 +820,7 @@ def from_json(cls, json: T_JSON_DICT) -> CSSMedia:
source=str(json['source']),
source_url=str(json['sourceURL']) if json.get('sourceURL', None) is not None else None,
range_=SourceRange.from_json(json['range']) if json.get('range', None) is not None else None,
- style_sheet_id=StyleSheetId.from_json(json['styleSheetId']) if json.get('styleSheetId', None) is not None else None,
+ style_sheet_id=dom.StyleSheetId.from_json(json['styleSheetId']) if json.get('styleSheetId', None) is not None else None,
media_list=[MediaQuery.from_json(i) for i in json['mediaList']] if json.get('mediaList', None) is not None else None,
)
@@ -884,7 +905,7 @@ class CSSContainerQuery:
range_: typing.Optional[SourceRange] = None
#: Identifier of the stylesheet containing this object (if exists).
- style_sheet_id: typing.Optional[StyleSheetId] = None
+ style_sheet_id: typing.Optional[dom.StyleSheetId] = None
#: Optional name for the container.
name: typing.Optional[str] = None
@@ -898,6 +919,9 @@ class CSSContainerQuery:
#: true if the query contains scroll-state() queries.
queries_scroll_state: typing.Optional[bool] = None
+ #: true if the query contains anchored() queries.
+ queries_anchored: typing.Optional[bool] = None
+
def to_json(self) -> T_JSON_DICT:
json: T_JSON_DICT = dict()
json['text'] = self.text
@@ -913,6 +937,8 @@ def to_json(self) -> T_JSON_DICT:
json['logicalAxes'] = self.logical_axes.to_json()
if self.queries_scroll_state is not None:
json['queriesScrollState'] = self.queries_scroll_state
+ if self.queries_anchored is not None:
+ json['queriesAnchored'] = self.queries_anchored
return json
@classmethod
@@ -920,11 +946,12 @@ def from_json(cls, json: T_JSON_DICT) -> CSSContainerQuery:
return cls(
text=str(json['text']),
range_=SourceRange.from_json(json['range']) if json.get('range', None) is not None else None,
- style_sheet_id=StyleSheetId.from_json(json['styleSheetId']) if json.get('styleSheetId', None) is not None else None,
+ style_sheet_id=dom.StyleSheetId.from_json(json['styleSheetId']) if json.get('styleSheetId', None) is not None else None,
name=str(json['name']) if json.get('name', None) is not None else None,
physical_axes=dom.PhysicalAxes.from_json(json['physicalAxes']) if json.get('physicalAxes', None) is not None else None,
logical_axes=dom.LogicalAxes.from_json(json['logicalAxes']) if json.get('logicalAxes', None) is not None else None,
queries_scroll_state=bool(json['queriesScrollState']) if json.get('queriesScrollState', None) is not None else None,
+ queries_anchored=bool(json['queriesAnchored']) if json.get('queriesAnchored', None) is not None else None,
)
@@ -944,7 +971,7 @@ class CSSSupports:
range_: typing.Optional[SourceRange] = None
#: Identifier of the stylesheet containing this object (if exists).
- style_sheet_id: typing.Optional[StyleSheetId] = None
+ style_sheet_id: typing.Optional[dom.StyleSheetId] = None
def to_json(self) -> T_JSON_DICT:
json: T_JSON_DICT = dict()
@@ -962,7 +989,46 @@ def from_json(cls, json: T_JSON_DICT) -> CSSSupports:
text=str(json['text']),
active=bool(json['active']),
range_=SourceRange.from_json(json['range']) if json.get('range', None) is not None else None,
- style_sheet_id=StyleSheetId.from_json(json['styleSheetId']) if json.get('styleSheetId', None) is not None else None,
+ style_sheet_id=dom.StyleSheetId.from_json(json['styleSheetId']) if json.get('styleSheetId', None) is not None else None,
+ )
+
+
+@dataclass
+class CSSNavigation:
+ '''
+ CSS Navigation at-rule descriptor.
+ '''
+ #: Navigation rule text.
+ text: str
+
+ #: Whether the navigation condition is satisfied.
+ active: typing.Optional[bool] = None
+
+ #: The associated rule header range in the enclosing stylesheet (if
+ #: available).
+ range_: typing.Optional[SourceRange] = None
+
+ #: Identifier of the stylesheet containing this object (if exists).
+ style_sheet_id: typing.Optional[dom.StyleSheetId] = None
+
+ def to_json(self) -> T_JSON_DICT:
+ json: T_JSON_DICT = dict()
+ json['text'] = self.text
+ if self.active is not None:
+ json['active'] = self.active
+ if self.range_ is not None:
+ json['range'] = self.range_.to_json()
+ if self.style_sheet_id is not None:
+ json['styleSheetId'] = self.style_sheet_id.to_json()
+ return json
+
+ @classmethod
+ def from_json(cls, json: T_JSON_DICT) -> CSSNavigation:
+ return cls(
+ text=str(json['text']),
+ active=bool(json['active']) if json.get('active', None) is not None else None,
+ range_=SourceRange.from_json(json['range']) if json.get('range', None) is not None else None,
+ style_sheet_id=dom.StyleSheetId.from_json(json['styleSheetId']) if json.get('styleSheetId', None) is not None else None,
)
@@ -979,7 +1045,7 @@ class CSSScope:
range_: typing.Optional[SourceRange] = None
#: Identifier of the stylesheet containing this object (if exists).
- style_sheet_id: typing.Optional[StyleSheetId] = None
+ style_sheet_id: typing.Optional[dom.StyleSheetId] = None
def to_json(self) -> T_JSON_DICT:
json: T_JSON_DICT = dict()
@@ -995,7 +1061,7 @@ def from_json(cls, json: T_JSON_DICT) -> CSSScope:
return cls(
text=str(json['text']),
range_=SourceRange.from_json(json['range']) if json.get('range', None) is not None else None,
- style_sheet_id=StyleSheetId.from_json(json['styleSheetId']) if json.get('styleSheetId', None) is not None else None,
+ style_sheet_id=dom.StyleSheetId.from_json(json['styleSheetId']) if json.get('styleSheetId', None) is not None else None,
)
@@ -1012,7 +1078,7 @@ class CSSLayer:
range_: typing.Optional[SourceRange] = None
#: Identifier of the stylesheet containing this object (if exists).
- style_sheet_id: typing.Optional[StyleSheetId] = None
+ style_sheet_id: typing.Optional[dom.StyleSheetId] = None
def to_json(self) -> T_JSON_DICT:
json: T_JSON_DICT = dict()
@@ -1028,7 +1094,7 @@ def from_json(cls, json: T_JSON_DICT) -> CSSLayer:
return cls(
text=str(json['text']),
range_=SourceRange.from_json(json['range']) if json.get('range', None) is not None else None,
- style_sheet_id=StyleSheetId.from_json(json['styleSheetId']) if json.get('styleSheetId', None) is not None else None,
+ style_sheet_id=dom.StyleSheetId.from_json(json['styleSheetId']) if json.get('styleSheetId', None) is not None else None,
)
@@ -1042,7 +1108,7 @@ class CSSStartingStyle:
range_: typing.Optional[SourceRange] = None
#: Identifier of the stylesheet containing this object (if exists).
- style_sheet_id: typing.Optional[StyleSheetId] = None
+ style_sheet_id: typing.Optional[dom.StyleSheetId] = None
def to_json(self) -> T_JSON_DICT:
json: T_JSON_DICT = dict()
@@ -1056,7 +1122,7 @@ def to_json(self) -> T_JSON_DICT:
def from_json(cls, json: T_JSON_DICT) -> CSSStartingStyle:
return cls(
range_=SourceRange.from_json(json['range']) if json.get('range', None) is not None else None,
- style_sheet_id=StyleSheetId.from_json(json['styleSheetId']) if json.get('styleSheetId', None) is not None else None,
+ style_sheet_id=dom.StyleSheetId.from_json(json['styleSheetId']) if json.get('styleSheetId', None) is not None else None,
)
@@ -1247,7 +1313,7 @@ class CSSTryRule:
#: The css style sheet identifier (absent for user agent stylesheet and user-specified
#: stylesheet rules) this rule came from.
- style_sheet_id: typing.Optional[StyleSheetId] = None
+ style_sheet_id: typing.Optional[dom.StyleSheetId] = None
def to_json(self) -> T_JSON_DICT:
json: T_JSON_DICT = dict()
@@ -1262,7 +1328,7 @@ def from_json(cls, json: T_JSON_DICT) -> CSSTryRule:
return cls(
origin=StyleSheetOrigin.from_json(json['origin']),
style=CSSStyle.from_json(json['style']),
- style_sheet_id=StyleSheetId.from_json(json['styleSheetId']) if json.get('styleSheetId', None) is not None else None,
+ style_sheet_id=dom.StyleSheetId.from_json(json['styleSheetId']) if json.get('styleSheetId', None) is not None else None,
)
@@ -1284,7 +1350,7 @@ class CSSPositionTryRule:
#: The css style sheet identifier (absent for user agent stylesheet and user-specified
#: stylesheet rules) this rule came from.
- style_sheet_id: typing.Optional[StyleSheetId] = None
+ style_sheet_id: typing.Optional[dom.StyleSheetId] = None
def to_json(self) -> T_JSON_DICT:
json: T_JSON_DICT = dict()
@@ -1303,7 +1369,7 @@ def from_json(cls, json: T_JSON_DICT) -> CSSPositionTryRule:
origin=StyleSheetOrigin.from_json(json['origin']),
style=CSSStyle.from_json(json['style']),
active=bool(json['active']),
- style_sheet_id=StyleSheetId.from_json(json['styleSheetId']) if json.get('styleSheetId', None) is not None else None,
+ style_sheet_id=dom.StyleSheetId.from_json(json['styleSheetId']) if json.get('styleSheetId', None) is not None else None,
)
@@ -1365,39 +1431,52 @@ def from_json(cls, json: T_JSON_DICT) -> CSSPropertyRegistration:
@dataclass
-class CSSFontPaletteValuesRule:
+class CSSAtRule:
'''
- CSS font-palette-values rule representation.
+ CSS generic @rule representation.
'''
+ #: Type of at-rule.
+ type_: str
+
#: Parent stylesheet's origin.
origin: StyleSheetOrigin
- #: Associated font palette name.
- font_palette_name: Value
-
#: Associated style declaration.
style: CSSStyle
+ #: Subsection of font-feature-values, if this is a subsection.
+ subsection: typing.Optional[str] = None
+
+ #: LINT.ThenChange(//third_party/blink/renderer/core/inspector/inspector_style_sheet.cc:FontVariantAlternatesFeatureType,//third_party/blink/renderer/core/inspector/inspector_css_agent.cc:FontVariantAlternatesFeatureType)
+ #: Associated name, if applicable.
+ name: typing.Optional[Value] = None
+
#: The css style sheet identifier (absent for user agent stylesheet and user-specified
#: stylesheet rules) this rule came from.
- style_sheet_id: typing.Optional[StyleSheetId] = None
+ style_sheet_id: typing.Optional[dom.StyleSheetId] = None
def to_json(self) -> T_JSON_DICT:
json: T_JSON_DICT = dict()
+ json['type'] = self.type_
json['origin'] = self.origin.to_json()
- json['fontPaletteName'] = self.font_palette_name.to_json()
json['style'] = self.style.to_json()
+ if self.subsection is not None:
+ json['subsection'] = self.subsection
+ if self.name is not None:
+ json['name'] = self.name.to_json()
if self.style_sheet_id is not None:
json['styleSheetId'] = self.style_sheet_id.to_json()
return json
@classmethod
- def from_json(cls, json: T_JSON_DICT) -> CSSFontPaletteValuesRule:
+ def from_json(cls, json: T_JSON_DICT) -> CSSAtRule:
return cls(
+ type_=str(json['type']),
origin=StyleSheetOrigin.from_json(json['origin']),
- font_palette_name=Value.from_json(json['fontPaletteName']),
style=CSSStyle.from_json(json['style']),
- style_sheet_id=StyleSheetId.from_json(json['styleSheetId']) if json.get('styleSheetId', None) is not None else None,
+ subsection=str(json['subsection']) if json.get('subsection', None) is not None else None,
+ name=Value.from_json(json['name']) if json.get('name', None) is not None else None,
+ style_sheet_id=dom.StyleSheetId.from_json(json['styleSheetId']) if json.get('styleSheetId', None) is not None else None,
)
@@ -1417,7 +1496,7 @@ class CSSPropertyRule:
#: The css style sheet identifier (absent for user agent stylesheet and user-specified
#: stylesheet rules) this rule came from.
- style_sheet_id: typing.Optional[StyleSheetId] = None
+ style_sheet_id: typing.Optional[dom.StyleSheetId] = None
def to_json(self) -> T_JSON_DICT:
json: T_JSON_DICT = dict()
@@ -1434,7 +1513,7 @@ def from_json(cls, json: T_JSON_DICT) -> CSSPropertyRule:
origin=StyleSheetOrigin.from_json(json['origin']),
property_name=Value.from_json(json['propertyName']),
style=CSSStyle.from_json(json['style']),
- style_sheet_id=StyleSheetId.from_json(json['styleSheetId']) if json.get('styleSheetId', None) is not None else None,
+ style_sheet_id=dom.StyleSheetId.from_json(json['styleSheetId']) if json.get('styleSheetId', None) is not None else None,
)
@@ -1483,6 +1562,9 @@ class CSSFunctionConditionNode:
#: @supports CSS at-rule condition. Only one type of condition should be set.
supports: typing.Optional[CSSSupports] = None
+ #: @navigation condition. Only one type of condition should be set.
+ navigation: typing.Optional[CSSNavigation] = None
+
def to_json(self) -> T_JSON_DICT:
json: T_JSON_DICT = dict()
json['children'] = [i.to_json() for i in self.children]
@@ -1493,6 +1575,8 @@ def to_json(self) -> T_JSON_DICT:
json['containerQueries'] = self.container_queries.to_json()
if self.supports is not None:
json['supports'] = self.supports.to_json()
+ if self.navigation is not None:
+ json['navigation'] = self.navigation.to_json()
return json
@classmethod
@@ -1503,6 +1587,7 @@ def from_json(cls, json: T_JSON_DICT) -> CSSFunctionConditionNode:
media=CSSMedia.from_json(json['media']) if json.get('media', None) is not None else None,
container_queries=CSSContainerQuery.from_json(json['containerQueries']) if json.get('containerQueries', None) is not None else None,
supports=CSSSupports.from_json(json['supports']) if json.get('supports', None) is not None else None,
+ navigation=CSSNavigation.from_json(json['navigation']) if json.get('navigation', None) is not None else None,
)
@@ -1552,7 +1637,10 @@ class CSSFunctionRule:
#: The css style sheet identifier (absent for user agent stylesheet and user-specified
#: stylesheet rules) this rule came from.
- style_sheet_id: typing.Optional[StyleSheetId] = None
+ style_sheet_id: typing.Optional[dom.StyleSheetId] = None
+
+ #: The BackendNodeId of the DOM node that constitutes the origin tree scope of this rule.
+ origin_tree_scope_node_id: typing.Optional[dom.BackendNodeId] = None
def to_json(self) -> T_JSON_DICT:
json: T_JSON_DICT = dict()
@@ -1562,6 +1650,8 @@ def to_json(self) -> T_JSON_DICT:
json['children'] = [i.to_json() for i in self.children]
if self.style_sheet_id is not None:
json['styleSheetId'] = self.style_sheet_id.to_json()
+ if self.origin_tree_scope_node_id is not None:
+ json['originTreeScopeNodeId'] = self.origin_tree_scope_node_id.to_json()
return json
@classmethod
@@ -1571,7 +1661,8 @@ def from_json(cls, json: T_JSON_DICT) -> CSSFunctionRule:
origin=StyleSheetOrigin.from_json(json['origin']),
parameters=[CSSFunctionParameter.from_json(i) for i in json['parameters']],
children=[CSSFunctionNode.from_json(i) for i in json['children']],
- style_sheet_id=StyleSheetId.from_json(json['styleSheetId']) if json.get('styleSheetId', None) is not None else None,
+ style_sheet_id=dom.StyleSheetId.from_json(json['styleSheetId']) if json.get('styleSheetId', None) is not None else None,
+ origin_tree_scope_node_id=dom.BackendNodeId.from_json(json['originTreeScopeNodeId']) if json.get('originTreeScopeNodeId', None) is not None else None,
)
@@ -1591,7 +1682,7 @@ class CSSKeyframeRule:
#: The css style sheet identifier (absent for user agent stylesheet and user-specified
#: stylesheet rules) this rule came from.
- style_sheet_id: typing.Optional[StyleSheetId] = None
+ style_sheet_id: typing.Optional[dom.StyleSheetId] = None
def to_json(self) -> T_JSON_DICT:
json: T_JSON_DICT = dict()
@@ -1608,7 +1699,7 @@ def from_json(cls, json: T_JSON_DICT) -> CSSKeyframeRule:
origin=StyleSheetOrigin.from_json(json['origin']),
key_text=Value.from_json(json['keyText']),
style=CSSStyle.from_json(json['style']),
- style_sheet_id=StyleSheetId.from_json(json['styleSheetId']) if json.get('styleSheetId', None) is not None else None,
+ style_sheet_id=dom.StyleSheetId.from_json(json['styleSheetId']) if json.get('styleSheetId', None) is not None else None,
)
@@ -1618,7 +1709,7 @@ class StyleDeclarationEdit:
A descriptor of operation to mutate style declaration text.
'''
#: The css style sheet identifier.
- style_sheet_id: StyleSheetId
+ style_sheet_id: dom.StyleSheetId
#: The range of the style text in the enclosing stylesheet.
range_: SourceRange
@@ -1636,14 +1727,14 @@ def to_json(self) -> T_JSON_DICT:
@classmethod
def from_json(cls, json: T_JSON_DICT) -> StyleDeclarationEdit:
return cls(
- style_sheet_id=StyleSheetId.from_json(json['styleSheetId']),
+ style_sheet_id=dom.StyleSheetId.from_json(json['styleSheetId']),
range_=SourceRange.from_json(json['range']),
text=str(json['text']),
)
def add_rule(
- style_sheet_id: StyleSheetId,
+ style_sheet_id: dom.StyleSheetId,
rule_text: str,
location: SourceRange,
node_for_property_syntax_validation: typing.Optional[dom.NodeId] = None
@@ -1673,7 +1764,7 @@ def add_rule(
def collect_class_names(
- style_sheet_id: StyleSheetId
+ style_sheet_id: dom.StyleSheetId
) -> typing.Generator[T_JSON_DICT,T_JSON_DICT,typing.List[str]]:
'''
Returns all class names from specified stylesheet.
@@ -1694,7 +1785,7 @@ def collect_class_names(
def create_style_sheet(
frame_id: page.FrameId,
force: typing.Optional[bool] = None
- ) -> typing.Generator[T_JSON_DICT,T_JSON_DICT,StyleSheetId]:
+ ) -> typing.Generator[T_JSON_DICT,T_JSON_DICT,dom.StyleSheetId]:
'''
Creates a new special "via-inspector" stylesheet in the frame with given ``frameId``.
@@ -1711,7 +1802,7 @@ def create_style_sheet(
'params': params,
}
json = yield cmd_dict
- return StyleSheetId.from_json(json['styleSheetId'])
+ return dom.StyleSheetId.from_json(json['styleSheetId'])
def disable() -> typing.Generator[T_JSON_DICT,T_JSON_DICT,None]:
@@ -1803,12 +1894,15 @@ def get_background_colors(
def get_computed_style_for_node(
node_id: dom.NodeId
- ) -> typing.Generator[T_JSON_DICT,T_JSON_DICT,typing.List[CSSComputedStyleProperty]]:
+ ) -> typing.Generator[T_JSON_DICT,T_JSON_DICT,typing.Tuple[typing.List[CSSComputedStyleProperty], ComputedStyleExtraFields]]:
'''
Returns the computed style for a DOM node identified by ``nodeId``.
:param node_id:
- :returns: Computed style for the specified DOM node.
+ :returns: A tuple with the following items:
+
+ 0. **computedStyle** - Computed style for the specified DOM node.
+ 1. **extraFields** - A list of non-standard "extra fields" which blink stores alongside each computed style.
'''
params: T_JSON_DICT = dict()
params['nodeId'] = node_id.to_json()
@@ -1817,7 +1911,10 @@ def get_computed_style_for_node(
'params': params,
}
json = yield cmd_dict
- return [CSSComputedStyleProperty.from_json(i) for i in json['computedStyle']]
+ return (
+ [CSSComputedStyleProperty.from_json(i) for i in json['computedStyle']],
+ ComputedStyleExtraFields.from_json(json['extraFields'])
+ )
def resolve_values(
@@ -1832,12 +1929,21 @@ def resolve_values(
For example, a value of '1em' is evaluated according to the computed
'font-size' of the element and a value 'calc(1px + 2px)' will be
resolved to '3px'.
+ If the ``propertyName`` was specified the ``values`` are resolved as if
+ they were property's declaration. If a value cannot be parsed according
+ to the provided property syntax, the value is parsed using combined
+ syntax as if null ``propertyName`` was provided. If the value cannot be
+ resolved even then, return the provided value without any changes.
+ Note: this function currently does not resolve CSS random() function,
+ it returns unmodified random() function parts.`
- :param values: Substitution functions (var()/env()/attr()) and cascade-dependent keywords (revert/revert-layer) do not work.
+ **EXPERIMENTAL**
+
+ :param values: Cascade-dependent keywords (revert/revert-layer) do not work.
:param node_id: Id of the node in whose context the expression is evaluated
:param property_name: *(Optional)* Only longhands and custom property names are accepted.
- :param pseudo_type: **(EXPERIMENTAL)** *(Optional)* Pseudo element type, only works for pseudo elements that generate elements in the tree, such as ::before and ::after.
- :param pseudo_identifier: **(EXPERIMENTAL)** *(Optional)* Pseudo element custom ident.
+ :param pseudo_type: *(Optional)* Pseudo element type, only works for pseudo elements that generate elements in the tree, such as ::before and ::after.
+ :param pseudo_identifier: *(Optional)* Pseudo element custom ident.
:returns:
'''
params: T_JSON_DICT = dict()
@@ -1939,7 +2045,7 @@ def get_animated_styles_for_node(
def get_matched_styles_for_node(
node_id: dom.NodeId
- ) -> typing.Generator[T_JSON_DICT,T_JSON_DICT,typing.Tuple[typing.Optional[CSSStyle], typing.Optional[CSSStyle], typing.Optional[typing.List[RuleMatch]], typing.Optional[typing.List[PseudoElementMatches]], typing.Optional[typing.List[InheritedStyleEntry]], typing.Optional[typing.List[InheritedPseudoElementMatches]], typing.Optional[typing.List[CSSKeyframesRule]], typing.Optional[typing.List[CSSPositionTryRule]], typing.Optional[int], typing.Optional[typing.List[CSSPropertyRule]], typing.Optional[typing.List[CSSPropertyRegistration]], typing.Optional[CSSFontPaletteValuesRule], typing.Optional[dom.NodeId], typing.Optional[typing.List[CSSFunctionRule]]]]:
+ ) -> typing.Generator[T_JSON_DICT,T_JSON_DICT,typing.Tuple[typing.Optional[CSSStyle], typing.Optional[CSSStyle], typing.Optional[typing.List[RuleMatch]], typing.Optional[typing.List[PseudoElementMatches]], typing.Optional[typing.List[InheritedStyleEntry]], typing.Optional[typing.List[InheritedPseudoElementMatches]], typing.Optional[typing.List[CSSKeyframesRule]], typing.Optional[typing.List[CSSPositionTryRule]], typing.Optional[int], typing.Optional[typing.List[CSSPropertyRule]], typing.Optional[typing.List[CSSPropertyRegistration]], typing.Optional[typing.List[CSSAtRule]], typing.Optional[dom.NodeId], typing.Optional[typing.List[CSSFunctionRule]]]]:
'''
Returns requested styles for a DOM node identified by ``nodeId``.
@@ -1957,7 +2063,7 @@ def get_matched_styles_for_node(
8. **activePositionFallbackIndex** - *(Optional)* Index of the active fallback in the applied position-try-fallback property, will not be set if there is no active position-try fallback.
9. **cssPropertyRules** - *(Optional)* A list of CSS at-property rules matching this node.
10. **cssPropertyRegistrations** - *(Optional)* A list of CSS property registrations matching this node.
- 11. **cssFontPaletteValuesRule** - *(Optional)* A font-palette-values rule matching this node.
+ 11. **cssAtRules** - *(Optional)* A list of simple @rules matching this node or its pseudo-elements.
12. **parentLayoutNodeId** - *(Optional)* Id of the first parent element that does not have display: contents.
13. **cssFunctionRules** - *(Optional)* A list of CSS at-function rules referenced by styles of this node.
'''
@@ -1980,12 +2086,27 @@ def get_matched_styles_for_node(
int(json['activePositionFallbackIndex']) if json.get('activePositionFallbackIndex', None) is not None else None,
[CSSPropertyRule.from_json(i) for i in json['cssPropertyRules']] if json.get('cssPropertyRules', None) is not None else None,
[CSSPropertyRegistration.from_json(i) for i in json['cssPropertyRegistrations']] if json.get('cssPropertyRegistrations', None) is not None else None,
- CSSFontPaletteValuesRule.from_json(json['cssFontPaletteValuesRule']) if json.get('cssFontPaletteValuesRule', None) is not None else None,
+ [CSSAtRule.from_json(i) for i in json['cssAtRules']] if json.get('cssAtRules', None) is not None else None,
dom.NodeId.from_json(json['parentLayoutNodeId']) if json.get('parentLayoutNodeId', None) is not None else None,
[CSSFunctionRule.from_json(i) for i in json['cssFunctionRules']] if json.get('cssFunctionRules', None) is not None else None
)
+def get_environment_variables() -> typing.Generator[T_JSON_DICT,T_JSON_DICT,dict]:
+ '''
+ Returns the values of the default UA-defined environment variables used in env()
+
+ **EXPERIMENTAL**
+
+ :returns:
+ '''
+ cmd_dict: T_JSON_DICT = {
+ 'method': 'CSS.getEnvironmentVariables',
+ }
+ json = yield cmd_dict
+ return dict(json['environmentVariables'])
+
+
def get_media_queries() -> typing.Generator[T_JSON_DICT,T_JSON_DICT,typing.List[CSSMedia]]:
'''
Returns all media queries parsed by the rendering engine.
@@ -2020,7 +2141,7 @@ def get_platform_fonts_for_node(
def get_style_sheet_text(
- style_sheet_id: StyleSheetId
+ style_sheet_id: dom.StyleSheetId
) -> typing.Generator[T_JSON_DICT,T_JSON_DICT,str]:
'''
Returns the current textual content for a stylesheet.
@@ -2063,7 +2184,7 @@ def get_layers_for_node(
def get_location_for_selector(
- style_sheet_id: StyleSheetId,
+ style_sheet_id: dom.StyleSheetId,
selector_text: str
) -> typing.Generator[T_JSON_DICT,T_JSON_DICT,typing.List[SourceRange]]:
'''
@@ -2176,7 +2297,7 @@ def set_effective_property_value_for_node(
def set_property_rule_property_name(
- style_sheet_id: StyleSheetId,
+ style_sheet_id: dom.StyleSheetId,
range_: SourceRange,
property_name: str
) -> typing.Generator[T_JSON_DICT,T_JSON_DICT,Value]:
@@ -2201,7 +2322,7 @@ def set_property_rule_property_name(
def set_keyframe_key(
- style_sheet_id: StyleSheetId,
+ style_sheet_id: dom.StyleSheetId,
range_: SourceRange,
key_text: str
) -> typing.Generator[T_JSON_DICT,T_JSON_DICT,Value]:
@@ -2226,7 +2347,7 @@ def set_keyframe_key(
def set_media_text(
- style_sheet_id: StyleSheetId,
+ style_sheet_id: dom.StyleSheetId,
range_: SourceRange,
text: str
) -> typing.Generator[T_JSON_DICT,T_JSON_DICT,CSSMedia]:
@@ -2251,7 +2372,7 @@ def set_media_text(
def set_container_query_text(
- style_sheet_id: StyleSheetId,
+ style_sheet_id: dom.StyleSheetId,
range_: SourceRange,
text: str
) -> typing.Generator[T_JSON_DICT,T_JSON_DICT,CSSContainerQuery]:
@@ -2278,7 +2399,7 @@ def set_container_query_text(
def set_supports_text(
- style_sheet_id: StyleSheetId,
+ style_sheet_id: dom.StyleSheetId,
range_: SourceRange,
text: str
) -> typing.Generator[T_JSON_DICT,T_JSON_DICT,CSSSupports]:
@@ -2304,8 +2425,35 @@ def set_supports_text(
return CSSSupports.from_json(json['supports'])
+def set_navigation_text(
+ style_sheet_id: dom.StyleSheetId,
+ range_: SourceRange,
+ text: str
+ ) -> typing.Generator[T_JSON_DICT,T_JSON_DICT,CSSNavigation]:
+ '''
+ Modifies the expression of a navigation at-rule.
+
+ **EXPERIMENTAL**
+
+ :param style_sheet_id:
+ :param range_:
+ :param text:
+ :returns: The resulting CSS Navigation rule after modification.
+ '''
+ params: T_JSON_DICT = dict()
+ params['styleSheetId'] = style_sheet_id.to_json()
+ params['range'] = range_.to_json()
+ params['text'] = text
+ cmd_dict: T_JSON_DICT = {
+ 'method': 'CSS.setNavigationText',
+ 'params': params,
+ }
+ json = yield cmd_dict
+ return CSSNavigation.from_json(json['navigation'])
+
+
def set_scope_text(
- style_sheet_id: StyleSheetId,
+ style_sheet_id: dom.StyleSheetId,
range_: SourceRange,
text: str
) -> typing.Generator[T_JSON_DICT,T_JSON_DICT,CSSScope]:
@@ -2332,7 +2480,7 @@ def set_scope_text(
def set_rule_selector(
- style_sheet_id: StyleSheetId,
+ style_sheet_id: dom.StyleSheetId,
range_: SourceRange,
selector: str
) -> typing.Generator[T_JSON_DICT,T_JSON_DICT,SelectorList]:
@@ -2357,7 +2505,7 @@ def set_rule_selector(
def set_style_sheet_text(
- style_sheet_id: StyleSheetId,
+ style_sheet_id: dom.StyleSheetId,
text: str
) -> typing.Generator[T_JSON_DICT,T_JSON_DICT,typing.Optional[str]]:
'''
@@ -2519,12 +2667,12 @@ class StyleSheetChanged:
'''
Fired whenever a stylesheet is changed as a result of the client operation.
'''
- style_sheet_id: StyleSheetId
+ style_sheet_id: dom.StyleSheetId
@classmethod
def from_json(cls, json: T_JSON_DICT) -> StyleSheetChanged:
return cls(
- style_sheet_id=StyleSheetId.from_json(json['styleSheetId'])
+ style_sheet_id=dom.StyleSheetId.from_json(json['styleSheetId'])
)
@@ -2535,12 +2683,12 @@ class StyleSheetRemoved:
Fired whenever an active document stylesheet is removed.
'''
#: Identifier of the removed stylesheet.
- style_sheet_id: StyleSheetId
+ style_sheet_id: dom.StyleSheetId
@classmethod
def from_json(cls, json: T_JSON_DICT) -> StyleSheetRemoved:
return cls(
- style_sheet_id=StyleSheetId.from_json(json['styleSheetId'])
+ style_sheet_id=dom.StyleSheetId.from_json(json['styleSheetId'])
)
diff --git a/pycdp/cdp/debugger.py b/pycdp/cdp/debugger.py
index 74aacd5..364959f 100644
--- a/pycdp/cdp/debugger.py
+++ b/pycdp/cdp/debugger.py
@@ -1281,7 +1281,7 @@ class ScriptFailedToParse:
execution_context_id: runtime.ExecutionContextId
#: Content hash of the script, SHA-256.
hash_: str
- #: For Wasm modules, the content of the ``build_id`` custom section.
+ #: For Wasm modules, the content of the ``build_id`` custom section. For JavaScript the ``debugId`` magic comment.
build_id: str
#: Embedder-specific auxiliary data likely matching {isDefault: boolean, type: 'default'``'isolated'``'worker', frameId: string}
execution_context_aux_data: typing.Optional[dict]
@@ -1349,7 +1349,7 @@ class ScriptParsed:
execution_context_id: runtime.ExecutionContextId
#: Content hash of the script, SHA-256.
hash_: str
- #: For Wasm modules, the content of the ``build_id`` custom section.
+ #: For Wasm modules, the content of the ``build_id`` custom section. For JavaScript the ``debugId`` magic comment.
build_id: str
#: Embedder-specific auxiliary data likely matching {isDefault: boolean, type: 'default'``'isolated'``'worker', frameId: string}
execution_context_aux_data: typing.Optional[dict]
diff --git a/pycdp/cdp/dom.py b/pycdp/cdp/dom.py
index 3d701e4..7993732 100644
--- a/pycdp/cdp/dom.py
+++ b/pycdp/cdp/dom.py
@@ -11,6 +11,7 @@
from dataclasses import dataclass
from .util import event_class, T_JSON_DICT
+from . import network
from . import page
from . import runtime
from deprecated.sphinx import deprecated # type: ignore
@@ -47,6 +48,21 @@ def __repr__(self):
return 'BackendNodeId({})'.format(super().__repr__())
+class StyleSheetId(str):
+ '''
+ Unique identifier for a CSS stylesheet.
+ '''
+ def to_json(self) -> str:
+ return self
+
+ @classmethod
+ def from_json(cls, json: str) -> StyleSheetId:
+ return cls(json)
+
+ def __repr__(self):
+ return 'StyleSheetId({})'.format(super().__repr__())
+
+
@dataclass
class BackendNode:
'''
@@ -85,7 +101,9 @@ class PseudoType(enum.Enum):
CHECKMARK = "checkmark"
BEFORE = "before"
AFTER = "after"
+ EXPAND_ICON = "expand-icon"
PICKER_ICON = "picker-icon"
+ INTEREST_HINT = "interest-hint"
MARKER = "marker"
BACKDROP = "backdrop"
COLUMN = "column"
@@ -110,12 +128,15 @@ class PseudoType(enum.Enum):
VIEW_TRANSITION = "view-transition"
VIEW_TRANSITION_GROUP = "view-transition-group"
VIEW_TRANSITION_IMAGE_PAIR = "view-transition-image-pair"
+ VIEW_TRANSITION_GROUP_CHILDREN = "view-transition-group-children"
VIEW_TRANSITION_OLD = "view-transition-old"
VIEW_TRANSITION_NEW = "view-transition-new"
PLACEHOLDER = "placeholder"
FILE_SELECTOR_BUTTON = "file-selector-button"
DETAILS_CONTENT = "details-content"
PICKER = "picker"
+ PERMISSION_ICON = "permission-icon"
+ OVERSCROLL_AREA_PARENT = "overscroll-area-parent"
def to_json(self) -> str:
return self.value
@@ -308,6 +329,12 @@ class Node:
is_scrollable: typing.Optional[bool] = None
+ affected_by_starting_styles: typing.Optional[bool] = None
+
+ adopted_style_sheets: typing.Optional[typing.List[StyleSheetId]] = None
+
+ ad_provenance: typing.Optional[network.AdProvenance] = None
+
def to_json(self) -> T_JSON_DICT:
json: T_JSON_DICT = dict()
json['nodeId'] = self.node_id.to_json()
@@ -368,6 +395,12 @@ def to_json(self) -> T_JSON_DICT:
json['assignedSlot'] = self.assigned_slot.to_json()
if self.is_scrollable is not None:
json['isScrollable'] = self.is_scrollable
+ if self.affected_by_starting_styles is not None:
+ json['affectedByStartingStyles'] = self.affected_by_starting_styles
+ if self.adopted_style_sheets is not None:
+ json['adoptedStyleSheets'] = [i.to_json() for i in self.adopted_style_sheets]
+ if self.ad_provenance is not None:
+ json['adProvenance'] = self.ad_provenance.to_json()
return json
@classmethod
@@ -405,6 +438,9 @@ def from_json(cls, json: T_JSON_DICT) -> Node:
compatibility_mode=CompatibilityMode.from_json(json['compatibilityMode']) if json.get('compatibilityMode', None) is not None else None,
assigned_slot=BackendNode.from_json(json['assignedSlot']) if json.get('assignedSlot', None) is not None else None,
is_scrollable=bool(json['isScrollable']) if json.get('isScrollable', None) is not None else None,
+ affected_by_starting_styles=bool(json['affectedByStartingStyles']) if json.get('affectedByStartingStyles', None) is not None else None,
+ adopted_style_sheets=[StyleSheetId.from_json(i) for i in json['adoptedStyleSheets']] if json.get('adoptedStyleSheets', None) is not None else None,
+ ad_provenance=network.AdProvenance.from_json(json['adProvenance']) if json.get('adProvenance', None) is not None else None,
)
@@ -1015,7 +1051,8 @@ def get_node_for_location(
def get_outer_html(
node_id: typing.Optional[NodeId] = None,
backend_node_id: typing.Optional[BackendNodeId] = None,
- object_id: typing.Optional[runtime.RemoteObjectId] = None
+ object_id: typing.Optional[runtime.RemoteObjectId] = None,
+ include_shadow_dom: typing.Optional[bool] = None
) -> typing.Generator[T_JSON_DICT,T_JSON_DICT,str]:
'''
Returns node's HTML markup.
@@ -1023,6 +1060,7 @@ def get_outer_html(
:param node_id: *(Optional)* Identifier of the node.
:param backend_node_id: *(Optional)* Identifier of the backend node.
:param object_id: *(Optional)* JavaScript object id of the node wrapper.
+ :param include_shadow_dom: **(EXPERIMENTAL)** *(Optional)* Include all shadow roots. Equals to false if not specified.
:returns: Outer HTML markup.
'''
params: T_JSON_DICT = dict()
@@ -1032,6 +1070,8 @@ def get_outer_html(
params['backendNodeId'] = backend_node_id.to_json()
if object_id is not None:
params['objectId'] = object_id.to_json()
+ if include_shadow_dom is not None:
+ params['includeShadowDOM'] = include_shadow_dom
cmd_dict: T_JSON_DICT = {
'method': 'DOM.getOuterHTML',
'params': params,
@@ -1725,14 +1765,15 @@ def get_container_for_node(
container_name: typing.Optional[str] = None,
physical_axes: typing.Optional[PhysicalAxes] = None,
logical_axes: typing.Optional[LogicalAxes] = None,
- queries_scroll_state: typing.Optional[bool] = None
+ queries_scroll_state: typing.Optional[bool] = None,
+ queries_anchored: typing.Optional[bool] = None
) -> typing.Generator[T_JSON_DICT,T_JSON_DICT,typing.Optional[NodeId]]:
'''
Returns the query container of the given node based on container query
conditions: containerName, physical and logical axes, and whether it queries
- scroll-state. If no axes are provided and queriesScrollState is false, the
- style container is returned, which is the direct parent or the closest
- element with a matching container-name.
+ scroll-state or anchored elements. If no axes are provided and
+ queriesScrollState is false, the style container is returned, which is the
+ direct parent or the closest element with a matching container-name.
**EXPERIMENTAL**
@@ -1741,6 +1782,7 @@ def get_container_for_node(
:param physical_axes: *(Optional)*
:param logical_axes: *(Optional)*
:param queries_scroll_state: *(Optional)*
+ :param queries_anchored: *(Optional)*
:returns: *(Optional)* The container node for the given node, or null if not found.
'''
params: T_JSON_DICT = dict()
@@ -1753,6 +1795,8 @@ def get_container_for_node(
params['logicalAxes'] = logical_axes.to_json()
if queries_scroll_state is not None:
params['queriesScrollState'] = queries_scroll_state
+ if queries_anchored is not None:
+ params['queriesAnchored'] = queries_anchored
cmd_dict: T_JSON_DICT = {
'method': 'DOM.getContainerForNode',
'params': params,
@@ -1809,6 +1853,31 @@ def get_anchor_element(
return NodeId.from_json(json['nodeId'])
+def force_show_popover(
+ node_id: NodeId,
+ enable: bool
+ ) -> typing.Generator[T_JSON_DICT,T_JSON_DICT,typing.List[NodeId]]:
+ '''
+ When enabling, this API force-opens the popover identified by nodeId
+ and keeps it open until disabled.
+
+ **EXPERIMENTAL**
+
+ :param node_id: Id of the popover HTMLElement
+ :param enable: If true, opens the popover and keeps it open. If false, closes the popover if it was previously force-opened.
+ :returns: List of popovers that were closed in order to respect popover stacking order.
+ '''
+ params: T_JSON_DICT = dict()
+ params['nodeId'] = node_id.to_json()
+ params['enable'] = enable
+ cmd_dict: T_JSON_DICT = {
+ 'method': 'DOM.forceShowPopover',
+ 'params': params,
+ }
+ json = yield cmd_dict
+ return [NodeId.from_json(i) for i in json['nodeIds']]
+
+
@event_class('DOM.attributeModified')
@dataclass
class AttributeModified:
@@ -1831,6 +1900,27 @@ def from_json(cls, json: T_JSON_DICT) -> AttributeModified:
)
+@event_class('DOM.adoptedStyleSheetsModified')
+@dataclass
+class AdoptedStyleSheetsModified:
+ '''
+ **EXPERIMENTAL**
+
+ Fired when ``Element``'s adoptedStyleSheets are modified.
+ '''
+ #: Id of the node that has changed.
+ node_id: NodeId
+ #: New adoptedStyleSheets array.
+ adopted_style_sheets: typing.List[StyleSheetId]
+
+ @classmethod
+ def from_json(cls, json: T_JSON_DICT) -> AdoptedStyleSheetsModified:
+ return cls(
+ node_id=NodeId.from_json(json['nodeId']),
+ adopted_style_sheets=[StyleSheetId.from_json(i) for i in json['adoptedStyleSheets']]
+ )
+
+
@event_class('DOM.attributeRemoved')
@dataclass
class AttributeRemoved:
@@ -2042,6 +2132,48 @@ def from_json(cls, json: T_JSON_DICT) -> ScrollableFlagUpdated:
)
+@event_class('DOM.adRelatedStateUpdated')
+@dataclass
+class AdRelatedStateUpdated:
+ '''
+ **EXPERIMENTAL**
+
+ Fired when a node's ad related state changes.
+ '''
+ #: The id of the node.
+ node_id: NodeId
+ #: The provenance of the ad related node, if it is ad related.
+ ad_provenance: typing.Optional[network.AdProvenance]
+
+ @classmethod
+ def from_json(cls, json: T_JSON_DICT) -> AdRelatedStateUpdated:
+ return cls(
+ node_id=NodeId.from_json(json['nodeId']),
+ ad_provenance=network.AdProvenance.from_json(json['adProvenance']) if json.get('adProvenance', None) is not None else None
+ )
+
+
+@event_class('DOM.affectedByStartingStylesFlagUpdated')
+@dataclass
+class AffectedByStartingStylesFlagUpdated:
+ '''
+ **EXPERIMENTAL**
+
+ Fired when a node's starting styles changes.
+ '''
+ #: The id of the node.
+ node_id: NodeId
+ #: If the node has starting styles.
+ affected_by_starting_styles: bool
+
+ @classmethod
+ def from_json(cls, json: T_JSON_DICT) -> AffectedByStartingStylesFlagUpdated:
+ return cls(
+ node_id=NodeId.from_json(json['nodeId']),
+ affected_by_starting_styles=bool(json['affectedByStartingStyles'])
+ )
+
+
@event_class('DOM.pseudoElementRemoved')
@dataclass
class PseudoElementRemoved:
diff --git a/pycdp/cdp/emulation.py b/pycdp/cdp/emulation.py
index 2e3c00e..c074d9a 100644
--- a/pycdp/cdp/emulation.py
+++ b/pycdp/cdp/emulation.py
@@ -239,6 +239,10 @@ class UserAgentMetadata:
wow64: typing.Optional[bool] = None
+ #: Used to specify User Agent form-factor values.
+ #: See https://wicg.github.io/ua-client-hints/#sec-ch-ua-form-factors
+ form_factors: typing.Optional[typing.List[str]] = None
+
def to_json(self) -> T_JSON_DICT:
json: T_JSON_DICT = dict()
json['platform'] = self.platform
@@ -256,6 +260,8 @@ def to_json(self) -> T_JSON_DICT:
json['bitness'] = self.bitness
if self.wow64 is not None:
json['wow64'] = self.wow64
+ if self.form_factors is not None:
+ json['formFactors'] = [i for i in self.form_factors]
return json
@classmethod
@@ -271,6 +277,7 @@ def from_json(cls, json: T_JSON_DICT) -> UserAgentMetadata:
full_version=str(json['fullVersion']) if json.get('fullVersion', None) is not None else None,
bitness=str(json['bitness']) if json.get('bitness', None) is not None else None,
wow64=bool(json['wow64']) if json.get('wow64', None) is not None else None,
+ form_factors=[str(i) for i in json['formFactors']] if json.get('formFactors', None) is not None else None,
)
@@ -460,11 +467,156 @@ def from_json(cls, json: T_JSON_DICT) -> PressureMetadata:
)
+@dataclass
+class WorkAreaInsets:
+ #: Work area top inset in pixels. Default is 0;
+ top: typing.Optional[int] = None
+
+ #: Work area left inset in pixels. Default is 0;
+ left: typing.Optional[int] = None
+
+ #: Work area bottom inset in pixels. Default is 0;
+ bottom: typing.Optional[int] = None
+
+ #: Work area right inset in pixels. Default is 0;
+ right: typing.Optional[int] = None
+
+ def to_json(self) -> T_JSON_DICT:
+ json: T_JSON_DICT = dict()
+ if self.top is not None:
+ json['top'] = self.top
+ if self.left is not None:
+ json['left'] = self.left
+ if self.bottom is not None:
+ json['bottom'] = self.bottom
+ if self.right is not None:
+ json['right'] = self.right
+ return json
+
+ @classmethod
+ def from_json(cls, json: T_JSON_DICT) -> WorkAreaInsets:
+ return cls(
+ top=int(json['top']) if json.get('top', None) is not None else None,
+ left=int(json['left']) if json.get('left', None) is not None else None,
+ bottom=int(json['bottom']) if json.get('bottom', None) is not None else None,
+ right=int(json['right']) if json.get('right', None) is not None else None,
+ )
+
+
+class ScreenId(str):
+ def to_json(self) -> str:
+ return self
+
+ @classmethod
+ def from_json(cls, json: str) -> ScreenId:
+ return cls(json)
+
+ def __repr__(self):
+ return 'ScreenId({})'.format(super().__repr__())
+
+
+@dataclass
+class ScreenInfo:
+ '''
+ Screen information similar to the one returned by window.getScreenDetails() method,
+ see https://w3c.github.io/window-management/#screendetailed.
+ '''
+ #: Offset of the left edge of the screen.
+ left: int
+
+ #: Offset of the top edge of the screen.
+ top: int
+
+ #: Width of the screen.
+ width: int
+
+ #: Height of the screen.
+ height: int
+
+ #: Offset of the left edge of the available screen area.
+ avail_left: int
+
+ #: Offset of the top edge of the available screen area.
+ avail_top: int
+
+ #: Width of the available screen area.
+ avail_width: int
+
+ #: Height of the available screen area.
+ avail_height: int
+
+ #: Specifies the screen's device pixel ratio.
+ device_pixel_ratio: float
+
+ #: Specifies the screen's orientation.
+ orientation: ScreenOrientation
+
+ #: Specifies the screen's color depth in bits.
+ color_depth: int
+
+ #: Indicates whether the device has multiple screens.
+ is_extended: bool
+
+ #: Indicates whether the screen is internal to the device or external, attached to the device.
+ is_internal: bool
+
+ #: Indicates whether the screen is set as the the operating system primary screen.
+ is_primary: bool
+
+ #: Specifies the descriptive label for the screen.
+ label: str
+
+ #: Specifies the unique identifier of the screen.
+ id_: ScreenId
+
+ def to_json(self) -> T_JSON_DICT:
+ json: T_JSON_DICT = dict()
+ json['left'] = self.left
+ json['top'] = self.top
+ json['width'] = self.width
+ json['height'] = self.height
+ json['availLeft'] = self.avail_left
+ json['availTop'] = self.avail_top
+ json['availWidth'] = self.avail_width
+ json['availHeight'] = self.avail_height
+ json['devicePixelRatio'] = self.device_pixel_ratio
+ json['orientation'] = self.orientation.to_json()
+ json['colorDepth'] = self.color_depth
+ json['isExtended'] = self.is_extended
+ json['isInternal'] = self.is_internal
+ json['isPrimary'] = self.is_primary
+ json['label'] = self.label
+ json['id'] = self.id_.to_json()
+ return json
+
+ @classmethod
+ def from_json(cls, json: T_JSON_DICT) -> ScreenInfo:
+ return cls(
+ left=int(json['left']),
+ top=int(json['top']),
+ width=int(json['width']),
+ height=int(json['height']),
+ avail_left=int(json['availLeft']),
+ avail_top=int(json['availTop']),
+ avail_width=int(json['availWidth']),
+ avail_height=int(json['availHeight']),
+ device_pixel_ratio=float(json['devicePixelRatio']),
+ orientation=ScreenOrientation.from_json(json['orientation']),
+ color_depth=int(json['colorDepth']),
+ is_extended=bool(json['isExtended']),
+ is_internal=bool(json['isInternal']),
+ is_primary=bool(json['isPrimary']),
+ label=str(json['label']),
+ id_=ScreenId.from_json(json['id']),
+ )
+
+
class DisabledImageType(enum.Enum):
'''
Enum of image types that can be disabled.
'''
AVIF = "avif"
+ JXL = "jxl"
WEBP = "webp"
def to_json(self) -> str:
@@ -632,7 +784,9 @@ def set_device_metrics_override(
screen_orientation: typing.Optional[ScreenOrientation] = None,
viewport: typing.Optional[page.Viewport] = None,
display_feature: typing.Optional[DisplayFeature] = None,
- device_posture: typing.Optional[DevicePosture] = None
+ device_posture: typing.Optional[DevicePosture] = None,
+ scrollbar_type: typing.Optional[str] = None,
+ screen_orientation_lock_emulation: typing.Optional[bool] = None
) -> typing.Generator[T_JSON_DICT,T_JSON_DICT,None]:
'''
Overrides the values of device screen dimensions (window.screen.width, window.screen.height,
@@ -651,8 +805,10 @@ def set_device_metrics_override(
:param dont_set_visible_size: **(EXPERIMENTAL)** *(Optional)* Do not set visible view size, rely upon explicit setVisibleSize call.
:param screen_orientation: *(Optional)* Screen orientation override.
:param viewport: **(EXPERIMENTAL)** *(Optional)* If set, the visible area of the page will be overridden to this viewport. This viewport change is not observed by the page, e.g. viewport-relative elements do not change positions.
- :param display_feature: **(EXPERIMENTAL)** *(Optional)* If set, the display feature of a multi-segment screen. If not set, multi-segment support is turned-off.
+ :param display_feature: **(DEPRECATED)** **(EXPERIMENTAL)** *(Optional)* If set, the display feature of a multi-segment screen. If not set, multi-segment support is turned-off. Deprecated, use Emulation.setDisplayFeaturesOverride.
:param device_posture: **(DEPRECATED)** **(EXPERIMENTAL)** *(Optional)* If set, the posture of a foldable device. If not set the posture is set to continuous. Deprecated, use Emulation.setDevicePostureOverride.
+ :param scrollbar_type: **(EXPERIMENTAL)** *(Optional)* Scrollbar type. Default: ```default```.
+ :param screen_orientation_lock_emulation: **(EXPERIMENTAL)** *(Optional)* If set to true, enables screen orientation lock emulation, which intercepts screen.orientation.lock() calls from the page and reports orientation changes via screenOrientationLockChanged events. This is useful for emulating mobile device orientation lock behavior in responsive design mode.
'''
params: T_JSON_DICT = dict()
params['width'] = width
@@ -679,6 +835,10 @@ def set_device_metrics_override(
params['displayFeature'] = display_feature.to_json()
if device_posture is not None:
params['devicePosture'] = device_posture.to_json()
+ if scrollbar_type is not None:
+ params['scrollbarType'] = scrollbar_type
+ if screen_orientation_lock_emulation is not None:
+ params['screenOrientationLockEmulation'] = screen_orientation_lock_emulation
cmd_dict: T_JSON_DICT = {
'method': 'Emulation.setDeviceMetricsOverride',
'params': params,
@@ -721,6 +881,41 @@ def clear_device_posture_override() -> typing.Generator[T_JSON_DICT,T_JSON_DICT,
json = yield cmd_dict
+def set_display_features_override(
+ features: typing.List[DisplayFeature]
+ ) -> typing.Generator[T_JSON_DICT,T_JSON_DICT,None]:
+ '''
+ Start using the given display features to pupulate the Viewport Segments API.
+ This override can also be set in setDeviceMetricsOverride().
+
+ **EXPERIMENTAL**
+
+ :param features:
+ '''
+ params: T_JSON_DICT = dict()
+ params['features'] = [i.to_json() for i in features]
+ cmd_dict: T_JSON_DICT = {
+ 'method': 'Emulation.setDisplayFeaturesOverride',
+ 'params': params,
+ }
+ json = yield cmd_dict
+
+
+def clear_display_features_override() -> typing.Generator[T_JSON_DICT,T_JSON_DICT,None]:
+ '''
+ Clears the display features override set with either setDeviceMetricsOverride()
+ or setDisplayFeaturesOverride() and starts using display features from the
+ platform again.
+ Does nothing if no override is set.
+
+ **EXPERIMENTAL**
+ '''
+ cmd_dict: T_JSON_DICT = {
+ 'method': 'Emulation.clearDisplayFeaturesOverride',
+ }
+ json = yield cmd_dict
+
+
def set_scrollbars_hidden(
hidden: bool
) -> typing.Generator[T_JSON_DICT,T_JSON_DICT,None]:
@@ -821,18 +1016,44 @@ def set_emulated_vision_deficiency(
json = yield cmd_dict
+def set_emulated_os_text_scale(
+ scale: typing.Optional[float] = None
+ ) -> typing.Generator[T_JSON_DICT,T_JSON_DICT,None]:
+ '''
+ Emulates the given OS text scale.
+
+ :param scale: *(Optional)*
+ '''
+ params: T_JSON_DICT = dict()
+ if scale is not None:
+ params['scale'] = scale
+ cmd_dict: T_JSON_DICT = {
+ 'method': 'Emulation.setEmulatedOSTextScale',
+ 'params': params,
+ }
+ json = yield cmd_dict
+
+
def set_geolocation_override(
latitude: typing.Optional[float] = None,
longitude: typing.Optional[float] = None,
- accuracy: typing.Optional[float] = None
+ accuracy: typing.Optional[float] = None,
+ altitude: typing.Optional[float] = None,
+ altitude_accuracy: typing.Optional[float] = None,
+ heading: typing.Optional[float] = None,
+ speed: typing.Optional[float] = None
) -> typing.Generator[T_JSON_DICT,T_JSON_DICT,None]:
'''
- Overrides the Geolocation Position or Error. Omitting any of the parameters emulates position
- unavailable.
+ Overrides the Geolocation Position or Error. Omitting latitude, longitude or
+ accuracy emulates position unavailable.
:param latitude: *(Optional)* Mock latitude
:param longitude: *(Optional)* Mock longitude
:param accuracy: *(Optional)* Mock accuracy
+ :param altitude: *(Optional)* Mock altitude
+ :param altitude_accuracy: *(Optional)* Mock altitudeAccuracy
+ :param heading: *(Optional)* Mock heading
+ :param speed: *(Optional)* Mock speed
'''
params: T_JSON_DICT = dict()
if latitude is not None:
@@ -841,6 +1062,14 @@ def set_geolocation_override(
params['longitude'] = longitude
if accuracy is not None:
params['accuracy'] = accuracy
+ if altitude is not None:
+ params['altitude'] = altitude
+ if altitude_accuracy is not None:
+ params['altitudeAccuracy'] = altitude_accuracy
+ if heading is not None:
+ params['heading'] = heading
+ if speed is not None:
+ params['speed'] = speed
cmd_dict: T_JSON_DICT = {
'method': 'Emulation.setGeolocationOverride',
'params': params,
@@ -956,6 +1185,7 @@ def set_pressure_state_override(
state: PressureState
) -> typing.Generator[T_JSON_DICT,T_JSON_DICT,None]:
'''
+ TODO: OBSOLETE: To remove when setPressureDataOverride is merged.
Provides a given pressure state that will be processed and eventually be
delivered to PressureObserver users. ``source`` must have been previously
overridden by setPressureSourceOverrideEnabled.
@@ -975,6 +1205,34 @@ def set_pressure_state_override(
json = yield cmd_dict
+def set_pressure_data_override(
+ source: PressureSource,
+ state: PressureState,
+ own_contribution_estimate: typing.Optional[float] = None
+ ) -> typing.Generator[T_JSON_DICT,T_JSON_DICT,None]:
+ '''
+ Provides a given pressure data set that will be processed and eventually be
+ delivered to PressureObserver users. ``source`` must have been previously
+ overridden by setPressureSourceOverrideEnabled.
+
+ **EXPERIMENTAL**
+
+ :param source:
+ :param state:
+ :param own_contribution_estimate: *(Optional)*
+ '''
+ params: T_JSON_DICT = dict()
+ params['source'] = source.to_json()
+ params['state'] = state.to_json()
+ if own_contribution_estimate is not None:
+ params['ownContributionEstimate'] = own_contribution_estimate
+ cmd_dict: T_JSON_DICT = {
+ 'method': 'Emulation.setPressureDataOverride',
+ 'params': params,
+ }
+ json = yield cmd_dict
+
+
def set_idle_override(
is_user_active: bool,
is_screen_unlocked: bool
@@ -1201,6 +1459,26 @@ def set_disabled_image_types(
json = yield cmd_dict
+def set_data_saver_override(
+ data_saver_enabled: typing.Optional[bool] = None
+ ) -> typing.Generator[T_JSON_DICT,T_JSON_DICT,None]:
+ '''
+ Override the value of navigator.connection.saveData
+
+ **EXPERIMENTAL**
+
+ :param data_saver_enabled: *(Optional)* Override value. Omitting the parameter disables the override.
+ '''
+ params: T_JSON_DICT = dict()
+ if data_saver_enabled is not None:
+ params['dataSaverEnabled'] = data_saver_enabled
+ cmd_dict: T_JSON_DICT = {
+ 'method': 'Emulation.setDataSaverOverride',
+ 'params': params,
+ }
+ json = yield cmd_dict
+
+
def set_hardware_concurrency_override(
hardware_concurrency: int
) -> typing.Generator[T_JSON_DICT,T_JSON_DICT,None]:
@@ -1269,6 +1547,198 @@ def set_automation_override(
json = yield cmd_dict
+def set_small_viewport_height_difference_override(
+ difference: int
+ ) -> typing.Generator[T_JSON_DICT,T_JSON_DICT,None]:
+ '''
+ Allows overriding the difference between the small and large viewport sizes, which determine the
+ value of the ``svh`` and ``lvh`` unit, respectively. Only supported for top-level frames.
+
+ **EXPERIMENTAL**
+
+ :param difference: This will cause an element of size 100svh to be ```difference``` pixels smaller than an element of size 100lvh.
+ '''
+ params: T_JSON_DICT = dict()
+ params['difference'] = difference
+ cmd_dict: T_JSON_DICT = {
+ 'method': 'Emulation.setSmallViewportHeightDifferenceOverride',
+ 'params': params,
+ }
+ json = yield cmd_dict
+
+
+def get_screen_infos() -> typing.Generator[T_JSON_DICT,T_JSON_DICT,typing.List[ScreenInfo]]:
+ '''
+ Returns device's screen configuration. In headful mode, the physical screens configuration is returned,
+ whereas in headless mode, a virtual headless screen configuration is provided instead.
+
+ **EXPERIMENTAL**
+
+ :returns:
+ '''
+ cmd_dict: T_JSON_DICT = {
+ 'method': 'Emulation.getScreenInfos',
+ }
+ json = yield cmd_dict
+ return [ScreenInfo.from_json(i) for i in json['screenInfos']]
+
+
+def add_screen(
+ left: int,
+ top: int,
+ width: int,
+ height: int,
+ work_area_insets: typing.Optional[WorkAreaInsets] = None,
+ device_pixel_ratio: typing.Optional[float] = None,
+ rotation: typing.Optional[int] = None,
+ color_depth: typing.Optional[int] = None,
+ label: typing.Optional[str] = None,
+ is_internal: typing.Optional[bool] = None
+ ) -> typing.Generator[T_JSON_DICT,T_JSON_DICT,ScreenInfo]:
+ '''
+ Add a new screen to the device. Only supported in headless mode.
+
+ **EXPERIMENTAL**
+
+ :param left: Offset of the left edge of the screen in pixels.
+ :param top: Offset of the top edge of the screen in pixels.
+ :param width: The width of the screen in pixels.
+ :param height: The height of the screen in pixels.
+ :param work_area_insets: *(Optional)* Specifies the screen's work area. Default is entire screen.
+ :param device_pixel_ratio: *(Optional)* Specifies the screen's device pixel ratio. Default is 1.
+ :param rotation: *(Optional)* Specifies the screen's rotation angle. Available values are 0, 90, 180 and 270. Default is 0.
+ :param color_depth: *(Optional)* Specifies the screen's color depth in bits. Default is 24.
+ :param label: *(Optional)* Specifies the descriptive label for the screen. Default is none.
+ :param is_internal: *(Optional)* Indicates whether the screen is internal to the device or external, attached to the device. Default is false.
+ :returns:
+ '''
+ params: T_JSON_DICT = dict()
+ params['left'] = left
+ params['top'] = top
+ params['width'] = width
+ params['height'] = height
+ if work_area_insets is not None:
+ params['workAreaInsets'] = work_area_insets.to_json()
+ if device_pixel_ratio is not None:
+ params['devicePixelRatio'] = device_pixel_ratio
+ if rotation is not None:
+ params['rotation'] = rotation
+ if color_depth is not None:
+ params['colorDepth'] = color_depth
+ if label is not None:
+ params['label'] = label
+ if is_internal is not None:
+ params['isInternal'] = is_internal
+ cmd_dict: T_JSON_DICT = {
+ 'method': 'Emulation.addScreen',
+ 'params': params,
+ }
+ json = yield cmd_dict
+ return ScreenInfo.from_json(json['screenInfo'])
+
+
+def update_screen(
+ screen_id: ScreenId,
+ left: typing.Optional[int] = None,
+ top: typing.Optional[int] = None,
+ width: typing.Optional[int] = None,
+ height: typing.Optional[int] = None,
+ work_area_insets: typing.Optional[WorkAreaInsets] = None,
+ device_pixel_ratio: typing.Optional[float] = None,
+ rotation: typing.Optional[int] = None,
+ color_depth: typing.Optional[int] = None,
+ label: typing.Optional[str] = None,
+ is_internal: typing.Optional[bool] = None
+ ) -> typing.Generator[T_JSON_DICT,T_JSON_DICT,ScreenInfo]:
+ '''
+ Updates specified screen parameters. Only supported in headless mode.
+
+ **EXPERIMENTAL**
+
+ :param screen_id: Target screen identifier.
+ :param left: *(Optional)* Offset of the left edge of the screen in pixels.
+ :param top: *(Optional)* Offset of the top edge of the screen in pixels.
+ :param width: *(Optional)* The width of the screen in pixels.
+ :param height: *(Optional)* The height of the screen in pixels.
+ :param work_area_insets: *(Optional)* Specifies the screen's work area.
+ :param device_pixel_ratio: *(Optional)* Specifies the screen's device pixel ratio.
+ :param rotation: *(Optional)* Specifies the screen's rotation angle. Available values are 0, 90, 180 and 270.
+ :param color_depth: *(Optional)* Specifies the screen's color depth in bits.
+ :param label: *(Optional)* Specifies the descriptive label for the screen.
+ :param is_internal: *(Optional)* Indicates whether the screen is internal to the device or external, attached to the device. Default is false.
+ :returns:
+ '''
+ params: T_JSON_DICT = dict()
+ params['screenId'] = screen_id.to_json()
+ if left is not None:
+ params['left'] = left
+ if top is not None:
+ params['top'] = top
+ if width is not None:
+ params['width'] = width
+ if height is not None:
+ params['height'] = height
+ if work_area_insets is not None:
+ params['workAreaInsets'] = work_area_insets.to_json()
+ if device_pixel_ratio is not None:
+ params['devicePixelRatio'] = device_pixel_ratio
+ if rotation is not None:
+ params['rotation'] = rotation
+ if color_depth is not None:
+ params['colorDepth'] = color_depth
+ if label is not None:
+ params['label'] = label
+ if is_internal is not None:
+ params['isInternal'] = is_internal
+ cmd_dict: T_JSON_DICT = {
+ 'method': 'Emulation.updateScreen',
+ 'params': params,
+ }
+ json = yield cmd_dict
+ return ScreenInfo.from_json(json['screenInfo'])
+
+
+def remove_screen(
+ screen_id: ScreenId
+ ) -> typing.Generator[T_JSON_DICT,T_JSON_DICT,None]:
+ '''
+ Remove screen from the device. Only supported in headless mode.
+
+ **EXPERIMENTAL**
+
+ :param screen_id:
+ '''
+ params: T_JSON_DICT = dict()
+ params['screenId'] = screen_id.to_json()
+ cmd_dict: T_JSON_DICT = {
+ 'method': 'Emulation.removeScreen',
+ 'params': params,
+ }
+ json = yield cmd_dict
+
+
+def set_primary_screen(
+ screen_id: ScreenId
+ ) -> typing.Generator[T_JSON_DICT,T_JSON_DICT,None]:
+ '''
+ Set primary screen. Only supported in headless mode.
+ Note that this changes the coordinate system origin to the top-left
+ of the new primary screen, updating the bounds and work areas
+ of all existing screens accordingly.
+
+ **EXPERIMENTAL**
+
+ :param screen_id:
+ '''
+ params: T_JSON_DICT = dict()
+ params['screenId'] = screen_id.to_json()
+ cmd_dict: T_JSON_DICT = {
+ 'method': 'Emulation.setPrimaryScreen',
+ 'params': params,
+ }
+ json = yield cmd_dict
+
+
@event_class('Emulation.virtualTimeBudgetExpired')
@dataclass
class VirtualTimeBudgetExpired:
@@ -1284,3 +1754,26 @@ def from_json(cls, json: T_JSON_DICT) -> VirtualTimeBudgetExpired:
return cls(
)
+
+
+@event_class('Emulation.screenOrientationLockChanged')
+@dataclass
+class ScreenOrientationLockChanged:
+ '''
+ **EXPERIMENTAL**
+
+ Fired when a page calls screen.orientation.lock() or screen.orientation.unlock()
+ while device emulation is enabled. This allows the DevTools frontend to update the
+ emulated device orientation accordingly.
+ '''
+ #: Whether the screen orientation is currently locked.
+ locked: bool
+ #: The orientation lock type requested by the page. Only set when locked is true.
+ orientation: typing.Optional[ScreenOrientation]
+
+ @classmethod
+ def from_json(cls, json: T_JSON_DICT) -> ScreenOrientationLockChanged:
+ return cls(
+ locked=bool(json['locked']),
+ orientation=ScreenOrientation.from_json(json['orientation']) if json.get('orientation', None) is not None else None
+ )
diff --git a/pycdp/cdp/extensions.py b/pycdp/cdp/extensions.py
index 55fcd53..0249d36 100644
--- a/pycdp/cdp/extensions.py
+++ b/pycdp/cdp/extensions.py
@@ -29,8 +29,71 @@ def from_json(cls, json: str) -> StorageArea:
return cls(json)
+@dataclass
+class ExtensionInfo:
+ '''
+ Detailed information about an extension.
+ '''
+ #: Extension id.
+ id_: str
+
+ #: Extension name.
+ name: str
+
+ #: Extension version.
+ version: str
+
+ #: The path from which the extension was loaded.
+ path: str
+
+ #: Extension enabled status.
+ enabled: bool
+
+ def to_json(self) -> T_JSON_DICT:
+ json: T_JSON_DICT = dict()
+ json['id'] = self.id_
+ json['name'] = self.name
+ json['version'] = self.version
+ json['path'] = self.path
+ json['enabled'] = self.enabled
+ return json
+
+ @classmethod
+ def from_json(cls, json: T_JSON_DICT) -> ExtensionInfo:
+ return cls(
+ id_=str(json['id']),
+ name=str(json['name']),
+ version=str(json['version']),
+ path=str(json['path']),
+ enabled=bool(json['enabled']),
+ )
+
+
+def trigger_action(
+ id_: str,
+ target_id: str
+ ) -> typing.Generator[T_JSON_DICT,T_JSON_DICT,None]:
+ '''
+ Runs an extension default action.
+ Available if the client is connected using the --remote-debugging-pipe
+ flag and the --enable-unsafe-extension-debugging flag is set.
+
+ :param id_: Extension id.
+ :param target_id: A tab target ID to trigger the default extension action on.
+ '''
+ params: T_JSON_DICT = dict()
+ params['id'] = id_
+ params['targetId'] = target_id
+ cmd_dict: T_JSON_DICT = {
+ 'method': 'Extensions.triggerAction',
+ 'params': params,
+ }
+ json = yield cmd_dict
+
+
def load_unpacked(
- path: str
+ path: str,
+ enable_in_incognito: typing.Optional[bool] = None
) -> typing.Generator[T_JSON_DICT,T_JSON_DICT,str]:
'''
Installs an unpacked extension from the filesystem similar to
@@ -40,10 +103,13 @@ def load_unpacked(
flag is set.
:param path: Absolute file path.
+ :param enable_in_incognito: *(Optional)* Enable the extension in incognito
:returns: Extension id.
'''
params: T_JSON_DICT = dict()
params['path'] = path
+ if enable_in_incognito is not None:
+ params['enableInIncognito'] = enable_in_incognito
cmd_dict: T_JSON_DICT = {
'method': 'Extensions.loadUnpacked',
'params': params,
@@ -52,6 +118,21 @@ def load_unpacked(
return str(json['id'])
+def get_extensions() -> typing.Generator[T_JSON_DICT,T_JSON_DICT,typing.List[ExtensionInfo]]:
+ '''
+ Gets a list of all unpacked extensions.
+ Available if the client is connected using the --remote-debugging-pipe flag
+ and the --enable-unsafe-extension-debugging flag is set.
+
+ :returns:
+ '''
+ cmd_dict: T_JSON_DICT = {
+ 'method': 'Extensions.getExtensions',
+ }
+ json = yield cmd_dict
+ return [ExtensionInfo.from_json(i) for i in json['extensions']]
+
+
def uninstall(
id_: str
) -> typing.Generator[T_JSON_DICT,T_JSON_DICT,None]:
diff --git a/pycdp/cdp/heap_profiler.py b/pycdp/cdp/heap_profiler.py
index e28df4d..703ec8a 100644
--- a/pycdp/cdp/heap_profiler.py
+++ b/pycdp/cdp/heap_profiler.py
@@ -213,17 +213,21 @@ def get_sampling_profile() -> typing.Generator[T_JSON_DICT,T_JSON_DICT,SamplingH
def start_sampling(
sampling_interval: typing.Optional[float] = None,
+ stack_depth: typing.Optional[float] = None,
include_objects_collected_by_major_gc: typing.Optional[bool] = None,
include_objects_collected_by_minor_gc: typing.Optional[bool] = None
) -> typing.Generator[T_JSON_DICT,T_JSON_DICT,None]:
'''
:param sampling_interval: *(Optional)* Average sample interval in bytes. Poisson distribution is used for the intervals. The default value is 32768 bytes.
+ :param stack_depth: *(Optional)* Maximum stack depth. The default value is 128.
:param include_objects_collected_by_major_gc: *(Optional)* By default, the sampling heap profiler reports only objects which are still alive when the profile is returned via getSamplingProfile or stopSampling, which is useful for determining what functions contribute the most to steady-state memory usage. This flag instructs the sampling heap profiler to also include information about objects discarded by major GC, which will show which functions cause large temporary memory usage or long GC pauses.
:param include_objects_collected_by_minor_gc: *(Optional)* By default, the sampling heap profiler reports only objects which are still alive when the profile is returned via getSamplingProfile or stopSampling, which is useful for determining what functions contribute the most to steady-state memory usage. This flag instructs the sampling heap profiler to also include information about objects discarded by minor GC, which is useful when tuning a latency-sensitive application for minimal GC activity.
'''
params: T_JSON_DICT = dict()
if sampling_interval is not None:
params['samplingInterval'] = sampling_interval
+ if stack_depth is not None:
+ params['stackDepth'] = stack_depth
if include_objects_collected_by_major_gc is not None:
params['includeObjectsCollectedByMajorGC'] = include_objects_collected_by_major_gc
if include_objects_collected_by_minor_gc is not None:
diff --git a/pycdp/cdp/indexed_db.py b/pycdp/cdp/indexed_db.py
index e8ed977..202de46 100644
--- a/pycdp/cdp/indexed_db.py
+++ b/pycdp/cdp/indexed_db.py
@@ -378,12 +378,12 @@ def enable() -> typing.Generator[T_JSON_DICT,T_JSON_DICT,None]:
def request_data(
database_name: str,
object_store_name: str,
- index_name: str,
skip_count: int,
page_size: int,
security_origin: typing.Optional[str] = None,
storage_key: typing.Optional[str] = None,
storage_bucket: typing.Optional[storage.StorageBucket] = None,
+ index_name: typing.Optional[str] = None,
key_range: typing.Optional[KeyRange] = None
) -> typing.Generator[T_JSON_DICT,T_JSON_DICT,typing.Tuple[typing.List[DataEntry], bool]]:
'''
@@ -394,7 +394,7 @@ def request_data(
:param storage_bucket: *(Optional)* Storage bucket. If not specified, it uses the default bucket.
:param database_name: Database name.
:param object_store_name: Object store name.
- :param index_name: Index name, empty string for object store data requests.
+ :param index_name: *(Optional)* Index name. If not specified, it performs an object store data request.
:param skip_count: Number of records to skip.
:param page_size: Number of records to fetch.
:param key_range: *(Optional)* Key range.
@@ -412,7 +412,8 @@ def request_data(
params['storageBucket'] = storage_bucket.to_json()
params['databaseName'] = database_name
params['objectStoreName'] = object_store_name
- params['indexName'] = index_name
+ if index_name is not None:
+ params['indexName'] = index_name
params['skipCount'] = skip_count
params['pageSize'] = page_size
if key_range is not None:
diff --git a/pycdp/cdp/inspector.py b/pycdp/cdp/inspector.py
index 77f318f..47faa5a 100644
--- a/pycdp/cdp/inspector.py
+++ b/pycdp/cdp/inspector.py
@@ -76,3 +76,20 @@ def from_json(cls, json: T_JSON_DICT) -> TargetReloadedAfterCrash:
return cls(
)
+
+
+@event_class('Inspector.workerScriptLoaded')
+@dataclass
+class WorkerScriptLoaded:
+ '''
+ **EXPERIMENTAL**
+
+ Fired on worker targets when main worker script and any imported scripts have been evaluated.
+ '''
+
+
+ @classmethod
+ def from_json(cls, json: T_JSON_DICT) -> WorkerScriptLoaded:
+ return cls(
+
+ )
diff --git a/pycdp/cdp/media.py b/pycdp/cdp/media.py
index 7f6f430..3fde673 100644
--- a/pycdp/cdp/media.py
+++ b/pycdp/cdp/media.py
@@ -11,6 +11,8 @@
from dataclasses import dataclass
from .util import event_class, T_JSON_DICT
+from . import dom
+
class PlayerId(str):
'''
@@ -183,6 +185,27 @@ def from_json(cls, json: T_JSON_DICT) -> PlayerError:
)
+@dataclass
+class Player:
+ player_id: PlayerId
+
+ dom_node_id: typing.Optional[dom.BackendNodeId] = None
+
+ def to_json(self) -> T_JSON_DICT:
+ json: T_JSON_DICT = dict()
+ json['playerId'] = self.player_id.to_json()
+ if self.dom_node_id is not None:
+ json['domNodeId'] = self.dom_node_id.to_json()
+ return json
+
+ @classmethod
+ def from_json(cls, json: T_JSON_DICT) -> Player:
+ return cls(
+ player_id=PlayerId.from_json(json['playerId']),
+ dom_node_id=dom.BackendNodeId.from_json(json['domNodeId']) if json.get('domNodeId', None) is not None else None,
+ )
+
+
def enable() -> typing.Generator[T_JSON_DICT,T_JSON_DICT,None]:
'''
Enables the Media domain
@@ -273,18 +296,18 @@ def from_json(cls, json: T_JSON_DICT) -> PlayerErrorsRaised:
)
-@event_class('Media.playersCreated')
+@event_class('Media.playerCreated')
@dataclass
-class PlayersCreated:
+class PlayerCreated:
'''
Called whenever a player is created, or when a new agent joins and receives
- a list of active players. If an agent is restored, it will receive the full
- list of player ids and all events again.
+ a list of active players. If an agent is restored, it will receive one
+ event for each active player.
'''
- players: typing.List[PlayerId]
+ player: Player
@classmethod
- def from_json(cls, json: T_JSON_DICT) -> PlayersCreated:
+ def from_json(cls, json: T_JSON_DICT) -> PlayerCreated:
return cls(
- players=[PlayerId.from_json(i) for i in json['players']]
+ player=Player.from_json(json['player'])
)
diff --git a/pycdp/cdp/network.py b/pycdp/cdp/network.py
index 95fab0f..bcb2626 100644
--- a/pycdp/cdp/network.py
+++ b/pycdp/cdp/network.py
@@ -41,6 +41,7 @@ class ResourceType(enum.Enum):
PING = "Ping"
CSP_VIOLATION_REPORT = "CSPViolationReport"
PREFLIGHT = "Preflight"
+ FED_CM = "FedCM"
OTHER = "Other"
def to_json(self) -> str:
@@ -385,6 +386,24 @@ def from_json(cls, json: str) -> ResourcePriority:
return cls(json)
+class RenderBlockingBehavior(enum.Enum):
+ '''
+ The render-blocking behavior of a resource request.
+ '''
+ BLOCKING = "Blocking"
+ IN_BODY_PARSER_BLOCKING = "InBodyParserBlocking"
+ NON_BLOCKING = "NonBlocking"
+ NON_BLOCKING_DYNAMIC = "NonBlockingDynamic"
+ POTENTIALLY_BLOCKING = "PotentiallyBlocking"
+
+ def to_json(self) -> str:
+ return self.value
+
+ @classmethod
+ def from_json(cls, json: str) -> RenderBlockingBehavior:
+ return cls(json)
+
+
@dataclass
class PostDataEntry:
'''
@@ -452,6 +471,9 @@ class Request:
#: request corresponding to the main frame.
is_same_site: typing.Optional[bool] = None
+ #: True when the resource request is ad-related.
+ is_ad_related: typing.Optional[bool] = None
+
def to_json(self) -> T_JSON_DICT:
json: T_JSON_DICT = dict()
json['url'] = self.url
@@ -475,6 +497,8 @@ def to_json(self) -> T_JSON_DICT:
json['trustTokenParams'] = self.trust_token_params.to_json()
if self.is_same_site is not None:
json['isSameSite'] = self.is_same_site
+ if self.is_ad_related is not None:
+ json['isAdRelated'] = self.is_ad_related
return json
@classmethod
@@ -493,6 +517,7 @@ def from_json(cls, json: T_JSON_DICT) -> Request:
is_link_preload=bool(json['isLinkPreload']) if json.get('isLinkPreload', None) is not None else None,
trust_token_params=TrustTokenParams.from_json(json['trustTokenParams']) if json.get('trustTokenParams', None) is not None else None,
is_same_site=bool(json['isSameSite']) if json.get('isSameSite', None) is not None else None,
+ is_ad_related=bool(json['isAdRelated']) if json.get('isAdRelated', None) is not None else None,
)
@@ -672,6 +697,7 @@ class BlockedReason(enum.Enum):
MIXED_CONTENT = "mixed-content"
ORIGIN = "origin"
INSPECTOR = "inspector"
+ INTEGRITY = "integrity"
SUBRESOURCE_FILTER = "subresource-filter"
CONTENT_TYPE = "content-type"
COEP_FRAME_RESOURCE_NEEDS_COEP_HEADER = "coep-frame-resource-needs-coep-header"
@@ -714,21 +740,14 @@ class CorsError(enum.Enum):
PREFLIGHT_INVALID_ALLOW_CREDENTIALS = "PreflightInvalidAllowCredentials"
PREFLIGHT_MISSING_ALLOW_EXTERNAL = "PreflightMissingAllowExternal"
PREFLIGHT_INVALID_ALLOW_EXTERNAL = "PreflightInvalidAllowExternal"
- PREFLIGHT_MISSING_ALLOW_PRIVATE_NETWORK = "PreflightMissingAllowPrivateNetwork"
- PREFLIGHT_INVALID_ALLOW_PRIVATE_NETWORK = "PreflightInvalidAllowPrivateNetwork"
INVALID_ALLOW_METHODS_PREFLIGHT_RESPONSE = "InvalidAllowMethodsPreflightResponse"
INVALID_ALLOW_HEADERS_PREFLIGHT_RESPONSE = "InvalidAllowHeadersPreflightResponse"
METHOD_DISALLOWED_BY_PREFLIGHT_RESPONSE = "MethodDisallowedByPreflightResponse"
HEADER_DISALLOWED_BY_PREFLIGHT_RESPONSE = "HeaderDisallowedByPreflightResponse"
REDIRECT_CONTAINS_CREDENTIALS = "RedirectContainsCredentials"
- INSECURE_PRIVATE_NETWORK = "InsecurePrivateNetwork"
- INVALID_PRIVATE_NETWORK_ACCESS = "InvalidPrivateNetworkAccess"
- UNEXPECTED_PRIVATE_NETWORK_ACCESS = "UnexpectedPrivateNetworkAccess"
+ INSECURE_LOCAL_NETWORK = "InsecureLocalNetwork"
+ INVALID_LOCAL_NETWORK_ACCESS = "InvalidLocalNetworkAccess"
NO_CORS_REDIRECT_MODE_NOT_FOLLOW = "NoCorsRedirectModeNotFollow"
- PREFLIGHT_MISSING_PRIVATE_NETWORK_ACCESS_ID = "PreflightMissingPrivateNetworkAccessId"
- PREFLIGHT_MISSING_PRIVATE_NETWORK_ACCESS_NAME = "PreflightMissingPrivateNetworkAccessName"
- PRIVATE_NETWORK_ACCESS_PERMISSION_UNAVAILABLE = "PrivateNetworkAccessPermissionUnavailable"
- PRIVATE_NETWORK_ACCESS_PERMISSION_DENIED = "PrivateNetworkAccessPermissionDenied"
LOCAL_NETWORK_ACCESS_PERMISSION_DENIED = "LocalNetworkAccessPermissionDenied"
def to_json(self) -> str:
@@ -852,6 +871,7 @@ class ServiceWorkerRouterSource(enum.Enum):
CACHE = "cache"
FETCH_EVENT = "fetch-event"
RACE_NETWORK_AND_FETCH_HANDLER = "race-network-and-fetch-handler"
+ RACE_NETWORK_AND_CACHE = "race-network-and-cache"
def to_json(self) -> str:
return self.value
@@ -1311,9 +1331,6 @@ class Cookie:
#: Cookie Priority
priority: CookiePriority
- #: True if cookie is SameParty.
- same_party: bool
-
#: Cookie source scheme type.
source_scheme: CookieSourceScheme
@@ -1323,6 +1340,9 @@ class Cookie:
source_port: int
#: Cookie expiration date as the number of seconds since the UNIX epoch.
+ #: The value is set to -1 if the expiry date is not set.
+ #: The value can be null for values that cannot be represented in
+ #: JSON (±Inf).
expires: typing.Optional[float] = None
#: Cookie SameSite type.
@@ -1345,7 +1365,6 @@ def to_json(self) -> T_JSON_DICT:
json['secure'] = self.secure
json['session'] = self.session
json['priority'] = self.priority.to_json()
- json['sameParty'] = self.same_party
json['sourceScheme'] = self.source_scheme.to_json()
json['sourcePort'] = self.source_port
if self.expires is not None:
@@ -1370,7 +1389,6 @@ def from_json(cls, json: T_JSON_DICT) -> Cookie:
secure=bool(json['secure']),
session=bool(json['session']),
priority=CookiePriority.from_json(json['priority']),
- same_party=bool(json['sameParty']),
source_scheme=CookieSourceScheme.from_json(json['sourceScheme']),
source_port=int(json['sourcePort']),
expires=float(json['expires']) if json.get('expires', None) is not None else None,
@@ -1401,8 +1419,6 @@ class SetCookieBlockedReason(enum.Enum):
SCHEMEFUL_SAME_SITE_STRICT = "SchemefulSameSiteStrict"
SCHEMEFUL_SAME_SITE_LAX = "SchemefulSameSiteLax"
SCHEMEFUL_SAME_SITE_UNSPECIFIED_TREATED_AS_LAX = "SchemefulSameSiteUnspecifiedTreatedAsLax"
- SAME_PARTY_FROM_CROSS_PARTY_CONTEXT = "SamePartyFromCrossPartyContext"
- SAME_PARTY_CONFLICTS_WITH_OTHER_ATTRIBUTES = "SamePartyConflictsWithOtherAttributes"
NAME_VALUE_PAIR_EXCEEDS_MAX_SIZE = "NameValuePairExceedsMaxSize"
DISALLOWED_CHARACTER = "DisallowedCharacter"
NO_COOKIE_CONTENT = "NoCookieContent"
@@ -1433,10 +1449,10 @@ class CookieBlockedReason(enum.Enum):
SCHEMEFUL_SAME_SITE_STRICT = "SchemefulSameSiteStrict"
SCHEMEFUL_SAME_SITE_LAX = "SchemefulSameSiteLax"
SCHEMEFUL_SAME_SITE_UNSPECIFIED_TREATED_AS_LAX = "SchemefulSameSiteUnspecifiedTreatedAsLax"
- SAME_PARTY_FROM_CROSS_PARTY_CONTEXT = "SamePartyFromCrossPartyContext"
NAME_VALUE_PAIR_EXCEEDS_MAX_SIZE = "NameValuePairExceedsMaxSize"
PORT_MISMATCH = "PortMismatch"
SCHEME_MISMATCH = "SchemeMismatch"
+ ANONYMOUS_CONTEXT = "AnonymousContext"
def to_json(self) -> str:
return self.value
@@ -1604,9 +1620,6 @@ class CookieParam:
#: Cookie Priority.
priority: typing.Optional[CookiePriority] = None
- #: True if cookie is SameParty.
- same_party: typing.Optional[bool] = None
-
#: Cookie source scheme type.
source_scheme: typing.Optional[CookieSourceScheme] = None
@@ -1638,8 +1651,6 @@ def to_json(self) -> T_JSON_DICT:
json['expires'] = self.expires.to_json()
if self.priority is not None:
json['priority'] = self.priority.to_json()
- if self.same_party is not None:
- json['sameParty'] = self.same_party
if self.source_scheme is not None:
json['sourceScheme'] = self.source_scheme.to_json()
if self.source_port is not None:
@@ -1661,7 +1672,6 @@ def from_json(cls, json: T_JSON_DICT) -> CookieParam:
same_site=CookieSameSite.from_json(json['sameSite']) if json.get('sameSite', None) is not None else None,
expires=TimeSinceEpoch.from_json(json['expires']) if json.get('expires', None) is not None else None,
priority=CookiePriority.from_json(json['priority']) if json.get('priority', None) is not None else None,
- same_party=bool(json['sameParty']) if json.get('sameParty', None) is not None else None,
source_scheme=CookieSourceScheme.from_json(json['sourceScheme']) if json.get('sourceScheme', None) is not None else None,
source_port=int(json['sourcePort']) if json.get('sourcePort', None) is not None else None,
partition_key=CookiePartitionKey.from_json(json['partitionKey']) if json.get('partitionKey', None) is not None else None,
@@ -1954,6 +1964,10 @@ class SignedExchangeInfo:
#: The outer response of signed HTTP exchange which was received from network.
outer_response: Response
+ #: Whether network response for the signed exchange was accompanied by
+ #: extra headers.
+ has_extra_info: bool
+
#: Information about the signed exchange header.
header: typing.Optional[SignedExchangeHeader] = None
@@ -1966,6 +1980,7 @@ class SignedExchangeInfo:
def to_json(self) -> T_JSON_DICT:
json: T_JSON_DICT = dict()
json['outerResponse'] = self.outer_response.to_json()
+ json['hasExtraInfo'] = self.has_extra_info
if self.header is not None:
json['header'] = self.header.to_json()
if self.security_details is not None:
@@ -1978,6 +1993,7 @@ def to_json(self) -> T_JSON_DICT:
def from_json(cls, json: T_JSON_DICT) -> SignedExchangeInfo:
return cls(
outer_response=Response.from_json(json['outerResponse']),
+ has_extra_info=bool(json['hasExtraInfo']),
header=SignedExchangeHeader.from_json(json['header']) if json.get('header', None) is not None else None,
security_details=SecurityDetails.from_json(json['securityDetails']) if json.get('securityDetails', None) is not None else None,
errors=[SignedExchangeError.from_json(i) for i in json['errors']] if json.get('errors', None) is not None else None,
@@ -2001,6 +2017,88 @@ def from_json(cls, json: str) -> ContentEncoding:
return cls(json)
+@dataclass
+class NetworkConditions:
+ #: Only matching requests will be affected by these conditions. Patterns use the URLPattern constructor string
+ #: syntax (https://urlpattern.spec.whatwg.org/) and must be absolute. If the pattern is empty, all requests are
+ #: matched (including p2p connections).
+ url_pattern: str
+
+ #: Minimum latency from request sent to response headers received (ms).
+ latency: float
+
+ #: Maximal aggregated download throughput (bytes/sec). -1 disables download throttling.
+ download_throughput: float
+
+ #: Maximal aggregated upload throughput (bytes/sec). -1 disables upload throttling.
+ upload_throughput: float
+
+ #: Connection type if known.
+ connection_type: typing.Optional[ConnectionType] = None
+
+ #: WebRTC packet loss (percent, 0-100). 0 disables packet loss emulation, 100 drops all the packets.
+ packet_loss: typing.Optional[float] = None
+
+ #: WebRTC packet queue length (packet). 0 removes any queue length limitations.
+ packet_queue_length: typing.Optional[int] = None
+
+ #: WebRTC packetReordering feature.
+ packet_reordering: typing.Optional[bool] = None
+
+ def to_json(self) -> T_JSON_DICT:
+ json: T_JSON_DICT = dict()
+ json['urlPattern'] = self.url_pattern
+ json['latency'] = self.latency
+ json['downloadThroughput'] = self.download_throughput
+ json['uploadThroughput'] = self.upload_throughput
+ if self.connection_type is not None:
+ json['connectionType'] = self.connection_type.to_json()
+ if self.packet_loss is not None:
+ json['packetLoss'] = self.packet_loss
+ if self.packet_queue_length is not None:
+ json['packetQueueLength'] = self.packet_queue_length
+ if self.packet_reordering is not None:
+ json['packetReordering'] = self.packet_reordering
+ return json
+
+ @classmethod
+ def from_json(cls, json: T_JSON_DICT) -> NetworkConditions:
+ return cls(
+ url_pattern=str(json['urlPattern']),
+ latency=float(json['latency']),
+ download_throughput=float(json['downloadThroughput']),
+ upload_throughput=float(json['uploadThroughput']),
+ connection_type=ConnectionType.from_json(json['connectionType']) if json.get('connectionType', None) is not None else None,
+ packet_loss=float(json['packetLoss']) if json.get('packetLoss', None) is not None else None,
+ packet_queue_length=int(json['packetQueueLength']) if json.get('packetQueueLength', None) is not None else None,
+ packet_reordering=bool(json['packetReordering']) if json.get('packetReordering', None) is not None else None,
+ )
+
+
+@dataclass
+class BlockPattern:
+ #: URL pattern to match. Patterns use the URLPattern constructor string syntax
+ #: (https://urlpattern.spec.whatwg.org/) and must be absolute. Example: ``*://*:*/*.css``.
+ url_pattern: str
+
+ #: Whether or not to block the pattern. If false, a matching request will not be blocked even if it matches a later
+ #: ``BlockPattern``.
+ block: bool
+
+ def to_json(self) -> T_JSON_DICT:
+ json: T_JSON_DICT = dict()
+ json['urlPattern'] = self.url_pattern
+ json['block'] = self.block
+ return json
+
+ @classmethod
+ def from_json(cls, json: T_JSON_DICT) -> BlockPattern:
+ return cls(
+ url_pattern=str(json['urlPattern']),
+ block=bool(json['block']),
+ )
+
+
class DirectSocketDnsQueryType(enum.Enum):
IPV4 = "ipv4"
IPV6 = "ipv6"
@@ -2053,25 +2151,120 @@ def from_json(cls, json: T_JSON_DICT) -> DirectTCPSocketOptions:
)
-class PrivateNetworkRequestPolicy(enum.Enum):
+@dataclass
+class DirectUDPSocketOptions:
+ remote_addr: typing.Optional[str] = None
+
+ #: Unsigned int 16.
+ remote_port: typing.Optional[int] = None
+
+ local_addr: typing.Optional[str] = None
+
+ #: Unsigned int 16.
+ local_port: typing.Optional[int] = None
+
+ dns_query_type: typing.Optional[DirectSocketDnsQueryType] = None
+
+ #: Expected to be unsigned integer.
+ send_buffer_size: typing.Optional[float] = None
+
+ #: Expected to be unsigned integer.
+ receive_buffer_size: typing.Optional[float] = None
+
+ multicast_loopback: typing.Optional[bool] = None
+
+ #: Unsigned int 8.
+ multicast_time_to_live: typing.Optional[int] = None
+
+ multicast_allow_address_sharing: typing.Optional[bool] = None
+
+ def to_json(self) -> T_JSON_DICT:
+ json: T_JSON_DICT = dict()
+ if self.remote_addr is not None:
+ json['remoteAddr'] = self.remote_addr
+ if self.remote_port is not None:
+ json['remotePort'] = self.remote_port
+ if self.local_addr is not None:
+ json['localAddr'] = self.local_addr
+ if self.local_port is not None:
+ json['localPort'] = self.local_port
+ if self.dns_query_type is not None:
+ json['dnsQueryType'] = self.dns_query_type.to_json()
+ if self.send_buffer_size is not None:
+ json['sendBufferSize'] = self.send_buffer_size
+ if self.receive_buffer_size is not None:
+ json['receiveBufferSize'] = self.receive_buffer_size
+ if self.multicast_loopback is not None:
+ json['multicastLoopback'] = self.multicast_loopback
+ if self.multicast_time_to_live is not None:
+ json['multicastTimeToLive'] = self.multicast_time_to_live
+ if self.multicast_allow_address_sharing is not None:
+ json['multicastAllowAddressSharing'] = self.multicast_allow_address_sharing
+ return json
+
+ @classmethod
+ def from_json(cls, json: T_JSON_DICT) -> DirectUDPSocketOptions:
+ return cls(
+ remote_addr=str(json['remoteAddr']) if json.get('remoteAddr', None) is not None else None,
+ remote_port=int(json['remotePort']) if json.get('remotePort', None) is not None else None,
+ local_addr=str(json['localAddr']) if json.get('localAddr', None) is not None else None,
+ local_port=int(json['localPort']) if json.get('localPort', None) is not None else None,
+ dns_query_type=DirectSocketDnsQueryType.from_json(json['dnsQueryType']) if json.get('dnsQueryType', None) is not None else None,
+ send_buffer_size=float(json['sendBufferSize']) if json.get('sendBufferSize', None) is not None else None,
+ receive_buffer_size=float(json['receiveBufferSize']) if json.get('receiveBufferSize', None) is not None else None,
+ multicast_loopback=bool(json['multicastLoopback']) if json.get('multicastLoopback', None) is not None else None,
+ multicast_time_to_live=int(json['multicastTimeToLive']) if json.get('multicastTimeToLive', None) is not None else None,
+ multicast_allow_address_sharing=bool(json['multicastAllowAddressSharing']) if json.get('multicastAllowAddressSharing', None) is not None else None,
+ )
+
+
+@dataclass
+class DirectUDPMessage:
+ data: str
+
+ #: Null for connected mode.
+ remote_addr: typing.Optional[str] = None
+
+ #: Null for connected mode.
+ #: Expected to be unsigned integer.
+ remote_port: typing.Optional[int] = None
+
+ def to_json(self) -> T_JSON_DICT:
+ json: T_JSON_DICT = dict()
+ json['data'] = self.data
+ if self.remote_addr is not None:
+ json['remoteAddr'] = self.remote_addr
+ if self.remote_port is not None:
+ json['remotePort'] = self.remote_port
+ return json
+
+ @classmethod
+ def from_json(cls, json: T_JSON_DICT) -> DirectUDPMessage:
+ return cls(
+ data=str(json['data']),
+ remote_addr=str(json['remoteAddr']) if json.get('remoteAddr', None) is not None else None,
+ remote_port=int(json['remotePort']) if json.get('remotePort', None) is not None else None,
+ )
+
+
+class LocalNetworkAccessRequestPolicy(enum.Enum):
ALLOW = "Allow"
BLOCK_FROM_INSECURE_TO_MORE_PRIVATE = "BlockFromInsecureToMorePrivate"
WARN_FROM_INSECURE_TO_MORE_PRIVATE = "WarnFromInsecureToMorePrivate"
- PREFLIGHT_BLOCK = "PreflightBlock"
- PREFLIGHT_WARN = "PreflightWarn"
PERMISSION_BLOCK = "PermissionBlock"
+ PERMISSION_WARN = "PermissionWarn"
def to_json(self) -> str:
return self.value
@classmethod
- def from_json(cls, json: str) -> PrivateNetworkRequestPolicy:
+ def from_json(cls, json: str) -> LocalNetworkAccessRequestPolicy:
return cls(json)
class IPAddressSpace(enum.Enum):
+ LOOPBACK = "Loopback"
LOCAL = "Local"
- PRIVATE = "Private"
PUBLIC = "Public"
UNKNOWN = "Unknown"
@@ -2108,13 +2301,13 @@ class ClientSecurityState:
initiator_ip_address_space: IPAddressSpace
- private_network_request_policy: PrivateNetworkRequestPolicy
+ local_network_access_request_policy: LocalNetworkAccessRequestPolicy
def to_json(self) -> T_JSON_DICT:
json: T_JSON_DICT = dict()
json['initiatorIsSecureContext'] = self.initiator_is_secure_context
json['initiatorIPAddressSpace'] = self.initiator_ip_address_space.to_json()
- json['privateNetworkRequestPolicy'] = self.private_network_request_policy.to_json()
+ json['localNetworkAccessRequestPolicy'] = self.local_network_access_request_policy.to_json()
return json
@classmethod
@@ -2122,7 +2315,103 @@ def from_json(cls, json: T_JSON_DICT) -> ClientSecurityState:
return cls(
initiator_is_secure_context=bool(json['initiatorIsSecureContext']),
initiator_ip_address_space=IPAddressSpace.from_json(json['initiatorIPAddressSpace']),
- private_network_request_policy=PrivateNetworkRequestPolicy.from_json(json['privateNetworkRequestPolicy']),
+ local_network_access_request_policy=LocalNetworkAccessRequestPolicy.from_json(json['localNetworkAccessRequestPolicy']),
+ )
+
+
+@dataclass
+class AdScriptIdentifier:
+ '''
+ Identifies the script on the stack that caused a resource or element to be
+ labeled as an ad. For resources, this indicates the context that triggered
+ the fetch. For elements, this indicates the context that caused the element
+ to be appended to the DOM.
+ '''
+ #: The script's V8 identifier.
+ script_id: runtime.ScriptId
+
+ #: V8's debugging ID for the v8::Context.
+ debugger_id: runtime.UniqueDebuggerId
+
+ #: The script's url (or generated name based on id if inline script).
+ name: str
+
+ def to_json(self) -> T_JSON_DICT:
+ json: T_JSON_DICT = dict()
+ json['scriptId'] = self.script_id.to_json()
+ json['debuggerId'] = self.debugger_id.to_json()
+ json['name'] = self.name
+ return json
+
+ @classmethod
+ def from_json(cls, json: T_JSON_DICT) -> AdScriptIdentifier:
+ return cls(
+ script_id=runtime.ScriptId.from_json(json['scriptId']),
+ debugger_id=runtime.UniqueDebuggerId.from_json(json['debuggerId']),
+ name=str(json['name']),
+ )
+
+
+@dataclass
+class AdAncestry:
+ '''
+ Encapsulates the script ancestry and the root script filter list rule that
+ caused the resource or element to be labeled as an ad.
+ '''
+ #: A chain of ``AdScriptIdentifier``'s representing the ancestry of an ad
+ #: script that led to the creation of a resource or element. The chain is
+ #: ordered from the script itself (lowest level) up to its root ancestor
+ #: that was flagged by a filter list.
+ ancestry_chain: typing.List[AdScriptIdentifier]
+
+ #: The filter list rule that caused the root (last) script in
+ #: ``ancestryChain`` to be tagged as an ad.
+ root_script_filterlist_rule: typing.Optional[str] = None
+
+ def to_json(self) -> T_JSON_DICT:
+ json: T_JSON_DICT = dict()
+ json['ancestryChain'] = [i.to_json() for i in self.ancestry_chain]
+ if self.root_script_filterlist_rule is not None:
+ json['rootScriptFilterlistRule'] = self.root_script_filterlist_rule
+ return json
+
+ @classmethod
+ def from_json(cls, json: T_JSON_DICT) -> AdAncestry:
+ return cls(
+ ancestry_chain=[AdScriptIdentifier.from_json(i) for i in json['ancestryChain']],
+ root_script_filterlist_rule=str(json['rootScriptFilterlistRule']) if json.get('rootScriptFilterlistRule', None) is not None else None,
+ )
+
+
+@dataclass
+class AdProvenance:
+ '''
+ Represents the provenance of an ad resource or element. Only one of
+ ``filterlistRule`` or ``adScriptAncestry`` can be set. If ``filterlistRule``
+ is provided, the resource URL directly matches a filter list rule. If
+ ``adScriptAncestry`` is provided, an ad script initiated the resource fetch or
+ appended the element to the DOM. If neither is provided, the entity is
+ known to be an ad, but provenance tracking information is unavailable.
+ '''
+ #: The filterlist rule that matched, if any.
+ filterlist_rule: typing.Optional[str] = None
+
+ #: The script ancestry that created the ad, if any.
+ ad_script_ancestry: typing.Optional[AdAncestry] = None
+
+ def to_json(self) -> T_JSON_DICT:
+ json: T_JSON_DICT = dict()
+ if self.filterlist_rule is not None:
+ json['filterlistRule'] = self.filterlist_rule
+ if self.ad_script_ancestry is not None:
+ json['adScriptAncestry'] = self.ad_script_ancestry.to_json()
+ return json
+
+ @classmethod
+ def from_json(cls, json: T_JSON_DICT) -> AdProvenance:
+ return cls(
+ filterlist_rule=str(json['filterlistRule']) if json.get('filterlistRule', None) is not None else None,
+ ad_script_ancestry=AdAncestry.from_json(json['adScriptAncestry']) if json.get('adScriptAncestry', None) is not None else None,
)
@@ -2388,120 +2677,589 @@ def from_json(cls, json: T_JSON_DICT) -> ReportingApiEndpoint:
@dataclass
-class LoadNetworkResourcePageResult:
+class DeviceBoundSessionKey:
'''
- An object providing the result of a network resource load.
+ Unique identifier for a device bound session.
'''
- success: bool
-
- #: Optional values used for error reporting.
- net_error: typing.Optional[float] = None
-
- net_error_name: typing.Optional[str] = None
+ #: The site the session is set up for.
+ site: str
- http_status_code: typing.Optional[float] = None
-
- #: If successful, one of the following two fields holds the result.
- stream: typing.Optional[io.StreamHandle] = None
-
- #: Response headers.
- headers: typing.Optional[Headers] = None
+ #: The id of the session.
+ id_: str
def to_json(self) -> T_JSON_DICT:
json: T_JSON_DICT = dict()
- json['success'] = self.success
- if self.net_error is not None:
- json['netError'] = self.net_error
- if self.net_error_name is not None:
- json['netErrorName'] = self.net_error_name
- if self.http_status_code is not None:
- json['httpStatusCode'] = self.http_status_code
- if self.stream is not None:
- json['stream'] = self.stream.to_json()
- if self.headers is not None:
- json['headers'] = self.headers.to_json()
+ json['site'] = self.site
+ json['id'] = self.id_
return json
@classmethod
- def from_json(cls, json: T_JSON_DICT) -> LoadNetworkResourcePageResult:
+ def from_json(cls, json: T_JSON_DICT) -> DeviceBoundSessionKey:
return cls(
- success=bool(json['success']),
- net_error=float(json['netError']) if json.get('netError', None) is not None else None,
- net_error_name=str(json['netErrorName']) if json.get('netErrorName', None) is not None else None,
- http_status_code=float(json['httpStatusCode']) if json.get('httpStatusCode', None) is not None else None,
- stream=io.StreamHandle.from_json(json['stream']) if json.get('stream', None) is not None else None,
- headers=Headers.from_json(json['headers']) if json.get('headers', None) is not None else None,
+ site=str(json['site']),
+ id_=str(json['id']),
)
@dataclass
-class LoadNetworkResourceOptions:
+class DeviceBoundSessionWithUsage:
'''
- An options object that may be extended later to better support CORS,
- CORB and streaming.
+ How a device bound session was used during a request.
'''
- disable_cache: bool
+ #: The key for the session.
+ session_key: DeviceBoundSessionKey
- include_credentials: bool
+ #: How the session was used (or not used).
+ usage: str
def to_json(self) -> T_JSON_DICT:
json: T_JSON_DICT = dict()
- json['disableCache'] = self.disable_cache
- json['includeCredentials'] = self.include_credentials
+ json['sessionKey'] = self.session_key.to_json()
+ json['usage'] = self.usage
return json
@classmethod
- def from_json(cls, json: T_JSON_DICT) -> LoadNetworkResourceOptions:
+ def from_json(cls, json: T_JSON_DICT) -> DeviceBoundSessionWithUsage:
return cls(
- disable_cache=bool(json['disableCache']),
- include_credentials=bool(json['includeCredentials']),
+ session_key=DeviceBoundSessionKey.from_json(json['sessionKey']),
+ usage=str(json['usage']),
)
-def set_accepted_encodings(
- encodings: typing.List[ContentEncoding]
- ) -> typing.Generator[T_JSON_DICT,T_JSON_DICT,None]:
+@dataclass
+class DeviceBoundSessionCookieCraving:
'''
- Sets a list of content encodings that will be accepted. Empty list means no encoding is accepted.
+ A device bound session's cookie craving.
+ '''
+ #: The name of the craving.
+ name: str
- **EXPERIMENTAL**
+ #: The domain of the craving.
+ domain: str
- :param encodings: List of accepted content encodings.
- '''
- params: T_JSON_DICT = dict()
- params['encodings'] = [i.to_json() for i in encodings]
- cmd_dict: T_JSON_DICT = {
- 'method': 'Network.setAcceptedEncodings',
- 'params': params,
- }
- json = yield cmd_dict
+ #: The path of the craving.
+ path: str
+ #: The ``Secure`` attribute of the craving attributes.
+ secure: bool
-def clear_accepted_encodings_override() -> typing.Generator[T_JSON_DICT,T_JSON_DICT,None]:
- '''
- Clears accepted encodings set by setAcceptedEncodings
+ #: The ``HttpOnly`` attribute of the craving attributes.
+ http_only: bool
- **EXPERIMENTAL**
- '''
- cmd_dict: T_JSON_DICT = {
- 'method': 'Network.clearAcceptedEncodingsOverride',
- }
- json = yield cmd_dict
+ #: The ``SameSite`` attribute of the craving attributes.
+ same_site: typing.Optional[CookieSameSite] = None
+ def to_json(self) -> T_JSON_DICT:
+ json: T_JSON_DICT = dict()
+ json['name'] = self.name
+ json['domain'] = self.domain
+ json['path'] = self.path
+ json['secure'] = self.secure
+ json['httpOnly'] = self.http_only
+ if self.same_site is not None:
+ json['sameSite'] = self.same_site.to_json()
+ return json
-@deprecated(version="1.3")
-def can_clear_browser_cache() -> typing.Generator[T_JSON_DICT,T_JSON_DICT,bool]:
- '''
- Tells whether clearing browser cache is supported.
+ @classmethod
+ def from_json(cls, json: T_JSON_DICT) -> DeviceBoundSessionCookieCraving:
+ return cls(
+ name=str(json['name']),
+ domain=str(json['domain']),
+ path=str(json['path']),
+ secure=bool(json['secure']),
+ http_only=bool(json['httpOnly']),
+ same_site=CookieSameSite.from_json(json['sameSite']) if json.get('sameSite', None) is not None else None,
+ )
- .. deprecated:: 1.3
- :returns: True if browser cache can be cleared.
+@dataclass
+class DeviceBoundSessionUrlRule:
'''
- cmd_dict: T_JSON_DICT = {
- 'method': 'Network.canClearBrowserCache',
- }
- json = yield cmd_dict
+ A device bound session's inclusion URL rule.
+ '''
+ #: See comments on ``net::device_bound_sessions::SessionInclusionRules::UrlRule::rule_type``.
+ rule_type: str
+
+ #: See comments on ``net::device_bound_sessions::SessionInclusionRules::UrlRule::host_pattern``.
+ host_pattern: str
+
+ #: See comments on ``net::device_bound_sessions::SessionInclusionRules::UrlRule::path_prefix``.
+ path_prefix: str
+
+ def to_json(self) -> T_JSON_DICT:
+ json: T_JSON_DICT = dict()
+ json['ruleType'] = self.rule_type
+ json['hostPattern'] = self.host_pattern
+ json['pathPrefix'] = self.path_prefix
+ return json
+
+ @classmethod
+ def from_json(cls, json: T_JSON_DICT) -> DeviceBoundSessionUrlRule:
+ return cls(
+ rule_type=str(json['ruleType']),
+ host_pattern=str(json['hostPattern']),
+ path_prefix=str(json['pathPrefix']),
+ )
+
+
+@dataclass
+class DeviceBoundSessionInclusionRules:
+ '''
+ A device bound session's inclusion rules.
+ '''
+ #: See comments on ``net::device_bound_sessions::SessionInclusionRules::origin_``.
+ origin: str
+
+ #: Whether the whole site is included. See comments on
+ #: ``net::device_bound_sessions::SessionInclusionRules::include_site_`` for more
+ #: details; this boolean is true if that value is populated.
+ include_site: bool
+
+ #: See comments on ``net::device_bound_sessions::SessionInclusionRules::url_rules_``.
+ url_rules: typing.List[DeviceBoundSessionUrlRule]
+
+ def to_json(self) -> T_JSON_DICT:
+ json: T_JSON_DICT = dict()
+ json['origin'] = self.origin
+ json['includeSite'] = self.include_site
+ json['urlRules'] = [i.to_json() for i in self.url_rules]
+ return json
+
+ @classmethod
+ def from_json(cls, json: T_JSON_DICT) -> DeviceBoundSessionInclusionRules:
+ return cls(
+ origin=str(json['origin']),
+ include_site=bool(json['includeSite']),
+ url_rules=[DeviceBoundSessionUrlRule.from_json(i) for i in json['urlRules']],
+ )
+
+
+@dataclass
+class DeviceBoundSession:
+ '''
+ A device bound session.
+ '''
+ #: The site and session ID of the session.
+ key: DeviceBoundSessionKey
+
+ #: See comments on ``net::device_bound_sessions::Session::refresh_url_``.
+ refresh_url: str
+
+ #: See comments on ``net::device_bound_sessions::Session::inclusion_rules_``.
+ inclusion_rules: DeviceBoundSessionInclusionRules
+
+ #: See comments on ``net::device_bound_sessions::Session::cookie_cravings_``.
+ cookie_cravings: typing.List[DeviceBoundSessionCookieCraving]
+
+ #: See comments on ``net::device_bound_sessions::Session::expiry_date_``.
+ expiry_date: TimeSinceEpoch
+
+ #: See comments on ``net::device_bound_sessions::Session::allowed_refresh_initiators_``.
+ allowed_refresh_initiators: typing.List[str]
+
+ #: See comments on ``net::device_bound_sessions::Session::cached_challenge__``.
+ cached_challenge: typing.Optional[str] = None
+
+ def to_json(self) -> T_JSON_DICT:
+ json: T_JSON_DICT = dict()
+ json['key'] = self.key.to_json()
+ json['refreshUrl'] = self.refresh_url
+ json['inclusionRules'] = self.inclusion_rules.to_json()
+ json['cookieCravings'] = [i.to_json() for i in self.cookie_cravings]
+ json['expiryDate'] = self.expiry_date.to_json()
+ json['allowedRefreshInitiators'] = [i for i in self.allowed_refresh_initiators]
+ if self.cached_challenge is not None:
+ json['cachedChallenge'] = self.cached_challenge
+ return json
+
+ @classmethod
+ def from_json(cls, json: T_JSON_DICT) -> DeviceBoundSession:
+ return cls(
+ key=DeviceBoundSessionKey.from_json(json['key']),
+ refresh_url=str(json['refreshUrl']),
+ inclusion_rules=DeviceBoundSessionInclusionRules.from_json(json['inclusionRules']),
+ cookie_cravings=[DeviceBoundSessionCookieCraving.from_json(i) for i in json['cookieCravings']],
+ expiry_date=TimeSinceEpoch.from_json(json['expiryDate']),
+ allowed_refresh_initiators=[str(i) for i in json['allowedRefreshInitiators']],
+ cached_challenge=str(json['cachedChallenge']) if json.get('cachedChallenge', None) is not None else None,
+ )
+
+
+class DeviceBoundSessionEventId(str):
+ '''
+ A unique identifier for a device bound session event.
+ '''
+ def to_json(self) -> str:
+ return self
+
+ @classmethod
+ def from_json(cls, json: str) -> DeviceBoundSessionEventId:
+ return cls(json)
+
+ def __repr__(self):
+ return 'DeviceBoundSessionEventId({})'.format(super().__repr__())
+
+
+class DeviceBoundSessionFetchResult(enum.Enum):
+ '''
+ A fetch result for a device bound session creation or refresh.
+ '''
+ SUCCESS = "Success"
+ KEY_ERROR = "KeyError"
+ SIGNING_ERROR = "SigningError"
+ SERVER_REQUESTED_TERMINATION = "ServerRequestedTermination"
+ INVALID_SESSION_ID = "InvalidSessionId"
+ INVALID_CHALLENGE = "InvalidChallenge"
+ TOO_MANY_CHALLENGES = "TooManyChallenges"
+ INVALID_FETCHER_URL = "InvalidFetcherUrl"
+ INVALID_REFRESH_URL = "InvalidRefreshUrl"
+ TRANSIENT_HTTP_ERROR = "TransientHttpError"
+ SCOPE_ORIGIN_SAME_SITE_MISMATCH = "ScopeOriginSameSiteMismatch"
+ REFRESH_URL_SAME_SITE_MISMATCH = "RefreshUrlSameSiteMismatch"
+ MISMATCHED_SESSION_ID = "MismatchedSessionId"
+ MISSING_SCOPE = "MissingScope"
+ NO_CREDENTIALS = "NoCredentials"
+ SUBDOMAIN_REGISTRATION_WELL_KNOWN_UNAVAILABLE = "SubdomainRegistrationWellKnownUnavailable"
+ SUBDOMAIN_REGISTRATION_UNAUTHORIZED = "SubdomainRegistrationUnauthorized"
+ SUBDOMAIN_REGISTRATION_WELL_KNOWN_MALFORMED = "SubdomainRegistrationWellKnownMalformed"
+ SESSION_PROVIDER_WELL_KNOWN_UNAVAILABLE = "SessionProviderWellKnownUnavailable"
+ RELYING_PARTY_WELL_KNOWN_UNAVAILABLE = "RelyingPartyWellKnownUnavailable"
+ FEDERATED_KEY_THUMBPRINT_MISMATCH = "FederatedKeyThumbprintMismatch"
+ INVALID_FEDERATED_SESSION_URL = "InvalidFederatedSessionUrl"
+ INVALID_FEDERATED_KEY = "InvalidFederatedKey"
+ TOO_MANY_RELYING_ORIGIN_LABELS = "TooManyRelyingOriginLabels"
+ BOUND_COOKIE_SET_FORBIDDEN = "BoundCookieSetForbidden"
+ NET_ERROR = "NetError"
+ PROXY_ERROR = "ProxyError"
+ EMPTY_SESSION_CONFIG = "EmptySessionConfig"
+ INVALID_CREDENTIALS_CONFIG = "InvalidCredentialsConfig"
+ INVALID_CREDENTIALS_TYPE = "InvalidCredentialsType"
+ INVALID_CREDENTIALS_EMPTY_NAME = "InvalidCredentialsEmptyName"
+ INVALID_CREDENTIALS_COOKIE = "InvalidCredentialsCookie"
+ PERSISTENT_HTTP_ERROR = "PersistentHttpError"
+ REGISTRATION_ATTEMPTED_CHALLENGE = "RegistrationAttemptedChallenge"
+ INVALID_SCOPE_ORIGIN = "InvalidScopeOrigin"
+ SCOPE_ORIGIN_CONTAINS_PATH = "ScopeOriginContainsPath"
+ REFRESH_INITIATOR_NOT_STRING = "RefreshInitiatorNotString"
+ REFRESH_INITIATOR_INVALID_HOST_PATTERN = "RefreshInitiatorInvalidHostPattern"
+ INVALID_SCOPE_SPECIFICATION = "InvalidScopeSpecification"
+ MISSING_SCOPE_SPECIFICATION_TYPE = "MissingScopeSpecificationType"
+ EMPTY_SCOPE_SPECIFICATION_DOMAIN = "EmptyScopeSpecificationDomain"
+ EMPTY_SCOPE_SPECIFICATION_PATH = "EmptyScopeSpecificationPath"
+ INVALID_SCOPE_SPECIFICATION_TYPE = "InvalidScopeSpecificationType"
+ INVALID_SCOPE_INCLUDE_SITE = "InvalidScopeIncludeSite"
+ MISSING_SCOPE_INCLUDE_SITE = "MissingScopeIncludeSite"
+ FEDERATED_NOT_AUTHORIZED_BY_PROVIDER = "FederatedNotAuthorizedByProvider"
+ FEDERATED_NOT_AUTHORIZED_BY_RELYING_PARTY = "FederatedNotAuthorizedByRelyingParty"
+ SESSION_PROVIDER_WELL_KNOWN_MALFORMED = "SessionProviderWellKnownMalformed"
+ SESSION_PROVIDER_WELL_KNOWN_HAS_PROVIDER_ORIGIN = "SessionProviderWellKnownHasProviderOrigin"
+ RELYING_PARTY_WELL_KNOWN_MALFORMED = "RelyingPartyWellKnownMalformed"
+ RELYING_PARTY_WELL_KNOWN_HAS_RELYING_ORIGINS = "RelyingPartyWellKnownHasRelyingOrigins"
+ INVALID_FEDERATED_SESSION_PROVIDER_SESSION_MISSING = "InvalidFederatedSessionProviderSessionMissing"
+ INVALID_FEDERATED_SESSION_WRONG_PROVIDER_ORIGIN = "InvalidFederatedSessionWrongProviderOrigin"
+ INVALID_CREDENTIALS_COOKIE_CREATION_TIME = "InvalidCredentialsCookieCreationTime"
+ INVALID_CREDENTIALS_COOKIE_NAME = "InvalidCredentialsCookieName"
+ INVALID_CREDENTIALS_COOKIE_PARSING = "InvalidCredentialsCookieParsing"
+ INVALID_CREDENTIALS_COOKIE_UNPERMITTED_ATTRIBUTE = "InvalidCredentialsCookieUnpermittedAttribute"
+ INVALID_CREDENTIALS_COOKIE_INVALID_DOMAIN = "InvalidCredentialsCookieInvalidDomain"
+ INVALID_CREDENTIALS_COOKIE_PREFIX = "InvalidCredentialsCookiePrefix"
+ INVALID_SCOPE_RULE_PATH = "InvalidScopeRulePath"
+ INVALID_SCOPE_RULE_HOST_PATTERN = "InvalidScopeRuleHostPattern"
+ SCOPE_RULE_ORIGIN_SCOPED_HOST_PATTERN_MISMATCH = "ScopeRuleOriginScopedHostPatternMismatch"
+ SCOPE_RULE_SITE_SCOPED_HOST_PATTERN_MISMATCH = "ScopeRuleSiteScopedHostPatternMismatch"
+ SIGNING_QUOTA_EXCEEDED = "SigningQuotaExceeded"
+ INVALID_CONFIG_JSON = "InvalidConfigJson"
+ INVALID_FEDERATED_SESSION_PROVIDER_FAILED_TO_RESTORE_KEY = "InvalidFederatedSessionProviderFailedToRestoreKey"
+ FAILED_TO_UNWRAP_KEY = "FailedToUnwrapKey"
+ SESSION_DELETED_DURING_REFRESH = "SessionDeletedDuringRefresh"
+
+ def to_json(self) -> str:
+ return self.value
+
+ @classmethod
+ def from_json(cls, json: str) -> DeviceBoundSessionFetchResult:
+ return cls(json)
+
+
+@dataclass
+class DeviceBoundSessionFailedRequest:
+ '''
+ Details about a failed device bound session network request.
+ '''
+ #: The failed request URL.
+ request_url: str
+
+ #: The net error of the response if it was not OK.
+ net_error: typing.Optional[str] = None
+
+ #: The response code if the net error was OK and the response code was not
+ #: 200.
+ response_error: typing.Optional[int] = None
+
+ #: The body of the response if the net error was OK, the response code was
+ #: not 200, and the response body was not empty.
+ response_error_body: typing.Optional[str] = None
+
+ def to_json(self) -> T_JSON_DICT:
+ json: T_JSON_DICT = dict()
+ json['requestUrl'] = self.request_url
+ if self.net_error is not None:
+ json['netError'] = self.net_error
+ if self.response_error is not None:
+ json['responseError'] = self.response_error
+ if self.response_error_body is not None:
+ json['responseErrorBody'] = self.response_error_body
+ return json
+
+ @classmethod
+ def from_json(cls, json: T_JSON_DICT) -> DeviceBoundSessionFailedRequest:
+ return cls(
+ request_url=str(json['requestUrl']),
+ net_error=str(json['netError']) if json.get('netError', None) is not None else None,
+ response_error=int(json['responseError']) if json.get('responseError', None) is not None else None,
+ response_error_body=str(json['responseErrorBody']) if json.get('responseErrorBody', None) is not None else None,
+ )
+
+
+@dataclass
+class CreationEventDetails:
+ '''
+ Session event details specific to creation.
+ '''
+ #: The result of the fetch attempt.
+ fetch_result: DeviceBoundSessionFetchResult
+
+ #: The session if there was a newly created session. This is populated for
+ #: all successful creation events.
+ new_session: typing.Optional[DeviceBoundSession] = None
+
+ #: Details about a failed device bound session network request if there was
+ #: one.
+ failed_request: typing.Optional[DeviceBoundSessionFailedRequest] = None
+
+ def to_json(self) -> T_JSON_DICT:
+ json: T_JSON_DICT = dict()
+ json['fetchResult'] = self.fetch_result.to_json()
+ if self.new_session is not None:
+ json['newSession'] = self.new_session.to_json()
+ if self.failed_request is not None:
+ json['failedRequest'] = self.failed_request.to_json()
+ return json
+
+ @classmethod
+ def from_json(cls, json: T_JSON_DICT) -> CreationEventDetails:
+ return cls(
+ fetch_result=DeviceBoundSessionFetchResult.from_json(json['fetchResult']),
+ new_session=DeviceBoundSession.from_json(json['newSession']) if json.get('newSession', None) is not None else None,
+ failed_request=DeviceBoundSessionFailedRequest.from_json(json['failedRequest']) if json.get('failedRequest', None) is not None else None,
+ )
+
+
+@dataclass
+class RefreshEventDetails:
+ '''
+ Session event details specific to refresh.
+ '''
+ #: The result of a refresh.
+ refresh_result: str
+
+ #: See comments on ``net::device_bound_sessions::RefreshEventResult::was_fully_proactive_refresh``.
+ was_fully_proactive_refresh: bool
+
+ #: If there was a fetch attempt, the result of that.
+ fetch_result: typing.Optional[DeviceBoundSessionFetchResult] = None
+
+ #: The session display if there was a newly created session. This is populated
+ #: for any refresh event that modifies the session config.
+ new_session: typing.Optional[DeviceBoundSession] = None
+
+ #: Details about a failed device bound session network request if there was
+ #: one.
+ failed_request: typing.Optional[DeviceBoundSessionFailedRequest] = None
+
+ def to_json(self) -> T_JSON_DICT:
+ json: T_JSON_DICT = dict()
+ json['refreshResult'] = self.refresh_result
+ json['wasFullyProactiveRefresh'] = self.was_fully_proactive_refresh
+ if self.fetch_result is not None:
+ json['fetchResult'] = self.fetch_result.to_json()
+ if self.new_session is not None:
+ json['newSession'] = self.new_session.to_json()
+ if self.failed_request is not None:
+ json['failedRequest'] = self.failed_request.to_json()
+ return json
+
+ @classmethod
+ def from_json(cls, json: T_JSON_DICT) -> RefreshEventDetails:
+ return cls(
+ refresh_result=str(json['refreshResult']),
+ was_fully_proactive_refresh=bool(json['wasFullyProactiveRefresh']),
+ fetch_result=DeviceBoundSessionFetchResult.from_json(json['fetchResult']) if json.get('fetchResult', None) is not None else None,
+ new_session=DeviceBoundSession.from_json(json['newSession']) if json.get('newSession', None) is not None else None,
+ failed_request=DeviceBoundSessionFailedRequest.from_json(json['failedRequest']) if json.get('failedRequest', None) is not None else None,
+ )
+
+
+@dataclass
+class TerminationEventDetails:
+ '''
+ Session event details specific to termination.
+ '''
+ #: The reason for a session being deleted.
+ deletion_reason: str
+
+ def to_json(self) -> T_JSON_DICT:
+ json: T_JSON_DICT = dict()
+ json['deletionReason'] = self.deletion_reason
+ return json
+
+ @classmethod
+ def from_json(cls, json: T_JSON_DICT) -> TerminationEventDetails:
+ return cls(
+ deletion_reason=str(json['deletionReason']),
+ )
+
+
+@dataclass
+class ChallengeEventDetails:
+ '''
+ Session event details specific to challenges.
+ '''
+ #: The result of a challenge.
+ challenge_result: str
+
+ #: The challenge set.
+ challenge: str
+
+ def to_json(self) -> T_JSON_DICT:
+ json: T_JSON_DICT = dict()
+ json['challengeResult'] = self.challenge_result
+ json['challenge'] = self.challenge
+ return json
+
+ @classmethod
+ def from_json(cls, json: T_JSON_DICT) -> ChallengeEventDetails:
+ return cls(
+ challenge_result=str(json['challengeResult']),
+ challenge=str(json['challenge']),
+ )
+
+
+@dataclass
+class LoadNetworkResourcePageResult:
+ '''
+ An object providing the result of a network resource load.
+ '''
+ success: bool
+
+ #: Optional values used for error reporting.
+ net_error: typing.Optional[float] = None
+
+ net_error_name: typing.Optional[str] = None
+
+ http_status_code: typing.Optional[float] = None
+
+ #: If successful, one of the following two fields holds the result.
+ stream: typing.Optional[io.StreamHandle] = None
+
+ #: Response headers.
+ headers: typing.Optional[Headers] = None
+
+ def to_json(self) -> T_JSON_DICT:
+ json: T_JSON_DICT = dict()
+ json['success'] = self.success
+ if self.net_error is not None:
+ json['netError'] = self.net_error
+ if self.net_error_name is not None:
+ json['netErrorName'] = self.net_error_name
+ if self.http_status_code is not None:
+ json['httpStatusCode'] = self.http_status_code
+ if self.stream is not None:
+ json['stream'] = self.stream.to_json()
+ if self.headers is not None:
+ json['headers'] = self.headers.to_json()
+ return json
+
+ @classmethod
+ def from_json(cls, json: T_JSON_DICT) -> LoadNetworkResourcePageResult:
+ return cls(
+ success=bool(json['success']),
+ net_error=float(json['netError']) if json.get('netError', None) is not None else None,
+ net_error_name=str(json['netErrorName']) if json.get('netErrorName', None) is not None else None,
+ http_status_code=float(json['httpStatusCode']) if json.get('httpStatusCode', None) is not None else None,
+ stream=io.StreamHandle.from_json(json['stream']) if json.get('stream', None) is not None else None,
+ headers=Headers.from_json(json['headers']) if json.get('headers', None) is not None else None,
+ )
+
+
+@dataclass
+class LoadNetworkResourceOptions:
+ '''
+ An options object that may be extended later to better support CORS,
+ CORB and streaming.
+ '''
+ disable_cache: bool
+
+ include_credentials: bool
+
+ def to_json(self) -> T_JSON_DICT:
+ json: T_JSON_DICT = dict()
+ json['disableCache'] = self.disable_cache
+ json['includeCredentials'] = self.include_credentials
+ return json
+
+ @classmethod
+ def from_json(cls, json: T_JSON_DICT) -> LoadNetworkResourceOptions:
+ return cls(
+ disable_cache=bool(json['disableCache']),
+ include_credentials=bool(json['includeCredentials']),
+ )
+
+
+def set_accepted_encodings(
+ encodings: typing.List[ContentEncoding]
+ ) -> typing.Generator[T_JSON_DICT,T_JSON_DICT,None]:
+ '''
+ Sets a list of content encodings that will be accepted. Empty list means no encoding is accepted.
+
+ **EXPERIMENTAL**
+
+ :param encodings: List of accepted content encodings.
+ '''
+ params: T_JSON_DICT = dict()
+ params['encodings'] = [i.to_json() for i in encodings]
+ cmd_dict: T_JSON_DICT = {
+ 'method': 'Network.setAcceptedEncodings',
+ 'params': params,
+ }
+ json = yield cmd_dict
+
+
+def clear_accepted_encodings_override() -> typing.Generator[T_JSON_DICT,T_JSON_DICT,None]:
+ '''
+ Clears accepted encodings set by setAcceptedEncodings
+
+ **EXPERIMENTAL**
+ '''
+ cmd_dict: T_JSON_DICT = {
+ 'method': 'Network.clearAcceptedEncodingsOverride',
+ }
+ json = yield cmd_dict
+
+
+@deprecated(version="1.3")
+def can_clear_browser_cache() -> typing.Generator[T_JSON_DICT,T_JSON_DICT,bool]:
+ '''
+ Tells whether clearing browser cache is supported.
+
+ .. deprecated:: 1.3
+
+ :returns: True if browser cache can be cleared.
+ '''
+ cmd_dict: T_JSON_DICT = {
+ 'method': 'Network.canClearBrowserCache',
+ }
+ json = yield cmd_dict
return bool(json['result'])
@@ -2654,6 +3412,7 @@ def disable() -> typing.Generator[T_JSON_DICT,T_JSON_DICT,None]:
json = yield cmd_dict
+@deprecated(version="1.3")
def emulate_network_conditions(
offline: bool,
latency: float,
@@ -2665,7 +3424,10 @@ def emulate_network_conditions(
packet_reordering: typing.Optional[bool] = None
) -> typing.Generator[T_JSON_DICT,T_JSON_DICT,None]:
'''
- Activates emulation of network conditions.
+ Activates emulation of network conditions. This command is deprecated in favor of the emulateNetworkConditionsByRule
+ and overrideNetworkState commands, which can be used together to the same effect.
+
+ .. deprecated:: 1.3
:param offline: True to emulate internet disconnection.
:param latency: Minimum latency from request sent to response headers received (ms).
@@ -2696,17 +3458,79 @@ def emulate_network_conditions(
json = yield cmd_dict
+def emulate_network_conditions_by_rule(
+ offline: bool,
+ matched_network_conditions: typing.List[NetworkConditions]
+ ) -> typing.Generator[T_JSON_DICT,T_JSON_DICT,typing.List[str]]:
+ '''
+ Activates emulation of network conditions for individual requests using URL match patterns. Unlike the deprecated
+ Network.emulateNetworkConditions this method does not affect ``navigator`` state. Use Network.overrideNetworkState to
+ explicitly modify ``navigator`` behavior.
+
+ **EXPERIMENTAL**
+
+ :param offline: True to emulate internet disconnection.
+ :param matched_network_conditions: Configure conditions for matching requests. If multiple entries match a request, the first entry wins. Global conditions can be configured by leaving the urlPattern for the conditions empty. These global conditions are also applied for throttling of p2p connections.
+ :returns: An id for each entry in matchedNetworkConditions. The id will be included in the requestWillBeSentExtraInfo for requests affected by a rule.
+ '''
+ params: T_JSON_DICT = dict()
+ params['offline'] = offline
+ params['matchedNetworkConditions'] = [i.to_json() for i in matched_network_conditions]
+ cmd_dict: T_JSON_DICT = {
+ 'method': 'Network.emulateNetworkConditionsByRule',
+ 'params': params,
+ }
+ json = yield cmd_dict
+ return [str(i) for i in json['ruleIds']]
+
+
+def override_network_state(
+ offline: bool,
+ latency: float,
+ download_throughput: float,
+ upload_throughput: float,
+ connection_type: typing.Optional[ConnectionType] = None
+ ) -> typing.Generator[T_JSON_DICT,T_JSON_DICT,None]:
+ '''
+ Override the state of navigator.onLine and navigator.connection.
+
+ **EXPERIMENTAL**
+
+ :param offline: True to emulate internet disconnection.
+ :param latency: Minimum latency from request sent to response headers received (ms).
+ :param download_throughput: Maximal aggregated download throughput (bytes/sec). -1 disables download throttling.
+ :param upload_throughput: Maximal aggregated upload throughput (bytes/sec). -1 disables upload throttling.
+ :param connection_type: *(Optional)* Connection type if known.
+ '''
+ params: T_JSON_DICT = dict()
+ params['offline'] = offline
+ params['latency'] = latency
+ params['downloadThroughput'] = download_throughput
+ params['uploadThroughput'] = upload_throughput
+ if connection_type is not None:
+ params['connectionType'] = connection_type.to_json()
+ cmd_dict: T_JSON_DICT = {
+ 'method': 'Network.overrideNetworkState',
+ 'params': params,
+ }
+ json = yield cmd_dict
+
+
def enable(
max_total_buffer_size: typing.Optional[int] = None,
max_resource_buffer_size: typing.Optional[int] = None,
- max_post_data_size: typing.Optional[int] = None
+ max_post_data_size: typing.Optional[int] = None,
+ report_direct_socket_traffic: typing.Optional[bool] = None,
+ enable_durable_messages: typing.Optional[bool] = None
) -> typing.Generator[T_JSON_DICT,T_JSON_DICT,None]:
'''
Enables network tracking, network events will now be delivered to the client.
- :param max_total_buffer_size: **(EXPERIMENTAL)** *(Optional)* Buffer size in bytes to use when preserving network payloads (XHRs, etc).
+ :param max_total_buffer_size: **(EXPERIMENTAL)** *(Optional)* Buffer size in bytes to use when preserving network payloads (XHRs, etc). This is the maximum number of bytes that will be collected by this DevTools session.
:param max_resource_buffer_size: **(EXPERIMENTAL)** *(Optional)* Per-resource buffer size in bytes to use when preserving network payloads (XHRs, etc).
:param max_post_data_size: *(Optional)* Longest post body size (in bytes) that would be included in requestWillBeSent notification
+ :param report_direct_socket_traffic: **(EXPERIMENTAL)** *(Optional)* Whether DirectSocket chunk send/receive events should be reported.
+ :param enable_durable_messages: **(EXPERIMENTAL)** *(Optional)* Enable storing response bodies outside of renderer, so that these survive a cross-process navigation. Requires maxTotalBufferSize to be set. Currently defaults to false. This field is being deprecated in favor of the dedicated configureDurableMessages command, due to the possibility of deadlocks when awaiting Network.enable before issuing Runtime.runIfWaitingForDebugger.
'''
params: T_JSON_DICT = dict()
if max_total_buffer_size is not None:
@@ -2715,6 +3539,10 @@ def enable(
params['maxResourceBufferSize'] = max_resource_buffer_size
if max_post_data_size is not None:
params['maxPostDataSize'] = max_post_data_size
+ if report_direct_socket_traffic is not None:
+ params['reportDirectSocketTraffic'] = report_direct_socket_traffic
+ if enable_durable_messages is not None:
+ params['enableDurableMessages'] = enable_durable_messages
cmd_dict: T_JSON_DICT = {
'method': 'Network.enable',
'params': params,
@@ -2722,6 +3550,32 @@ def enable(
json = yield cmd_dict
+def configure_durable_messages(
+ max_total_buffer_size: typing.Optional[int] = None,
+ max_resource_buffer_size: typing.Optional[int] = None
+ ) -> typing.Generator[T_JSON_DICT,T_JSON_DICT,None]:
+ '''
+ Configures storing response bodies outside of renderer, so that these survive
+ a cross-process navigation.
+ If maxTotalBufferSize is not set, durable messages are disabled.
+
+ **EXPERIMENTAL**
+
+ :param max_total_buffer_size: *(Optional)* Buffer size in bytes to use when preserving network payloads (XHRs, etc).
+ :param max_resource_buffer_size: *(Optional)* Per-resource buffer size in bytes to use when preserving network payloads (XHRs, etc).
+ '''
+ params: T_JSON_DICT = dict()
+ if max_total_buffer_size is not None:
+ params['maxTotalBufferSize'] = max_total_buffer_size
+ if max_resource_buffer_size is not None:
+ params['maxResourceBufferSize'] = max_resource_buffer_size
+ cmd_dict: T_JSON_DICT = {
+ 'method': 'Network.configureDurableMessages',
+ 'params': params,
+ }
+ json = yield cmd_dict
+
+
@deprecated(version="1.3")
def get_all_cookies() -> typing.Generator[T_JSON_DICT,T_JSON_DICT,typing.List[Cookie]]:
'''
@@ -2809,12 +3663,15 @@ def get_response_body(
def get_request_post_data(
request_id: RequestId
- ) -> typing.Generator[T_JSON_DICT,T_JSON_DICT,str]:
+ ) -> typing.Generator[T_JSON_DICT,T_JSON_DICT,typing.Tuple[str, bool]]:
'''
Returns post data sent with the request. Returns an error when no data was sent with the request.
:param request_id: Identifier of the network request to get content for.
- :returns: Request body string, omitting files from multipart requests
+ :returns: A tuple with the following items:
+
+ 0. **postData** - Request body string, omitting files from multipart requests
+ 1. **base64Encoded** - True, if content was sent as base64.
'''
params: T_JSON_DICT = dict()
params['requestId'] = request_id.to_json()
@@ -2823,7 +3680,10 @@ def get_request_post_data(
'params': params,
}
json = yield cmd_dict
- return str(json['postData'])
+ return (
+ str(json['postData']),
+ bool(json['base64Encoded'])
+ )
def get_response_body_for_interception(
@@ -2931,17 +3791,22 @@ def search_in_response_body(
def set_blocked_ur_ls(
- urls: typing.List[str]
+ url_patterns: typing.Optional[typing.List[BlockPattern]] = None,
+ urls: typing.Optional[typing.List[str]] = None
) -> typing.Generator[T_JSON_DICT,T_JSON_DICT,None]:
'''
Blocks URLs from loading.
**EXPERIMENTAL**
- :param urls: URL patterns to block. Wildcards ('*') are allowed.
+ :param url_patterns: *(Optional)* Patterns to match in the order in which they are given. These patterns also take precedence over any wildcard patterns defined in ```urls```.
+ :param urls: **(DEPRECATED)** *(Optional)* URL patterns to block. Wildcards ('*') are allowed.
'''
params: T_JSON_DICT = dict()
- params['urls'] = [i for i in urls]
+ if url_patterns is not None:
+ params['urlPatterns'] = [i.to_json() for i in url_patterns]
+ if urls is not None:
+ params['urls'] = [i for i in urls]
cmd_dict: T_JSON_DICT = {
'method': 'Network.setBlockedURLs',
'params': params,
@@ -2994,7 +3859,6 @@ def set_cookie(
same_site: typing.Optional[CookieSameSite] = None,
expires: typing.Optional[TimeSinceEpoch] = None,
priority: typing.Optional[CookiePriority] = None,
- same_party: typing.Optional[bool] = None,
source_scheme: typing.Optional[CookieSourceScheme] = None,
source_port: typing.Optional[int] = None,
partition_key: typing.Optional[CookiePartitionKey] = None
@@ -3012,7 +3876,6 @@ def set_cookie(
:param same_site: *(Optional)* Cookie SameSite type.
:param expires: *(Optional)* Cookie expiration date, session cookie if not set
:param priority: **(EXPERIMENTAL)** *(Optional)* Cookie Priority type.
- :param same_party: **(EXPERIMENTAL)** *(Optional)* True if cookie is SameParty.
:param source_scheme: **(EXPERIMENTAL)** *(Optional)* Cookie source scheme type.
:param source_port: **(EXPERIMENTAL)** *(Optional)* Cookie source port. Valid values are {-1, [1, 65535]}, -1 indicates an unspecified port. An unspecified port value allows protocol clients to emulate legacy cookie scope for the port. This is a temporary ability and it will be removed in the future.
:param partition_key: **(EXPERIMENTAL)** *(Optional)* Cookie partition key. If not set, the cookie will be set as not partitioned.
@@ -3037,8 +3900,6 @@ def set_cookie(
params['expires'] = expires.to_json()
if priority is not None:
params['priority'] = priority.to_json()
- if same_party is not None:
- params['sameParty'] = same_party
if source_scheme is not None:
params['sourceScheme'] = source_scheme.to_json()
if source_port is not None:
@@ -3171,55 +4032,95 @@ def stream_resource_content(
:returns: Data that has been buffered until streaming is enabled. (Encoded as a base64 string when passed over JSON)
'''
params: T_JSON_DICT = dict()
- params['requestId'] = request_id.to_json()
+ params['requestId'] = request_id.to_json()
+ cmd_dict: T_JSON_DICT = {
+ 'method': 'Network.streamResourceContent',
+ 'params': params,
+ }
+ json = yield cmd_dict
+ return str(json['bufferedData'])
+
+
+def get_security_isolation_status(
+ frame_id: typing.Optional[page.FrameId] = None
+ ) -> typing.Generator[T_JSON_DICT,T_JSON_DICT,SecurityIsolationStatus]:
+ '''
+ Returns information about the COEP/COOP isolation status.
+
+ **EXPERIMENTAL**
+
+ :param frame_id: *(Optional)* If no frameId is provided, the status of the target is provided.
+ :returns:
+ '''
+ params: T_JSON_DICT = dict()
+ if frame_id is not None:
+ params['frameId'] = frame_id.to_json()
+ cmd_dict: T_JSON_DICT = {
+ 'method': 'Network.getSecurityIsolationStatus',
+ 'params': params,
+ }
+ json = yield cmd_dict
+ return SecurityIsolationStatus.from_json(json['status'])
+
+
+def enable_reporting_api(
+ enable: bool
+ ) -> typing.Generator[T_JSON_DICT,T_JSON_DICT,None]:
+ '''
+ Enables tracking for the Reporting API, events generated by the Reporting API will now be delivered to the client.
+ Enabling triggers 'reportingApiReportAdded' for all existing reports.
+
+ **EXPERIMENTAL**
+
+ :param enable: Whether to enable or disable events for the Reporting API
+ '''
+ params: T_JSON_DICT = dict()
+ params['enable'] = enable
cmd_dict: T_JSON_DICT = {
- 'method': 'Network.streamResourceContent',
+ 'method': 'Network.enableReportingApi',
'params': params,
}
json = yield cmd_dict
- return str(json['bufferedData'])
-def get_security_isolation_status(
- frame_id: typing.Optional[page.FrameId] = None
- ) -> typing.Generator[T_JSON_DICT,T_JSON_DICT,SecurityIsolationStatus]:
+def enable_device_bound_sessions(
+ enable: bool
+ ) -> typing.Generator[T_JSON_DICT,T_JSON_DICT,None]:
'''
- Returns information about the COEP/COOP isolation status.
+ Sets up tracking device bound sessions and fetching of initial set of sessions.
**EXPERIMENTAL**
- :param frame_id: *(Optional)* If no frameId is provided, the status of the target is provided.
- :returns:
+ :param enable: Whether to enable or disable events.
'''
params: T_JSON_DICT = dict()
- if frame_id is not None:
- params['frameId'] = frame_id.to_json()
+ params['enable'] = enable
cmd_dict: T_JSON_DICT = {
- 'method': 'Network.getSecurityIsolationStatus',
+ 'method': 'Network.enableDeviceBoundSessions',
'params': params,
}
json = yield cmd_dict
- return SecurityIsolationStatus.from_json(json['status'])
-def enable_reporting_api(
- enable: bool
- ) -> typing.Generator[T_JSON_DICT,T_JSON_DICT,None]:
+def fetch_schemeful_site(
+ origin: str
+ ) -> typing.Generator[T_JSON_DICT,T_JSON_DICT,str]:
'''
- Enables tracking for the Reporting API, events generated by the Reporting API will now be delivered to the client.
- Enabling triggers 'reportingApiReportAdded' for all existing reports.
+ Fetches the schemeful site for a specific origin.
**EXPERIMENTAL**
- :param enable: Whether to enable or disable events for the Reporting API
+ :param origin: The URL origin.
+ :returns: The corresponding schemeful site.
'''
params: T_JSON_DICT = dict()
- params['enable'] = enable
+ params['origin'] = origin
cmd_dict: T_JSON_DICT = {
- 'method': 'Network.enableReportingApi',
+ 'method': 'Network.fetchSchemefulSite',
'params': params,
}
json = yield cmd_dict
+ return str(json['schemefulSite'])
def load_network_resource(
@@ -3257,7 +4158,7 @@ def set_cookie_controls(
) -> typing.Generator[T_JSON_DICT,T_JSON_DICT,None]:
'''
Sets Controls for third-party cookie access
- Page reload is required before the new cookie bahavior will be observed
+ Page reload is required before the new cookie behavior will be observed
**EXPERIMENTAL**
@@ -3497,6 +4398,8 @@ class RequestWillBeSent:
frame_id: typing.Optional[page.FrameId]
#: Whether the request is initiated by a user gesture. Defaults to false.
has_user_gesture: typing.Optional[bool]
+ #: The render-blocking behavior of the request.
+ render_blocking_behavior: typing.Optional[RenderBlockingBehavior]
@classmethod
def from_json(cls, json: T_JSON_DICT) -> RequestWillBeSent:
@@ -3512,7 +4415,8 @@ def from_json(cls, json: T_JSON_DICT) -> RequestWillBeSent:
redirect_response=Response.from_json(json['redirectResponse']) if json.get('redirectResponse', None) is not None else None,
type_=ResourceType.from_json(json['type']) if json.get('type', None) is not None else None,
frame_id=page.FrameId.from_json(json['frameId']) if json.get('frameId', None) is not None else None,
- has_user_gesture=bool(json['hasUserGesture']) if json.get('hasUserGesture', None) is not None else None
+ has_user_gesture=bool(json['hasUserGesture']) if json.get('hasUserGesture', None) is not None else None,
+ render_blocking_behavior=RenderBlockingBehavior.from_json(json['renderBlockingBehavior']) if json.get('renderBlockingBehavior', None) is not None else None
)
@@ -3910,6 +4814,220 @@ def from_json(cls, json: T_JSON_DICT) -> DirectTCPSocketClosed:
)
+@event_class('Network.directTCPSocketChunkSent')
+@dataclass
+class DirectTCPSocketChunkSent:
+ '''
+ **EXPERIMENTAL**
+
+ Fired when data is sent to tcp direct socket stream.
+ '''
+ identifier: RequestId
+ data: str
+ timestamp: MonotonicTime
+
+ @classmethod
+ def from_json(cls, json: T_JSON_DICT) -> DirectTCPSocketChunkSent:
+ return cls(
+ identifier=RequestId.from_json(json['identifier']),
+ data=str(json['data']),
+ timestamp=MonotonicTime.from_json(json['timestamp'])
+ )
+
+
+@event_class('Network.directTCPSocketChunkReceived')
+@dataclass
+class DirectTCPSocketChunkReceived:
+ '''
+ **EXPERIMENTAL**
+
+ Fired when data is received from tcp direct socket stream.
+ '''
+ identifier: RequestId
+ data: str
+ timestamp: MonotonicTime
+
+ @classmethod
+ def from_json(cls, json: T_JSON_DICT) -> DirectTCPSocketChunkReceived:
+ return cls(
+ identifier=RequestId.from_json(json['identifier']),
+ data=str(json['data']),
+ timestamp=MonotonicTime.from_json(json['timestamp'])
+ )
+
+
+@event_class('Network.directUDPSocketJoinedMulticastGroup')
+@dataclass
+class DirectUDPSocketJoinedMulticastGroup:
+ '''
+ **EXPERIMENTAL**
+
+
+ '''
+ identifier: RequestId
+ ip_address: str
+
+ @classmethod
+ def from_json(cls, json: T_JSON_DICT) -> DirectUDPSocketJoinedMulticastGroup:
+ return cls(
+ identifier=RequestId.from_json(json['identifier']),
+ ip_address=str(json['IPAddress'])
+ )
+
+
+@event_class('Network.directUDPSocketLeftMulticastGroup')
+@dataclass
+class DirectUDPSocketLeftMulticastGroup:
+ '''
+ **EXPERIMENTAL**
+
+
+ '''
+ identifier: RequestId
+ ip_address: str
+
+ @classmethod
+ def from_json(cls, json: T_JSON_DICT) -> DirectUDPSocketLeftMulticastGroup:
+ return cls(
+ identifier=RequestId.from_json(json['identifier']),
+ ip_address=str(json['IPAddress'])
+ )
+
+
+@event_class('Network.directUDPSocketCreated')
+@dataclass
+class DirectUDPSocketCreated:
+ '''
+ **EXPERIMENTAL**
+
+ Fired upon direct_socket.UDPSocket creation.
+ '''
+ identifier: RequestId
+ options: DirectUDPSocketOptions
+ timestamp: MonotonicTime
+ initiator: typing.Optional[Initiator]
+
+ @classmethod
+ def from_json(cls, json: T_JSON_DICT) -> DirectUDPSocketCreated:
+ return cls(
+ identifier=RequestId.from_json(json['identifier']),
+ options=DirectUDPSocketOptions.from_json(json['options']),
+ timestamp=MonotonicTime.from_json(json['timestamp']),
+ initiator=Initiator.from_json(json['initiator']) if json.get('initiator', None) is not None else None
+ )
+
+
+@event_class('Network.directUDPSocketOpened')
+@dataclass
+class DirectUDPSocketOpened:
+ '''
+ **EXPERIMENTAL**
+
+ Fired when direct_socket.UDPSocket connection is opened.
+ '''
+ identifier: RequestId
+ local_addr: str
+ #: Expected to be unsigned integer.
+ local_port: int
+ timestamp: MonotonicTime
+ remote_addr: typing.Optional[str]
+ #: Expected to be unsigned integer.
+ remote_port: typing.Optional[int]
+
+ @classmethod
+ def from_json(cls, json: T_JSON_DICT) -> DirectUDPSocketOpened:
+ return cls(
+ identifier=RequestId.from_json(json['identifier']),
+ local_addr=str(json['localAddr']),
+ local_port=int(json['localPort']),
+ timestamp=MonotonicTime.from_json(json['timestamp']),
+ remote_addr=str(json['remoteAddr']) if json.get('remoteAddr', None) is not None else None,
+ remote_port=int(json['remotePort']) if json.get('remotePort', None) is not None else None
+ )
+
+
+@event_class('Network.directUDPSocketAborted')
+@dataclass
+class DirectUDPSocketAborted:
+ '''
+ **EXPERIMENTAL**
+
+ Fired when direct_socket.UDPSocket is aborted.
+ '''
+ identifier: RequestId
+ error_message: str
+ timestamp: MonotonicTime
+
+ @classmethod
+ def from_json(cls, json: T_JSON_DICT) -> DirectUDPSocketAborted:
+ return cls(
+ identifier=RequestId.from_json(json['identifier']),
+ error_message=str(json['errorMessage']),
+ timestamp=MonotonicTime.from_json(json['timestamp'])
+ )
+
+
+@event_class('Network.directUDPSocketClosed')
+@dataclass
+class DirectUDPSocketClosed:
+ '''
+ **EXPERIMENTAL**
+
+ Fired when direct_socket.UDPSocket is closed.
+ '''
+ identifier: RequestId
+ timestamp: MonotonicTime
+
+ @classmethod
+ def from_json(cls, json: T_JSON_DICT) -> DirectUDPSocketClosed:
+ return cls(
+ identifier=RequestId.from_json(json['identifier']),
+ timestamp=MonotonicTime.from_json(json['timestamp'])
+ )
+
+
+@event_class('Network.directUDPSocketChunkSent')
+@dataclass
+class DirectUDPSocketChunkSent:
+ '''
+ **EXPERIMENTAL**
+
+ Fired when message is sent to udp direct socket stream.
+ '''
+ identifier: RequestId
+ message: DirectUDPMessage
+ timestamp: MonotonicTime
+
+ @classmethod
+ def from_json(cls, json: T_JSON_DICT) -> DirectUDPSocketChunkSent:
+ return cls(
+ identifier=RequestId.from_json(json['identifier']),
+ message=DirectUDPMessage.from_json(json['message']),
+ timestamp=MonotonicTime.from_json(json['timestamp'])
+ )
+
+
+@event_class('Network.directUDPSocketChunkReceived')
+@dataclass
+class DirectUDPSocketChunkReceived:
+ '''
+ **EXPERIMENTAL**
+
+ Fired when message is received from udp direct socket stream.
+ '''
+ identifier: RequestId
+ message: DirectUDPMessage
+ timestamp: MonotonicTime
+
+ @classmethod
+ def from_json(cls, json: T_JSON_DICT) -> DirectUDPSocketChunkReceived:
+ return cls(
+ identifier=RequestId.from_json(json['identifier']),
+ message=DirectUDPMessage.from_json(json['message']),
+ timestamp=MonotonicTime.from_json(json['timestamp'])
+ )
+
+
@event_class('Network.requestWillBeSentExtraInfo')
@dataclass
class RequestWillBeSentExtraInfo:
@@ -3930,10 +5048,15 @@ class RequestWillBeSentExtraInfo:
headers: Headers
#: Connection timing information for the request.
connect_timing: ConnectTiming
+ #: How the request site's device bound sessions were used during this request.
+ device_bound_session_usages: typing.Optional[typing.List[DeviceBoundSessionWithUsage]]
#: The client security state set for the request.
client_security_state: typing.Optional[ClientSecurityState]
#: Whether the site has partitioned cookies stored in a partition different than the current one.
site_has_cookie_in_other_partition: typing.Optional[bool]
+ #: The network conditions id if this request was affected by network conditions configured via
+ #: emulateNetworkConditionsByRule.
+ applied_network_conditions_id: typing.Optional[str]
@classmethod
def from_json(cls, json: T_JSON_DICT) -> RequestWillBeSentExtraInfo:
@@ -3942,8 +5065,10 @@ def from_json(cls, json: T_JSON_DICT) -> RequestWillBeSentExtraInfo:
associated_cookies=[AssociatedCookie.from_json(i) for i in json['associatedCookies']],
headers=Headers.from_json(json['headers']),
connect_timing=ConnectTiming.from_json(json['connectTiming']),
+ device_bound_session_usages=[DeviceBoundSessionWithUsage.from_json(i) for i in json['deviceBoundSessionUsages']] if json.get('deviceBoundSessionUsages', None) is not None else None,
client_security_state=ClientSecurityState.from_json(json['clientSecurityState']) if json.get('clientSecurityState', None) is not None else None,
- site_has_cookie_in_other_partition=bool(json['siteHasCookieInOtherPartition']) if json.get('siteHasCookieInOtherPartition', None) is not None else None
+ site_has_cookie_in_other_partition=bool(json['siteHasCookieInOtherPartition']) if json.get('siteHasCookieInOtherPartition', None) is not None else None,
+ applied_network_conditions_id=str(json['appliedNetworkConditionsId']) if json.get('appliedNetworkConditionsId', None) is not None else None
)
@@ -4082,155 +5207,111 @@ def from_json(cls, json: T_JSON_DICT) -> PolicyUpdated:
)
-@event_class('Network.subresourceWebBundleMetadataReceived')
+@event_class('Network.reportingApiReportAdded')
@dataclass
-class SubresourceWebBundleMetadataReceived:
+class ReportingApiReportAdded:
'''
**EXPERIMENTAL**
- Fired once when parsing the .wbn file has succeeded.
- The event contains the information about the web bundle contents.
+ Is sent whenever a new report is added.
+ And after 'enableReportingApi' for all existing reports.
'''
- #: Request identifier. Used to match this information to another event.
- request_id: RequestId
- #: A list of URLs of resources in the subresource Web Bundle.
- urls: typing.List[str]
+ report: ReportingApiReport
@classmethod
- def from_json(cls, json: T_JSON_DICT) -> SubresourceWebBundleMetadataReceived:
+ def from_json(cls, json: T_JSON_DICT) -> ReportingApiReportAdded:
return cls(
- request_id=RequestId.from_json(json['requestId']),
- urls=[str(i) for i in json['urls']]
+ report=ReportingApiReport.from_json(json['report'])
)
-@event_class('Network.subresourceWebBundleMetadataError')
+@event_class('Network.reportingApiReportUpdated')
@dataclass
-class SubresourceWebBundleMetadataError:
+class ReportingApiReportUpdated:
'''
**EXPERIMENTAL**
- Fired once when parsing the .wbn file has failed.
- '''
- #: Request identifier. Used to match this information to another event.
- request_id: RequestId
- #: Error message
- error_message: str
-
- @classmethod
- def from_json(cls, json: T_JSON_DICT) -> SubresourceWebBundleMetadataError:
- return cls(
- request_id=RequestId.from_json(json['requestId']),
- error_message=str(json['errorMessage'])
- )
-
-
-@event_class('Network.subresourceWebBundleInnerResponseParsed')
-@dataclass
-class SubresourceWebBundleInnerResponseParsed:
- '''
- **EXPERIMENTAL**
- Fired when handling requests for resources within a .wbn file.
- Note: this will only be fired for resources that are requested by the webpage.
'''
- #: Request identifier of the subresource request
- inner_request_id: RequestId
- #: URL of the subresource resource.
- inner_request_url: str
- #: Bundle request identifier. Used to match this information to another event.
- #: This made be absent in case when the instrumentation was enabled only
- #: after webbundle was parsed.
- bundle_request_id: typing.Optional[RequestId]
+ report: ReportingApiReport
@classmethod
- def from_json(cls, json: T_JSON_DICT) -> SubresourceWebBundleInnerResponseParsed:
+ def from_json(cls, json: T_JSON_DICT) -> ReportingApiReportUpdated:
return cls(
- inner_request_id=RequestId.from_json(json['innerRequestId']),
- inner_request_url=str(json['innerRequestURL']),
- bundle_request_id=RequestId.from_json(json['bundleRequestId']) if json.get('bundleRequestId', None) is not None else None
+ report=ReportingApiReport.from_json(json['report'])
)
-@event_class('Network.subresourceWebBundleInnerResponseError')
+@event_class('Network.reportingApiEndpointsChangedForOrigin')
@dataclass
-class SubresourceWebBundleInnerResponseError:
+class ReportingApiEndpointsChangedForOrigin:
'''
**EXPERIMENTAL**
- Fired when request for resources within a .wbn file failed.
- '''
- #: Request identifier of the subresource request
- inner_request_id: RequestId
- #: URL of the subresource resource.
- inner_request_url: str
- #: Error message
- error_message: str
- #: Bundle request identifier. Used to match this information to another event.
- #: This made be absent in case when the instrumentation was enabled only
- #: after webbundle was parsed.
- bundle_request_id: typing.Optional[RequestId]
-
- @classmethod
- def from_json(cls, json: T_JSON_DICT) -> SubresourceWebBundleInnerResponseError:
- return cls(
- inner_request_id=RequestId.from_json(json['innerRequestId']),
- inner_request_url=str(json['innerRequestURL']),
- error_message=str(json['errorMessage']),
- bundle_request_id=RequestId.from_json(json['bundleRequestId']) if json.get('bundleRequestId', None) is not None else None
- )
-
-
-@event_class('Network.reportingApiReportAdded')
-@dataclass
-class ReportingApiReportAdded:
- '''
- **EXPERIMENTAL**
- Is sent whenever a new report is added.
- And after 'enableReportingApi' for all existing reports.
'''
- report: ReportingApiReport
+ #: Origin of the document(s) which configured the endpoints.
+ origin: str
+ endpoints: typing.List[ReportingApiEndpoint]
@classmethod
- def from_json(cls, json: T_JSON_DICT) -> ReportingApiReportAdded:
+ def from_json(cls, json: T_JSON_DICT) -> ReportingApiEndpointsChangedForOrigin:
return cls(
- report=ReportingApiReport.from_json(json['report'])
+ origin=str(json['origin']),
+ endpoints=[ReportingApiEndpoint.from_json(i) for i in json['endpoints']]
)
-@event_class('Network.reportingApiReportUpdated')
+@event_class('Network.deviceBoundSessionsAdded')
@dataclass
-class ReportingApiReportUpdated:
+class DeviceBoundSessionsAdded:
'''
**EXPERIMENTAL**
-
+ Triggered when the initial set of device bound sessions is added.
'''
- report: ReportingApiReport
+ #: The device bound sessions.
+ sessions: typing.List[DeviceBoundSession]
@classmethod
- def from_json(cls, json: T_JSON_DICT) -> ReportingApiReportUpdated:
+ def from_json(cls, json: T_JSON_DICT) -> DeviceBoundSessionsAdded:
return cls(
- report=ReportingApiReport.from_json(json['report'])
+ sessions=[DeviceBoundSession.from_json(i) for i in json['sessions']]
)
-@event_class('Network.reportingApiEndpointsChangedForOrigin')
+@event_class('Network.deviceBoundSessionEventOccurred')
@dataclass
-class ReportingApiEndpointsChangedForOrigin:
+class DeviceBoundSessionEventOccurred:
'''
**EXPERIMENTAL**
-
- '''
- #: Origin of the document(s) which configured the endpoints.
- origin: str
- endpoints: typing.List[ReportingApiEndpoint]
+ Triggered when a device bound session event occurs.
+ '''
+ #: A unique identifier for this session event.
+ event_id: DeviceBoundSessionEventId
+ #: The site this session event is associated with.
+ site: str
+ #: Whether this event was considered successful.
+ succeeded: bool
+ #: The session ID this event is associated with. May not be populated for
+ #: failed events.
+ session_id: typing.Optional[str]
+ #: The below are the different session event type details. Exactly one is populated.
+ creation_event_details: typing.Optional[CreationEventDetails]
+ refresh_event_details: typing.Optional[RefreshEventDetails]
+ termination_event_details: typing.Optional[TerminationEventDetails]
+ challenge_event_details: typing.Optional[ChallengeEventDetails]
@classmethod
- def from_json(cls, json: T_JSON_DICT) -> ReportingApiEndpointsChangedForOrigin:
+ def from_json(cls, json: T_JSON_DICT) -> DeviceBoundSessionEventOccurred:
return cls(
- origin=str(json['origin']),
- endpoints=[ReportingApiEndpoint.from_json(i) for i in json['endpoints']]
+ event_id=DeviceBoundSessionEventId.from_json(json['eventId']),
+ site=str(json['site']),
+ succeeded=bool(json['succeeded']),
+ session_id=str(json['sessionId']) if json.get('sessionId', None) is not None else None,
+ creation_event_details=CreationEventDetails.from_json(json['creationEventDetails']) if json.get('creationEventDetails', None) is not None else None,
+ refresh_event_details=RefreshEventDetails.from_json(json['refreshEventDetails']) if json.get('refreshEventDetails', None) is not None else None,
+ termination_event_details=TerminationEventDetails.from_json(json['terminationEventDetails']) if json.get('terminationEventDetails', None) is not None else None,
+ challenge_event_details=ChallengeEventDetails.from_json(json['challengeEventDetails']) if json.get('challengeEventDetails', None) is not None else None
)
diff --git a/pycdp/cdp/overlay.py b/pycdp/cdp/overlay.py
index 11cf041..c259832 100644
--- a/pycdp/cdp/overlay.py
+++ b/pycdp/cdp/overlay.py
@@ -752,7 +752,6 @@ class InspectMode(enum.Enum):
SEARCH_FOR_NODE = "searchForNode"
SEARCH_FOR_UA_SHADOW_DOM = "searchForUAShadowDOM"
CAPTURE_AREA_SCREENSHOT = "captureAreaScreenshot"
- SHOW_DISTANCES = "showDistances"
NONE = "none"
def to_json(self) -> str:
@@ -763,6 +762,30 @@ def from_json(cls, json: str) -> InspectMode:
return cls(json)
+@dataclass
+class InspectedElementAnchorConfig:
+ #: Identifier of the node to highlight.
+ node_id: typing.Optional[dom.NodeId] = None
+
+ #: Identifier of the backend node to highlight.
+ backend_node_id: typing.Optional[dom.BackendNodeId] = None
+
+ def to_json(self) -> T_JSON_DICT:
+ json: T_JSON_DICT = dict()
+ if self.node_id is not None:
+ json['nodeId'] = self.node_id.to_json()
+ if self.backend_node_id is not None:
+ json['backendNodeId'] = self.backend_node_id.to_json()
+ return json
+
+ @classmethod
+ def from_json(cls, json: T_JSON_DICT) -> InspectedElementAnchorConfig:
+ return cls(
+ node_id=dom.NodeId.from_json(json['nodeId']) if json.get('nodeId', None) is not None else None,
+ backend_node_id=dom.BackendNodeId.from_json(json['backendNodeId']) if json.get('backendNodeId', None) is not None else None,
+ )
+
+
def disable() -> typing.Generator[T_JSON_DICT,T_JSON_DICT,None]:
'''
Disables domain notifications.
@@ -966,6 +989,9 @@ def highlight_rect(
) -> typing.Generator[T_JSON_DICT,T_JSON_DICT,None]:
'''
Highlights given rectangle. Coordinates are absolute with respect to the main frame viewport.
+ Issue: the method does not handle device pixel ratio (DPR) correctly.
+ The coordinates currently have to be adjusted by the client
+ if DPR is not 1 (see crbug.com/437807128).
:param x: X coordinate
:param y: Y coordinate
@@ -1171,6 +1197,21 @@ def set_show_container_query_overlays(
json = yield cmd_dict
+def set_show_inspected_element_anchor(
+ inspected_element_anchor_config: InspectedElementAnchorConfig
+ ) -> typing.Generator[T_JSON_DICT,T_JSON_DICT,None]:
+ '''
+ :param inspected_element_anchor_config: Node identifier for which to show an anchor for.
+ '''
+ params: T_JSON_DICT = dict()
+ params['inspectedElementAnchorConfig'] = inspected_element_anchor_config.to_json()
+ cmd_dict: T_JSON_DICT = {
+ 'method': 'Overlay.setShowInspectedElementAnchor',
+ 'params': params,
+ }
+ json = yield cmd_dict
+
+
def set_show_paint_rects(
result: bool
) -> typing.Generator[T_JSON_DICT,T_JSON_DICT,None]:
@@ -1380,6 +1421,38 @@ def from_json(cls, json: T_JSON_DICT) -> ScreenshotRequested:
)
+@event_class('Overlay.inspectPanelShowRequested')
+@dataclass
+class InspectPanelShowRequested:
+ '''
+ Fired when user asks to show the Inspect panel.
+ '''
+ #: Id of the node to show in the panel.
+ backend_node_id: dom.BackendNodeId
+
+ @classmethod
+ def from_json(cls, json: T_JSON_DICT) -> InspectPanelShowRequested:
+ return cls(
+ backend_node_id=dom.BackendNodeId.from_json(json['backendNodeId'])
+ )
+
+
+@event_class('Overlay.inspectedElementWindowRestored')
+@dataclass
+class InspectedElementWindowRestored:
+ '''
+ Fired when user asks to restore the Inspected Element floating window.
+ '''
+ #: Id of the node to restore the floating window for.
+ backend_node_id: dom.BackendNodeId
+
+ @classmethod
+ def from_json(cls, json: T_JSON_DICT) -> InspectedElementWindowRestored:
+ return cls(
+ backend_node_id=dom.BackendNodeId.from_json(json['backendNodeId'])
+ )
+
+
@event_class('Overlay.inspectModeCanceled')
@dataclass
class InspectModeCanceled:
diff --git a/pycdp/cdp/page.py b/pycdp/cdp/page.py
index c7375e3..54d4c66 100644
--- a/pycdp/cdp/page.py
+++ b/pycdp/cdp/page.py
@@ -88,33 +88,6 @@ def from_json(cls, json: T_JSON_DICT) -> AdFrameStatus:
)
-@dataclass
-class AdScriptId:
- '''
- Identifies the bottom-most script which caused the frame to be labelled
- as an ad.
- '''
- #: Script Id of the bottom-most script which caused the frame to be labelled
- #: as an ad.
- script_id: runtime.ScriptId
-
- #: Id of adScriptId's debugger.
- debugger_id: runtime.UniqueDebuggerId
-
- def to_json(self) -> T_JSON_DICT:
- json: T_JSON_DICT = dict()
- json['scriptId'] = self.script_id.to_json()
- json['debuggerId'] = self.debugger_id.to_json()
- return json
-
- @classmethod
- def from_json(cls, json: T_JSON_DICT) -> AdScriptId:
- return cls(
- script_id=runtime.ScriptId.from_json(json['scriptId']),
- debugger_id=runtime.UniqueDebuggerId.from_json(json['debuggerId']),
- )
-
-
class SecureContextType(enum.Enum):
'''
Indicates whether the frame is a secure context and why it is the case.
@@ -166,11 +139,14 @@ class PermissionsPolicyFeature(enum.Enum):
'''
All Permissions Policy features. This enum should match the one defined
in services/network/public/cpp/permissions_policy/permissions_policy_features.json5.
+ LINT.IfChange(PermissionsPolicyFeature)
'''
ACCELEROMETER = "accelerometer"
ALL_SCREENS_CAPTURE = "all-screens-capture"
AMBIENT_LIGHT_SENSOR = "ambient-light-sensor"
+ ARIA_NOTIFY = "aria-notify"
ATTRIBUTION_REPORTING = "attribution-reporting"
+ AUTOFILL = "autofill"
AUTOPLAY = "autoplay"
BLUETOOTH = "bluetooth"
BROWSING_TOPICS = "browsing-topics"
@@ -207,8 +183,11 @@ class PermissionsPolicyFeature(enum.Enum):
CROSS_ORIGIN_ISOLATED = "cross-origin-isolated"
DEFERRED_FETCH = "deferred-fetch"
DEFERRED_FETCH_MINIMAL = "deferred-fetch-minimal"
+ DEVICE_ATTRIBUTES = "device-attributes"
+ DIGITAL_CREDENTIALS_CREATE = "digital-credentials-create"
DIGITAL_CREDENTIALS_GET = "digital-credentials-get"
DIRECT_SOCKETS = "direct-sockets"
+ DIRECT_SOCKETS_MULTICAST = "direct-sockets-multicast"
DIRECT_SOCKETS_PRIVATE = "direct-sockets-private"
DISPLAY_CAPTURE = "display-capture"
DOCUMENT_DOMAIN = "document-domain"
@@ -228,31 +207,40 @@ class PermissionsPolicyFeature(enum.Enum):
INTEREST_COHORT = "interest-cohort"
JOIN_AD_INTEREST_GROUP = "join-ad-interest-group"
KEYBOARD_MAP = "keyboard-map"
+ LANGUAGE_DETECTOR = "language-detector"
+ LANGUAGE_MODEL = "language-model"
LOCAL_FONTS = "local-fonts"
+ LOCAL_NETWORK = "local-network"
+ LOCAL_NETWORK_ACCESS = "local-network-access"
+ LOOPBACK_NETWORK = "loopback-network"
MAGNETOMETER = "magnetometer"
+ MANUAL_TEXT = "manual-text"
MEDIA_PLAYBACK_WHILE_NOT_VISIBLE = "media-playback-while-not-visible"
MICROPHONE = "microphone"
MIDI = "midi"
+ ON_DEVICE_SPEECH_RECOGNITION = "on-device-speech-recognition"
OTP_CREDENTIALS = "otp-credentials"
PAYMENT = "payment"
PICTURE_IN_PICTURE = "picture-in-picture"
- POPINS = "popins"
PRIVATE_AGGREGATION = "private-aggregation"
PRIVATE_STATE_TOKEN_ISSUANCE = "private-state-token-issuance"
PRIVATE_STATE_TOKEN_REDEMPTION = "private-state-token-redemption"
PUBLICKEY_CREDENTIALS_CREATE = "publickey-credentials-create"
PUBLICKEY_CREDENTIALS_GET = "publickey-credentials-get"
+ RECORD_AD_AUCTION_EVENTS = "record-ad-auction-events"
+ REWRITER = "rewriter"
RUN_AD_AUCTION = "run-ad-auction"
SCREEN_WAKE_LOCK = "screen-wake-lock"
SERIAL = "serial"
- SHARED_AUTOFILL = "shared-autofill"
SHARED_STORAGE = "shared-storage"
SHARED_STORAGE_SELECT_URL = "shared-storage-select-url"
SMART_CARD = "smart-card"
SPEAKER_SELECTION = "speaker-selection"
STORAGE_ACCESS = "storage-access"
SUB_APPS = "sub-apps"
+ SUMMARIZER = "summarizer"
SYNC_XHR = "sync-xhr"
+ TRANSLATOR = "translator"
UNLOAD = "unload"
USB = "usb"
USB_UNRESTRICTED = "usb-unrestricted"
@@ -261,6 +249,7 @@ class PermissionsPolicyFeature(enum.Enum):
WEB_PRINTING = "web-printing"
WEB_SHARE = "web-share"
WINDOW_MANAGEMENT = "window-management"
+ WRITER = "writer"
XR_SPATIAL_TRACKING = "xr-spatial-tracking"
def to_json(self) -> str:
@@ -1676,23 +1665,6 @@ def from_json(cls, json: T_JSON_DICT) -> WebAppManifest:
)
-class AutoResponseMode(enum.Enum):
- '''
- Enum of possible auto-response for permission / prompt dialogs.
- '''
- NONE = "none"
- AUTO_ACCEPT = "autoAccept"
- AUTO_REJECT = "autoReject"
- AUTO_OPT_OUT = "autoOptOut"
-
- def to_json(self) -> str:
- return self.value
-
- @classmethod
- def from_json(cls, json: str) -> AutoResponseMode:
- return cls(json)
-
-
class NavigationType(enum.Enum):
'''
The type of a frameNavigated event.
@@ -1752,6 +1724,7 @@ class BackForwardCacheNotRestoredReason(enum.Enum):
BACK_FORWARD_CACHE_DISABLED_FOR_PRERENDER = "BackForwardCacheDisabledForPrerender"
USER_AGENT_OVERRIDE_DIFFERS = "UserAgentOverrideDiffers"
FOREGROUND_CACHE_LIMIT = "ForegroundCacheLimit"
+ FORWARD_CACHE_DISABLED = "ForwardCacheDisabled"
BROWSING_INSTANCE_NOT_SWAPPED = "BrowsingInstanceNotSwapped"
BACK_FORWARD_CACHE_DISABLED_FOR_DELEGATE = "BackForwardCacheDisabledForDelegate"
UNLOAD_HANDLER_EXISTS_IN_MAIN_FRAME = "UnloadHandlerExistsInMainFrame"
@@ -1792,8 +1765,12 @@ class BackForwardCacheNotRestoredReason(enum.Enum):
BROADCAST_CHANNEL = "BroadcastChannel"
WEB_XR = "WebXR"
SHARED_WORKER = "SharedWorker"
+ SHARED_WORKER_MESSAGE = "SharedWorkerMessage"
+ SHARED_WORKER_WITH_NO_ACTIVE_CLIENT = "SharedWorkerWithNoActiveClient"
WEB_LOCKS = "WebLocks"
+ WEB_LOCKS_CONTENTION = "WebLocksContention"
WEB_HID = "WebHID"
+ WEB_BLUETOOTH = "WebBluetooth"
WEB_SHARE = "WebShare"
REQUESTED_STORAGE_ACCESS_GRANT = "RequestedStorageAccessGrant"
WEB_NFC = "WebNfc"
@@ -1816,9 +1793,9 @@ class BackForwardCacheNotRestoredReason(enum.Enum):
INDEXED_DB_EVENT = "IndexedDBEvent"
DUMMY = "Dummy"
JS_NETWORK_REQUEST_RECEIVED_CACHE_CONTROL_NO_STORE_RESOURCE = "JsNetworkRequestReceivedCacheControlNoStoreResource"
- WEB_RTC_STICKY = "WebRTCSticky"
- WEB_TRANSPORT_STICKY = "WebTransportSticky"
- WEB_SOCKET_STICKY = "WebSocketSticky"
+ WEB_RTC_USED_WITH_CCNS = "WebRTCUsedWithCCNS"
+ WEB_TRANSPORT_USED_WITH_CCNS = "WebTransportUsedWithCCNS"
+ WEB_SOCKET_USED_WITH_CCNS = "WebSocketUsedWithCCNS"
SMART_CARD = "SmartCard"
LIVE_MEDIA_STREAM_TRACK = "LiveMediaStreamTrack"
UNLOAD_HANDLER = "UnloadHandler"
@@ -1852,6 +1829,8 @@ class BackForwardCacheNotRestoredReason(enum.Enum):
REQUESTED_BY_WEB_VIEW_CLIENT = "RequestedByWebViewClient"
POST_MESSAGE_BY_WEB_VIEW_CLIENT = "PostMessageByWebViewClient"
CACHE_CONTROL_NO_STORE_DEVICE_BOUND_SESSION_TERMINATED = "CacheControlNoStoreDeviceBoundSessionTerminated"
+ CACHE_LIMIT_PRUNED_ON_MODERATE_MEMORY_PRESSURE = "CacheLimitPrunedOnModerateMemoryPressure"
+ CACHE_LIMIT_PRUNED_ON_CRITICAL_MEMORY_PRESSURE = "CacheLimitPrunedOnCriticalMemoryPressure"
def to_json(self) -> str:
return self.value
@@ -2315,25 +2294,25 @@ def get_app_id() -> typing.Generator[T_JSON_DICT,T_JSON_DICT,typing.Tuple[typing
)
-def get_ad_script_id(
+def get_ad_script_ancestry(
frame_id: FrameId
- ) -> typing.Generator[T_JSON_DICT,T_JSON_DICT,typing.Optional[AdScriptId]]:
+ ) -> typing.Generator[T_JSON_DICT,T_JSON_DICT,typing.Optional[network.AdAncestry]]:
'''
**EXPERIMENTAL**
:param frame_id:
- :returns: *(Optional)* Identifies the bottom-most script which caused the frame to be labelled as an ad. Only sent if frame is labelled as an ad and id is available.
+ :returns: *(Optional)* The ancestry chain of ad script identifiers leading to this frame's creation, along with the root script's filterlist rule. The ancestry chain is ordered from the most immediate script (in the frame creation stack) to more distant ancestors (that created the immediately preceding script). Only sent if frame is labelled as an ad and ids are available.
'''
params: T_JSON_DICT = dict()
params['frameId'] = frame_id.to_json()
cmd_dict: T_JSON_DICT = {
- 'method': 'Page.getAdScriptId',
+ 'method': 'Page.getAdScriptAncestry',
'params': params,
}
json = yield cmd_dict
- return AdScriptId.from_json(json['adScriptId']) if json.get('adScriptId', None) is not None else None
+ return network.AdAncestry.from_json(json['adScriptAncestry']) if json.get('adScriptAncestry', None) is not None else None
def get_frame_tree() -> typing.Generator[T_JSON_DICT,T_JSON_DICT,FrameTree]:
@@ -2477,7 +2456,7 @@ def navigate(
transition_type: typing.Optional[TransitionType] = None,
frame_id: typing.Optional[FrameId] = None,
referrer_policy: typing.Optional[ReferrerPolicy] = None
- ) -> typing.Generator[T_JSON_DICT,T_JSON_DICT,typing.Tuple[FrameId, typing.Optional[network.LoaderId], typing.Optional[str]]]:
+ ) -> typing.Generator[T_JSON_DICT,T_JSON_DICT,typing.Tuple[FrameId, typing.Optional[network.LoaderId], typing.Optional[str], typing.Optional[bool]]]:
'''
Navigates current page to the given URL.
@@ -2491,6 +2470,7 @@ def navigate(
0. **frameId** - Frame id that has navigated (or failed to navigate)
1. **loaderId** - *(Optional)* Loader identifier. This is omitted in case of same-document navigation, as the previously committed loaderId would not change.
2. **errorText** - *(Optional)* User friendly error message, present if and only if navigation has failed.
+ 3. **isDownload** - *(Optional)* Whether the navigation resulted in a download.
'''
params: T_JSON_DICT = dict()
params['url'] = url
@@ -2510,7 +2490,8 @@ def navigate(
return (
FrameId.from_json(json['frameId']),
network.LoaderId.from_json(json['loaderId']) if json.get('loaderId', None) is not None else None,
- str(json['errorText']) if json.get('errorText', None) is not None else None
+ str(json['errorText']) if json.get('errorText', None) is not None else None,
+ bool(json['isDownload']) if json.get('isDownload', None) is not None else None
)
@@ -3233,7 +3214,7 @@ def clear_compilation_cache() -> typing.Generator[T_JSON_DICT,T_JSON_DICT,None]:
def set_spc_transaction_mode(
- mode: AutoResponseMode
+ mode: str
) -> typing.Generator[T_JSON_DICT,T_JSON_DICT,None]:
'''
Sets the Secure Payment Confirmation transaction mode.
@@ -3244,7 +3225,7 @@ def set_spc_transaction_mode(
:param mode:
'''
params: T_JSON_DICT = dict()
- params['mode'] = mode.to_json()
+ params['mode'] = mode
cmd_dict: T_JSON_DICT = {
'method': 'Page.setSPCTransactionMode',
'params': params,
@@ -3253,7 +3234,7 @@ def set_spc_transaction_mode(
def set_rph_registration_mode(
- mode: AutoResponseMode
+ mode: str
) -> typing.Generator[T_JSON_DICT,T_JSON_DICT,None]:
'''
Extensions for Custom Handlers API:
@@ -3264,7 +3245,7 @@ def set_rph_registration_mode(
:param mode:
'''
params: T_JSON_DICT = dict()
- params['mode'] = mode.to_json()
+ params['mode'] = mode
cmd_dict: T_JSON_DICT = {
'method': 'Page.setRPHRegistrationMode',
'params': params,
@@ -3308,7 +3289,8 @@ def wait_for_debugger() -> typing.Generator[T_JSON_DICT,T_JSON_DICT,None]:
def set_intercept_file_chooser_dialog(
- enabled: bool
+ enabled: bool,
+ cancel: typing.Optional[bool] = None
) -> typing.Generator[T_JSON_DICT,T_JSON_DICT,None]:
'''
Intercept file chooser requests and transfer control to protocol clients.
@@ -3316,9 +3298,12 @@ def set_intercept_file_chooser_dialog(
Instead, a protocol event ``Page.fileChooserOpened`` is emitted.
:param enabled:
+ :param cancel: **(EXPERIMENTAL)** *(Optional)* If true, cancels the dialog by emitting relevant events (if any) in addition to not showing it if the interception is enabled (default: false).
'''
params: T_JSON_DICT = dict()
params['enabled'] = enabled
+ if cancel is not None:
+ params['cancel'] = cancel
cmd_dict: T_JSON_DICT = {
'method': 'Page.setInterceptFileChooserDialog',
'params': params,
@@ -3351,6 +3336,29 @@ def set_prerendering_allowed(
json = yield cmd_dict
+def get_annotated_page_content(
+ include_actionable_information: typing.Optional[bool] = None
+ ) -> typing.Generator[T_JSON_DICT,T_JSON_DICT,str]:
+ '''
+ Get the annotated page content for the main frame.
+ This is an experimental command that is subject to change.
+
+ **EXPERIMENTAL**
+
+ :param include_actionable_information: *(Optional)* Whether to include actionable information. Defaults to true.
+ :returns: The annotated page content as a base64 encoded protobuf. The format is defined by the ``AnnotatedPageContent`` message in components/optimization_guide/proto/features/common_quality_data.proto (Encoded as a base64 string when passed over JSON)
+ '''
+ params: T_JSON_DICT = dict()
+ if include_actionable_information is not None:
+ params['includeActionableInformation'] = include_actionable_information
+ cmd_dict: T_JSON_DICT = {
+ 'method': 'Page.getAnnotatedPageContent',
+ 'params': params,
+ }
+ json = yield cmd_dict
+ return str(json['content'])
+
+
@event_class('Page.domContentEventFired')
@dataclass
class DomContentEventFired:
@@ -3735,6 +3743,8 @@ class JavascriptDialogClosed:
Fired when a JavaScript initiated dialog (alert, confirm, prompt, or onbeforeunload) has been
closed.
'''
+ #: Frame id.
+ frame_id: FrameId
#: Whether dialog was confirmed.
result: bool
#: User input in case of prompt.
@@ -3743,6 +3753,7 @@ class JavascriptDialogClosed:
@classmethod
def from_json(cls, json: T_JSON_DICT) -> JavascriptDialogClosed:
return cls(
+ frame_id=FrameId.from_json(json['frameId']),
result=bool(json['result']),
user_input=str(json['userInput'])
)
@@ -3757,6 +3768,8 @@ class JavascriptDialogOpening:
'''
#: Frame url.
url: str
+ #: Frame id.
+ frame_id: FrameId
#: Message that will be displayed by the dialog.
message: str
#: Dialog type.
@@ -3772,6 +3785,7 @@ class JavascriptDialogOpening:
def from_json(cls, json: T_JSON_DICT) -> JavascriptDialogOpening:
return cls(
url=str(json['url']),
+ frame_id=FrameId.from_json(json['frameId']),
message=str(json['message']),
type_=DialogType.from_json(json['type']),
has_browser_handler=bool(json['hasBrowserHandler']),
@@ -3943,8 +3957,7 @@ class CompilationCacheProduced:
'''
**EXPERIMENTAL**
- Issued for every compilation cache generated. Is only available
- if Page.setGenerateCompilationCache is enabled.
+ Issued for every compilation cache generated.
'''
url: str
#: Base64-encoded data (Encoded as a base64 string when passed over JSON)
diff --git a/pycdp/cdp/preload.py b/pycdp/cdp/preload.py
index a8024e7..7464ff0 100644
--- a/pycdp/cdp/preload.py
+++ b/pycdp/cdp/preload.py
@@ -73,6 +73,10 @@ class RuleSet:
#: TODO(https://crbug.com/1425354): Replace this property with structured error.
error_message: typing.Optional[str] = None
+ #: For more details, see:
+ #: https://github.com/WICG/nav-speculation/blob/main/speculation-rules-tags.md
+ tag: typing.Optional[str] = None
+
def to_json(self) -> T_JSON_DICT:
json: T_JSON_DICT = dict()
json['id'] = self.id_.to_json()
@@ -88,6 +92,8 @@ def to_json(self) -> T_JSON_DICT:
json['errorType'] = self.error_type.to_json()
if self.error_message is not None:
json['errorMessage'] = self.error_message
+ if self.tag is not None:
+ json['tag'] = self.tag
return json
@classmethod
@@ -101,12 +107,14 @@ def from_json(cls, json: T_JSON_DICT) -> RuleSet:
request_id=network.RequestId.from_json(json['requestId']) if json.get('requestId', None) is not None else None,
error_type=RuleSetErrorType.from_json(json['errorType']) if json.get('errorType', None) is not None else None,
error_message=str(json['errorMessage']) if json.get('errorMessage', None) is not None else None,
+ tag=str(json['tag']) if json.get('tag', None) is not None else None,
)
class RuleSetErrorType(enum.Enum):
SOURCE_IS_NOT_JSON_OBJECT = "SourceIsNotJsonObject"
INVALID_RULES_SKIPPED = "InvalidRulesSkipped"
+ INVALID_RULESET_LEVEL_TAG = "InvalidRulesetLevelTag"
def to_json(self) -> str:
return self.value
@@ -124,6 +132,7 @@ class SpeculationAction(enum.Enum):
'''
PREFETCH = "Prefetch"
PRERENDER = "Prerender"
+ PRERENDER_UNTIL_SCRIPT = "PrerenderUntilScript"
def to_json(self) -> str:
return self.value
@@ -248,7 +257,6 @@ class PrerenderFinalStatus(enum.Enum):
INVALID_SCHEME_REDIRECT = "InvalidSchemeRedirect"
INVALID_SCHEME_NAVIGATION = "InvalidSchemeNavigation"
NAVIGATION_REQUEST_BLOCKED_BY_CSP = "NavigationRequestBlockedByCsp"
- MAIN_FRAME_NAVIGATION = "MainFrameNavigation"
MOJO_BINDER_POLICY = "MojoBinderPolicy"
RENDERER_PROCESS_CRASHED = "RendererProcessCrashed"
RENDERER_PROCESS_KILLED = "RendererProcessKilled"
@@ -316,6 +324,7 @@ class PrerenderFinalStatus(enum.Enum):
V8_OPTIMIZER_DISABLED = "V8OptimizerDisabled"
PRERENDER_FAILED_DURING_PREFETCH = "PrerenderFailedDuringPrefetch"
BROWSING_DATA_REMOVED = "BrowsingDataRemoved"
+ PRERENDER_HOST_REUSED = "PrerenderHostReused"
def to_json(self) -> str:
return self.value
@@ -356,6 +365,7 @@ class PrefetchStatus(enum.Enum):
PREFETCH_FAILED_MIME_NOT_SUPPORTED = "PrefetchFailedMIMENotSupported"
PREFETCH_FAILED_NET_ERROR = "PrefetchFailedNetError"
PREFETCH_FAILED_NON2_XX = "PrefetchFailedNon2XX"
+ PREFETCH_EVICTED_AFTER_BROWSING_DATA_REMOVED = "PrefetchEvictedAfterBrowsingDataRemoved"
PREFETCH_EVICTED_AFTER_CANDIDATE_REMOVED = "PrefetchEvictedAfterCandidateRemoved"
PREFETCH_EVICTED_FOR_NEWER_PREFETCH = "PrefetchEvictedForNewerPrefetch"
PREFETCH_HELDBACK = "PrefetchHeldback"
diff --git a/pycdp/cdp/pwa.py b/pycdp/cdp/pwa.py
index e91a4dc..53c91a4 100644
--- a/pycdp/cdp/pwa.py
+++ b/pycdp/cdp/pwa.py
@@ -109,15 +109,31 @@ def install(
install_url_or_bundle_url: typing.Optional[str] = None
) -> typing.Generator[T_JSON_DICT,T_JSON_DICT,None]:
'''
- Installs the given manifest identity, optionally using the given install_url
- or IWA bundle location.
-
- TODO(crbug.com/337872319) Support IWA to meet the following specific
- requirement.
- IWA-specific install description: If the manifest_id is isolated-app://,
- install_url_or_bundle_url is required, and can be either an http(s) URL or
- file:// URL pointing to a signed web bundle (.swbn). The .swbn file's
- signing key must correspond to manifest_id. If Chrome is not in IWA dev
+ Installs the given manifest identity, optionally using the given installUrlOrBundleUrl
+
+ IWA-specific install description:
+ manifestId corresponds to isolated-app:// + web_package::SignedWebBundleId
+
+ File installation mode:
+ The installUrlOrBundleUrl can be either file:// or http(s):// pointing
+ to a signed web bundle (.swbn). In this case SignedWebBundleId must correspond to
+ The .swbn file's signing key.
+
+ Dev proxy installation mode:
+ installUrlOrBundleUrl must be http(s):// that serves dev mode IWA.
+ web_package::SignedWebBundleId must be of type dev proxy.
+
+ The advantage of dev proxy mode is that all changes to IWA
+ automatically will be reflected in the running app without
+ reinstallation.
+
+ To generate bundle id for proxy mode:
+ 1. Generate 32 random bytes.
+ 2. Add a specific suffix at the end following the documentation
+ https://github.com/WICG/isolated-web-apps/blob/main/Scheme.md#suffix
+ 3. Encode the entire sequence using Base32 without padding.
+
+ If Chrome is not in IWA dev
mode, the installation will fail, regardless of the state of the allowlist.
:param manifest_id:
diff --git a/pycdp/cdp/service_worker.py b/pycdp/cdp/service_worker.py
index 8df9318..ad79188 100644
--- a/pycdp/cdp/service_worker.py
+++ b/pycdp/cdp/service_worker.py
@@ -267,21 +267,6 @@ def enable() -> typing.Generator[T_JSON_DICT,T_JSON_DICT,None]:
json = yield cmd_dict
-def inspect_worker(
- version_id: str
- ) -> typing.Generator[T_JSON_DICT,T_JSON_DICT,None]:
- '''
- :param version_id:
- '''
- params: T_JSON_DICT = dict()
- params['versionId'] = version_id
- cmd_dict: T_JSON_DICT = {
- 'method': 'ServiceWorker.inspectWorker',
- 'params': params,
- }
- json = yield cmd_dict
-
-
def set_force_update_on_page_load(
force_update_on_page_load: bool
) -> typing.Generator[T_JSON_DICT,T_JSON_DICT,None]:
diff --git a/pycdp/cdp/smart_card_emulation.py b/pycdp/cdp/smart_card_emulation.py
new file mode 100644
index 0000000..05d135f
--- /dev/null
+++ b/pycdp/cdp/smart_card_emulation.py
@@ -0,0 +1,891 @@
+# DO NOT EDIT THIS FILE!
+#
+# This file is generated from the CDP specification. If you need to make
+# changes, edit the generator and regenerate all of the modules.
+#
+# CDP domain: SmartCardEmulation (experimental)
+
+from __future__ import annotations
+import enum
+import typing
+from dataclasses import dataclass
+from .util import event_class, T_JSON_DICT
+
+
+class ResultCode(enum.Enum):
+ '''
+ Indicates the PC/SC error code.
+
+ This maps to:
+ PC/SC Lite: https://pcsclite.apdu.fr/api/group__ErrorCodes.html
+ Microsoft: https://learn.microsoft.com/en-us/windows/win32/secauthn/authentication-return-values
+ '''
+ SUCCESS = "success"
+ REMOVED_CARD = "removed-card"
+ RESET_CARD = "reset-card"
+ UNPOWERED_CARD = "unpowered-card"
+ UNRESPONSIVE_CARD = "unresponsive-card"
+ UNSUPPORTED_CARD = "unsupported-card"
+ READER_UNAVAILABLE = "reader-unavailable"
+ SHARING_VIOLATION = "sharing-violation"
+ NOT_TRANSACTED = "not-transacted"
+ NO_SMARTCARD = "no-smartcard"
+ PROTO_MISMATCH = "proto-mismatch"
+ SYSTEM_CANCELLED = "system-cancelled"
+ NOT_READY = "not-ready"
+ CANCELLED = "cancelled"
+ INSUFFICIENT_BUFFER = "insufficient-buffer"
+ INVALID_HANDLE = "invalid-handle"
+ INVALID_PARAMETER = "invalid-parameter"
+ INVALID_VALUE = "invalid-value"
+ NO_MEMORY = "no-memory"
+ TIMEOUT = "timeout"
+ UNKNOWN_READER = "unknown-reader"
+ UNSUPPORTED_FEATURE = "unsupported-feature"
+ NO_READERS_AVAILABLE = "no-readers-available"
+ SERVICE_STOPPED = "service-stopped"
+ NO_SERVICE = "no-service"
+ COMM_ERROR = "comm-error"
+ INTERNAL_ERROR = "internal-error"
+ SERVER_TOO_BUSY = "server-too-busy"
+ UNEXPECTED = "unexpected"
+ SHUTDOWN = "shutdown"
+ UNKNOWN_CARD = "unknown-card"
+ UNKNOWN = "unknown"
+
+ def to_json(self) -> str:
+ return self.value
+
+ @classmethod
+ def from_json(cls, json: str) -> ResultCode:
+ return cls(json)
+
+
+class ShareMode(enum.Enum):
+ '''
+ Maps to the ``SCARD_SHARE_*`` values.
+ '''
+ SHARED = "shared"
+ EXCLUSIVE = "exclusive"
+ DIRECT = "direct"
+
+ def to_json(self) -> str:
+ return self.value
+
+ @classmethod
+ def from_json(cls, json: str) -> ShareMode:
+ return cls(json)
+
+
+class Disposition(enum.Enum):
+ '''
+ Indicates what the reader should do with the card.
+ '''
+ LEAVE_CARD = "leave-card"
+ RESET_CARD = "reset-card"
+ UNPOWER_CARD = "unpower-card"
+ EJECT_CARD = "eject-card"
+
+ def to_json(self) -> str:
+ return self.value
+
+ @classmethod
+ def from_json(cls, json: str) -> Disposition:
+ return cls(json)
+
+
+class ConnectionState(enum.Enum):
+ '''
+ Maps to ``SCARD_*`` connection state values.
+ '''
+ ABSENT = "absent"
+ PRESENT = "present"
+ SWALLOWED = "swallowed"
+ POWERED = "powered"
+ NEGOTIABLE = "negotiable"
+ SPECIFIC = "specific"
+
+ def to_json(self) -> str:
+ return self.value
+
+ @classmethod
+ def from_json(cls, json: str) -> ConnectionState:
+ return cls(json)
+
+
+@dataclass
+class ReaderStateFlags:
+ '''
+ Maps to the ``SCARD_STATE_*`` flags.
+ '''
+ unaware: typing.Optional[bool] = None
+
+ ignore: typing.Optional[bool] = None
+
+ changed: typing.Optional[bool] = None
+
+ unknown: typing.Optional[bool] = None
+
+ unavailable: typing.Optional[bool] = None
+
+ empty: typing.Optional[bool] = None
+
+ present: typing.Optional[bool] = None
+
+ exclusive: typing.Optional[bool] = None
+
+ inuse: typing.Optional[bool] = None
+
+ mute: typing.Optional[bool] = None
+
+ unpowered: typing.Optional[bool] = None
+
+ def to_json(self) -> T_JSON_DICT:
+ json: T_JSON_DICT = dict()
+ if self.unaware is not None:
+ json['unaware'] = self.unaware
+ if self.ignore is not None:
+ json['ignore'] = self.ignore
+ if self.changed is not None:
+ json['changed'] = self.changed
+ if self.unknown is not None:
+ json['unknown'] = self.unknown
+ if self.unavailable is not None:
+ json['unavailable'] = self.unavailable
+ if self.empty is not None:
+ json['empty'] = self.empty
+ if self.present is not None:
+ json['present'] = self.present
+ if self.exclusive is not None:
+ json['exclusive'] = self.exclusive
+ if self.inuse is not None:
+ json['inuse'] = self.inuse
+ if self.mute is not None:
+ json['mute'] = self.mute
+ if self.unpowered is not None:
+ json['unpowered'] = self.unpowered
+ return json
+
+ @classmethod
+ def from_json(cls, json: T_JSON_DICT) -> ReaderStateFlags:
+ return cls(
+ unaware=bool(json['unaware']) if json.get('unaware', None) is not None else None,
+ ignore=bool(json['ignore']) if json.get('ignore', None) is not None else None,
+ changed=bool(json['changed']) if json.get('changed', None) is not None else None,
+ unknown=bool(json['unknown']) if json.get('unknown', None) is not None else None,
+ unavailable=bool(json['unavailable']) if json.get('unavailable', None) is not None else None,
+ empty=bool(json['empty']) if json.get('empty', None) is not None else None,
+ present=bool(json['present']) if json.get('present', None) is not None else None,
+ exclusive=bool(json['exclusive']) if json.get('exclusive', None) is not None else None,
+ inuse=bool(json['inuse']) if json.get('inuse', None) is not None else None,
+ mute=bool(json['mute']) if json.get('mute', None) is not None else None,
+ unpowered=bool(json['unpowered']) if json.get('unpowered', None) is not None else None,
+ )
+
+
+@dataclass
+class ProtocolSet:
+ '''
+ Maps to the ``SCARD_PROTOCOL_*`` flags.
+ '''
+ t0: typing.Optional[bool] = None
+
+ t1: typing.Optional[bool] = None
+
+ raw: typing.Optional[bool] = None
+
+ def to_json(self) -> T_JSON_DICT:
+ json: T_JSON_DICT = dict()
+ if self.t0 is not None:
+ json['t0'] = self.t0
+ if self.t1 is not None:
+ json['t1'] = self.t1
+ if self.raw is not None:
+ json['raw'] = self.raw
+ return json
+
+ @classmethod
+ def from_json(cls, json: T_JSON_DICT) -> ProtocolSet:
+ return cls(
+ t0=bool(json['t0']) if json.get('t0', None) is not None else None,
+ t1=bool(json['t1']) if json.get('t1', None) is not None else None,
+ raw=bool(json['raw']) if json.get('raw', None) is not None else None,
+ )
+
+
+class Protocol(enum.Enum):
+ '''
+ Maps to the ``SCARD_PROTOCOL_*`` values.
+ '''
+ T0 = "t0"
+ T1 = "t1"
+ RAW = "raw"
+
+ def to_json(self) -> str:
+ return self.value
+
+ @classmethod
+ def from_json(cls, json: str) -> Protocol:
+ return cls(json)
+
+
+@dataclass
+class ReaderStateIn:
+ reader: str
+
+ current_state: ReaderStateFlags
+
+ current_insertion_count: int
+
+ def to_json(self) -> T_JSON_DICT:
+ json: T_JSON_DICT = dict()
+ json['reader'] = self.reader
+ json['currentState'] = self.current_state.to_json()
+ json['currentInsertionCount'] = self.current_insertion_count
+ return json
+
+ @classmethod
+ def from_json(cls, json: T_JSON_DICT) -> ReaderStateIn:
+ return cls(
+ reader=str(json['reader']),
+ current_state=ReaderStateFlags.from_json(json['currentState']),
+ current_insertion_count=int(json['currentInsertionCount']),
+ )
+
+
+@dataclass
+class ReaderStateOut:
+ reader: str
+
+ event_state: ReaderStateFlags
+
+ event_count: int
+
+ atr: str
+
+ def to_json(self) -> T_JSON_DICT:
+ json: T_JSON_DICT = dict()
+ json['reader'] = self.reader
+ json['eventState'] = self.event_state.to_json()
+ json['eventCount'] = self.event_count
+ json['atr'] = self.atr
+ return json
+
+ @classmethod
+ def from_json(cls, json: T_JSON_DICT) -> ReaderStateOut:
+ return cls(
+ reader=str(json['reader']),
+ event_state=ReaderStateFlags.from_json(json['eventState']),
+ event_count=int(json['eventCount']),
+ atr=str(json['atr']),
+ )
+
+
+def enable() -> typing.Generator[T_JSON_DICT,T_JSON_DICT,None]:
+ '''
+ Enables the ``SmartCardEmulation`` domain.
+ '''
+ cmd_dict: T_JSON_DICT = {
+ 'method': 'SmartCardEmulation.enable',
+ }
+ json = yield cmd_dict
+
+
+def disable() -> typing.Generator[T_JSON_DICT,T_JSON_DICT,None]:
+ '''
+ Disables the ``SmartCardEmulation`` domain.
+ '''
+ cmd_dict: T_JSON_DICT = {
+ 'method': 'SmartCardEmulation.disable',
+ }
+ json = yield cmd_dict
+
+
+def report_establish_context_result(
+ request_id: str,
+ context_id: int
+ ) -> typing.Generator[T_JSON_DICT,T_JSON_DICT,None]:
+ '''
+ Reports the successful result of a ``SCardEstablishContext`` call.
+
+ This maps to:
+ PC/SC Lite: https://pcsclite.apdu.fr/api/group__API.html#gaa1b8970169fd4883a6dc4a8f43f19b67
+ Microsoft: https://learn.microsoft.com/en-us/windows/win32/api/winscard/nf-winscard-scardestablishcontext
+
+ :param request_id:
+ :param context_id:
+ '''
+ params: T_JSON_DICT = dict()
+ params['requestId'] = request_id
+ params['contextId'] = context_id
+ cmd_dict: T_JSON_DICT = {
+ 'method': 'SmartCardEmulation.reportEstablishContextResult',
+ 'params': params,
+ }
+ json = yield cmd_dict
+
+
+def report_release_context_result(
+ request_id: str
+ ) -> typing.Generator[T_JSON_DICT,T_JSON_DICT,None]:
+ '''
+ Reports the successful result of a ``SCardReleaseContext`` call.
+
+ This maps to:
+ PC/SC Lite: https://pcsclite.apdu.fr/api/group__API.html#ga6aabcba7744c5c9419fdd6404f73a934
+ Microsoft: https://learn.microsoft.com/en-us/windows/win32/api/winscard/nf-winscard-scardreleasecontext
+
+ :param request_id:
+ '''
+ params: T_JSON_DICT = dict()
+ params['requestId'] = request_id
+ cmd_dict: T_JSON_DICT = {
+ 'method': 'SmartCardEmulation.reportReleaseContextResult',
+ 'params': params,
+ }
+ json = yield cmd_dict
+
+
+def report_list_readers_result(
+ request_id: str,
+ readers: typing.List[str]
+ ) -> typing.Generator[T_JSON_DICT,T_JSON_DICT,None]:
+ '''
+ Reports the successful result of a ``SCardListReaders`` call.
+
+ This maps to:
+ PC/SC Lite: https://pcsclite.apdu.fr/api/group__API.html#ga93b07815789b3cf2629d439ecf20f0d9
+ Microsoft: https://learn.microsoft.com/en-us/windows/win32/api/winscard/nf-winscard-scardlistreadersa
+
+ :param request_id:
+ :param readers:
+ '''
+ params: T_JSON_DICT = dict()
+ params['requestId'] = request_id
+ params['readers'] = [i for i in readers]
+ cmd_dict: T_JSON_DICT = {
+ 'method': 'SmartCardEmulation.reportListReadersResult',
+ 'params': params,
+ }
+ json = yield cmd_dict
+
+
+def report_get_status_change_result(
+ request_id: str,
+ reader_states: typing.List[ReaderStateOut]
+ ) -> typing.Generator[T_JSON_DICT,T_JSON_DICT,None]:
+ '''
+ Reports the successful result of a ``SCardGetStatusChange`` call.
+
+ This maps to:
+ PC/SC Lite: https://pcsclite.apdu.fr/api/group__API.html#ga33247d5d1257d59e55647c3bb717db24
+ Microsoft: https://learn.microsoft.com/en-us/windows/win32/api/winscard/nf-winscard-scardgetstatuschangea
+
+ :param request_id:
+ :param reader_states:
+ '''
+ params: T_JSON_DICT = dict()
+ params['requestId'] = request_id
+ params['readerStates'] = [i.to_json() for i in reader_states]
+ cmd_dict: T_JSON_DICT = {
+ 'method': 'SmartCardEmulation.reportGetStatusChangeResult',
+ 'params': params,
+ }
+ json = yield cmd_dict
+
+
+def report_begin_transaction_result(
+ request_id: str,
+ handle: int
+ ) -> typing.Generator[T_JSON_DICT,T_JSON_DICT,None]:
+ '''
+ Reports the result of a ``SCardBeginTransaction`` call.
+ On success, this creates a new transaction object.
+
+ This maps to:
+ PC/SC Lite: https://pcsclite.apdu.fr/api/group__API.html#gaddb835dce01a0da1d6ca02d33ee7d861
+ Microsoft: https://learn.microsoft.com/en-us/windows/win32/api/winscard/nf-winscard-scardbegintransaction
+
+ :param request_id:
+ :param handle:
+ '''
+ params: T_JSON_DICT = dict()
+ params['requestId'] = request_id
+ params['handle'] = handle
+ cmd_dict: T_JSON_DICT = {
+ 'method': 'SmartCardEmulation.reportBeginTransactionResult',
+ 'params': params,
+ }
+ json = yield cmd_dict
+
+
+def report_plain_result(
+ request_id: str
+ ) -> typing.Generator[T_JSON_DICT,T_JSON_DICT,None]:
+ '''
+ Reports the successful result of a call that returns only a result code.
+ Used for: ``SCardCancel``, ``SCardDisconnect``, ``SCardSetAttrib``, ``SCardEndTransaction``.
+
+ This maps to:
+ 1. SCardCancel
+ PC/SC Lite: https://pcsclite.apdu.fr/api/group__API.html#gaacbbc0c6d6c0cbbeb4f4debf6fbeeee6
+ Microsoft: https://learn.microsoft.com/en-us/windows/win32/api/winscard/nf-winscard-scardcancel
+
+ 2. SCardDisconnect
+ PC/SC Lite: https://pcsclite.apdu.fr/api/group__API.html#ga4be198045c73ec0deb79e66c0ca1738a
+ Microsoft: https://learn.microsoft.com/en-us/windows/win32/api/winscard/nf-winscard-scarddisconnect
+
+ 3. SCardSetAttrib
+ PC/SC Lite: https://pcsclite.apdu.fr/api/group__API.html#ga060f0038a4ddfd5dd2b8fadf3c3a2e4f
+ Microsoft: https://learn.microsoft.com/en-us/windows/win32/api/winscard/nf-winscard-scardsetattrib
+
+ 4. SCardEndTransaction
+ PC/SC Lite: https://pcsclite.apdu.fr/api/group__API.html#gae8742473b404363e5c587f570d7e2f3b
+ Microsoft: https://learn.microsoft.com/en-us/windows/win32/api/winscard/nf-winscard-scardendtransaction
+
+ :param request_id:
+ '''
+ params: T_JSON_DICT = dict()
+ params['requestId'] = request_id
+ cmd_dict: T_JSON_DICT = {
+ 'method': 'SmartCardEmulation.reportPlainResult',
+ 'params': params,
+ }
+ json = yield cmd_dict
+
+
+def report_connect_result(
+ request_id: str,
+ handle: int,
+ active_protocol: typing.Optional[Protocol] = None
+ ) -> typing.Generator[T_JSON_DICT,T_JSON_DICT,None]:
+ '''
+ Reports the successful result of a ``SCardConnect`` call.
+
+ This maps to:
+ PC/SC Lite: https://pcsclite.apdu.fr/api/group__API.html#ga4e515829752e0a8dbc4d630696a8d6a5
+ Microsoft: https://learn.microsoft.com/en-us/windows/win32/api/winscard/nf-winscard-scardconnecta
+
+ :param request_id:
+ :param handle:
+ :param active_protocol: *(Optional)*
+ '''
+ params: T_JSON_DICT = dict()
+ params['requestId'] = request_id
+ params['handle'] = handle
+ if active_protocol is not None:
+ params['activeProtocol'] = active_protocol.to_json()
+ cmd_dict: T_JSON_DICT = {
+ 'method': 'SmartCardEmulation.reportConnectResult',
+ 'params': params,
+ }
+ json = yield cmd_dict
+
+
+def report_data_result(
+ request_id: str,
+ data: str
+ ) -> typing.Generator[T_JSON_DICT,T_JSON_DICT,None]:
+ '''
+ Reports the successful result of a call that sends back data on success.
+ Used for ``SCardTransmit``, ``SCardControl``, and ``SCardGetAttrib``.
+
+ This maps to:
+ 1. SCardTransmit
+ PC/SC Lite: https://pcsclite.apdu.fr/api/group__API.html#ga9a2d77242a271310269065e64633ab99
+ Microsoft: https://learn.microsoft.com/en-us/windows/win32/api/winscard/nf-winscard-scardtransmit
+
+ 2. SCardControl
+ PC/SC Lite: https://pcsclite.apdu.fr/api/group__API.html#gac3454d4657110fd7f753b2d3d8f4e32f
+ Microsoft: https://learn.microsoft.com/en-us/windows/win32/api/winscard/nf-winscard-scardcontrol
+
+ 3. SCardGetAttrib
+ PC/SC Lite: https://pcsclite.apdu.fr/api/group__API.html#gaacfec51917255b7a25b94c5104961602
+ Microsoft: https://learn.microsoft.com/en-us/windows/win32/api/winscard/nf-winscard-scardgetattrib
+
+ :param request_id:
+ :param data:
+ '''
+ params: T_JSON_DICT = dict()
+ params['requestId'] = request_id
+ params['data'] = data
+ cmd_dict: T_JSON_DICT = {
+ 'method': 'SmartCardEmulation.reportDataResult',
+ 'params': params,
+ }
+ json = yield cmd_dict
+
+
+def report_status_result(
+ request_id: str,
+ reader_name: str,
+ state: ConnectionState,
+ atr: str,
+ protocol: typing.Optional[Protocol] = None
+ ) -> typing.Generator[T_JSON_DICT,T_JSON_DICT,None]:
+ '''
+ Reports the successful result of a ``SCardStatus`` call.
+
+ This maps to:
+ PC/SC Lite: https://pcsclite.apdu.fr/api/group__API.html#gae49c3c894ad7ac12a5b896bde70d0382
+ Microsoft: https://learn.microsoft.com/en-us/windows/win32/api/winscard/nf-winscard-scardstatusa
+
+ :param request_id:
+ :param reader_name:
+ :param state:
+ :param atr:
+ :param protocol: *(Optional)*
+ '''
+ params: T_JSON_DICT = dict()
+ params['requestId'] = request_id
+ params['readerName'] = reader_name
+ params['state'] = state.to_json()
+ params['atr'] = atr
+ if protocol is not None:
+ params['protocol'] = protocol.to_json()
+ cmd_dict: T_JSON_DICT = {
+ 'method': 'SmartCardEmulation.reportStatusResult',
+ 'params': params,
+ }
+ json = yield cmd_dict
+
+
+def report_error(
+ request_id: str,
+ result_code: ResultCode
+ ) -> typing.Generator[T_JSON_DICT,T_JSON_DICT,None]:
+ '''
+ Reports an error result for the given request.
+
+ :param request_id:
+ :param result_code:
+ '''
+ params: T_JSON_DICT = dict()
+ params['requestId'] = request_id
+ params['resultCode'] = result_code.to_json()
+ cmd_dict: T_JSON_DICT = {
+ 'method': 'SmartCardEmulation.reportError',
+ 'params': params,
+ }
+ json = yield cmd_dict
+
+
+@event_class('SmartCardEmulation.establishContextRequested')
+@dataclass
+class EstablishContextRequested:
+ '''
+ Fired when ``SCardEstablishContext`` is called.
+
+ This maps to:
+ PC/SC Lite: https://pcsclite.apdu.fr/api/group__API.html#gaa1b8970169fd4883a6dc4a8f43f19b67
+ Microsoft: https://learn.microsoft.com/en-us/windows/win32/api/winscard/nf-winscard-scardestablishcontext
+ '''
+ request_id: str
+
+ @classmethod
+ def from_json(cls, json: T_JSON_DICT) -> EstablishContextRequested:
+ return cls(
+ request_id=str(json['requestId'])
+ )
+
+
+@event_class('SmartCardEmulation.releaseContextRequested')
+@dataclass
+class ReleaseContextRequested:
+ '''
+ Fired when ``SCardReleaseContext`` is called.
+
+ This maps to:
+ PC/SC Lite: https://pcsclite.apdu.fr/api/group__API.html#ga6aabcba7744c5c9419fdd6404f73a934
+ Microsoft: https://learn.microsoft.com/en-us/windows/win32/api/winscard/nf-winscard-scardreleasecontext
+ '''
+ request_id: str
+ context_id: int
+
+ @classmethod
+ def from_json(cls, json: T_JSON_DICT) -> ReleaseContextRequested:
+ return cls(
+ request_id=str(json['requestId']),
+ context_id=int(json['contextId'])
+ )
+
+
+@event_class('SmartCardEmulation.listReadersRequested')
+@dataclass
+class ListReadersRequested:
+ '''
+ Fired when ``SCardListReaders`` is called.
+
+ This maps to:
+ PC/SC Lite: https://pcsclite.apdu.fr/api/group__API.html#ga93b07815789b3cf2629d439ecf20f0d9
+ Microsoft: https://learn.microsoft.com/en-us/windows/win32/api/winscard/nf-winscard-scardlistreadersa
+ '''
+ request_id: str
+ context_id: int
+
+ @classmethod
+ def from_json(cls, json: T_JSON_DICT) -> ListReadersRequested:
+ return cls(
+ request_id=str(json['requestId']),
+ context_id=int(json['contextId'])
+ )
+
+
+@event_class('SmartCardEmulation.getStatusChangeRequested')
+@dataclass
+class GetStatusChangeRequested:
+ '''
+ Fired when ``SCardGetStatusChange`` is called. Timeout is specified in milliseconds.
+
+ This maps to:
+ PC/SC Lite: https://pcsclite.apdu.fr/api/group__API.html#ga33247d5d1257d59e55647c3bb717db24
+ Microsoft: https://learn.microsoft.com/en-us/windows/win32/api/winscard/nf-winscard-scardgetstatuschangea
+ '''
+ request_id: str
+ context_id: int
+ reader_states: typing.List[ReaderStateIn]
+ #: in milliseconds, if absent, it means "infinite"
+ timeout: typing.Optional[int]
+
+ @classmethod
+ def from_json(cls, json: T_JSON_DICT) -> GetStatusChangeRequested:
+ return cls(
+ request_id=str(json['requestId']),
+ context_id=int(json['contextId']),
+ reader_states=[ReaderStateIn.from_json(i) for i in json['readerStates']],
+ timeout=int(json['timeout']) if json.get('timeout', None) is not None else None
+ )
+
+
+@event_class('SmartCardEmulation.cancelRequested')
+@dataclass
+class CancelRequested:
+ '''
+ Fired when ``SCardCancel`` is called.
+
+ This maps to:
+ PC/SC Lite: https://pcsclite.apdu.fr/api/group__API.html#gaacbbc0c6d6c0cbbeb4f4debf6fbeeee6
+ Microsoft: https://learn.microsoft.com/en-us/windows/win32/api/winscard/nf-winscard-scardcancel
+ '''
+ request_id: str
+ context_id: int
+
+ @classmethod
+ def from_json(cls, json: T_JSON_DICT) -> CancelRequested:
+ return cls(
+ request_id=str(json['requestId']),
+ context_id=int(json['contextId'])
+ )
+
+
+@event_class('SmartCardEmulation.connectRequested')
+@dataclass
+class ConnectRequested:
+ '''
+ Fired when ``SCardConnect`` is called.
+
+ This maps to:
+ PC/SC Lite: https://pcsclite.apdu.fr/api/group__API.html#ga4e515829752e0a8dbc4d630696a8d6a5
+ Microsoft: https://learn.microsoft.com/en-us/windows/win32/api/winscard/nf-winscard-scardconnecta
+ '''
+ request_id: str
+ context_id: int
+ reader: str
+ share_mode: ShareMode
+ preferred_protocols: ProtocolSet
+
+ @classmethod
+ def from_json(cls, json: T_JSON_DICT) -> ConnectRequested:
+ return cls(
+ request_id=str(json['requestId']),
+ context_id=int(json['contextId']),
+ reader=str(json['reader']),
+ share_mode=ShareMode.from_json(json['shareMode']),
+ preferred_protocols=ProtocolSet.from_json(json['preferredProtocols'])
+ )
+
+
+@event_class('SmartCardEmulation.disconnectRequested')
+@dataclass
+class DisconnectRequested:
+ '''
+ Fired when ``SCardDisconnect`` is called.
+
+ This maps to:
+ PC/SC Lite: https://pcsclite.apdu.fr/api/group__API.html#ga4be198045c73ec0deb79e66c0ca1738a
+ Microsoft: https://learn.microsoft.com/en-us/windows/win32/api/winscard/nf-winscard-scarddisconnect
+ '''
+ request_id: str
+ handle: int
+ disposition: Disposition
+
+ @classmethod
+ def from_json(cls, json: T_JSON_DICT) -> DisconnectRequested:
+ return cls(
+ request_id=str(json['requestId']),
+ handle=int(json['handle']),
+ disposition=Disposition.from_json(json['disposition'])
+ )
+
+
+@event_class('SmartCardEmulation.transmitRequested')
+@dataclass
+class TransmitRequested:
+ '''
+ Fired when ``SCardTransmit`` is called.
+
+ This maps to:
+ PC/SC Lite: https://pcsclite.apdu.fr/api/group__API.html#ga9a2d77242a271310269065e64633ab99
+ Microsoft: https://learn.microsoft.com/en-us/windows/win32/api/winscard/nf-winscard-scardtransmit
+ '''
+ request_id: str
+ handle: int
+ data: str
+ protocol: typing.Optional[Protocol]
+
+ @classmethod
+ def from_json(cls, json: T_JSON_DICT) -> TransmitRequested:
+ return cls(
+ request_id=str(json['requestId']),
+ handle=int(json['handle']),
+ data=str(json['data']),
+ protocol=Protocol.from_json(json['protocol']) if json.get('protocol', None) is not None else None
+ )
+
+
+@event_class('SmartCardEmulation.controlRequested')
+@dataclass
+class ControlRequested:
+ '''
+ Fired when ``SCardControl`` is called.
+
+ This maps to:
+ PC/SC Lite: https://pcsclite.apdu.fr/api/group__API.html#gac3454d4657110fd7f753b2d3d8f4e32f
+ Microsoft: https://learn.microsoft.com/en-us/windows/win32/api/winscard/nf-winscard-scardcontrol
+ '''
+ request_id: str
+ handle: int
+ control_code: int
+ data: str
+
+ @classmethod
+ def from_json(cls, json: T_JSON_DICT) -> ControlRequested:
+ return cls(
+ request_id=str(json['requestId']),
+ handle=int(json['handle']),
+ control_code=int(json['controlCode']),
+ data=str(json['data'])
+ )
+
+
+@event_class('SmartCardEmulation.getAttribRequested')
+@dataclass
+class GetAttribRequested:
+ '''
+ Fired when ``SCardGetAttrib`` is called.
+
+ This maps to:
+ PC/SC Lite: https://pcsclite.apdu.fr/api/group__API.html#gaacfec51917255b7a25b94c5104961602
+ Microsoft: https://learn.microsoft.com/en-us/windows/win32/api/winscard/nf-winscard-scardgetattrib
+ '''
+ request_id: str
+ handle: int
+ attrib_id: int
+
+ @classmethod
+ def from_json(cls, json: T_JSON_DICT) -> GetAttribRequested:
+ return cls(
+ request_id=str(json['requestId']),
+ handle=int(json['handle']),
+ attrib_id=int(json['attribId'])
+ )
+
+
+@event_class('SmartCardEmulation.setAttribRequested')
+@dataclass
+class SetAttribRequested:
+ '''
+ Fired when ``SCardSetAttrib`` is called.
+
+ This maps to:
+ PC/SC Lite: https://pcsclite.apdu.fr/api/group__API.html#ga060f0038a4ddfd5dd2b8fadf3c3a2e4f
+ Microsoft: https://learn.microsoft.com/en-us/windows/win32/api/winscard/nf-winscard-scardsetattrib
+ '''
+ request_id: str
+ handle: int
+ attrib_id: int
+ data: str
+
+ @classmethod
+ def from_json(cls, json: T_JSON_DICT) -> SetAttribRequested:
+ return cls(
+ request_id=str(json['requestId']),
+ handle=int(json['handle']),
+ attrib_id=int(json['attribId']),
+ data=str(json['data'])
+ )
+
+
+@event_class('SmartCardEmulation.statusRequested')
+@dataclass
+class StatusRequested:
+ '''
+ Fired when ``SCardStatus`` is called.
+
+ This maps to:
+ PC/SC Lite: https://pcsclite.apdu.fr/api/group__API.html#gae49c3c894ad7ac12a5b896bde70d0382
+ Microsoft: https://learn.microsoft.com/en-us/windows/win32/api/winscard/nf-winscard-scardstatusa
+ '''
+ request_id: str
+ handle: int
+
+ @classmethod
+ def from_json(cls, json: T_JSON_DICT) -> StatusRequested:
+ return cls(
+ request_id=str(json['requestId']),
+ handle=int(json['handle'])
+ )
+
+
+@event_class('SmartCardEmulation.beginTransactionRequested')
+@dataclass
+class BeginTransactionRequested:
+ '''
+ Fired when ``SCardBeginTransaction`` is called.
+
+ This maps to:
+ PC/SC Lite: https://pcsclite.apdu.fr/api/group__API.html#gaddb835dce01a0da1d6ca02d33ee7d861
+ Microsoft: https://learn.microsoft.com/en-us/windows/win32/api/winscard/nf-winscard-scardbegintransaction
+ '''
+ request_id: str
+ handle: int
+
+ @classmethod
+ def from_json(cls, json: T_JSON_DICT) -> BeginTransactionRequested:
+ return cls(
+ request_id=str(json['requestId']),
+ handle=int(json['handle'])
+ )
+
+
+@event_class('SmartCardEmulation.endTransactionRequested')
+@dataclass
+class EndTransactionRequested:
+ '''
+ Fired when ``SCardEndTransaction`` is called.
+
+ This maps to:
+ PC/SC Lite: https://pcsclite.apdu.fr/api/group__API.html#gae8742473b404363e5c587f570d7e2f3b
+ Microsoft: https://learn.microsoft.com/en-us/windows/win32/api/winscard/nf-winscard-scardendtransaction
+ '''
+ request_id: str
+ handle: int
+ disposition: Disposition
+
+ @classmethod
+ def from_json(cls, json: T_JSON_DICT) -> EndTransactionRequested:
+ return cls(
+ request_id=str(json['requestId']),
+ handle=int(json['handle']),
+ disposition=Disposition.from_json(json['disposition'])
+ )
diff --git a/pycdp/cdp/storage.py b/pycdp/cdp/storage.py
index 87c889a..c98736a 100644
--- a/pycdp/cdp/storage.py
+++ b/pycdp/cdp/storage.py
@@ -14,6 +14,8 @@
from . import browser
from . import network
from . import page
+from . import target
+from deprecated.sphinx import deprecated # type: ignore
class SerializedStorageKey(str):
@@ -175,37 +177,48 @@ def from_json(cls, json: str) -> InterestGroupAuctionFetchType:
return cls(json)
-class SharedStorageAccessType(enum.Enum):
- '''
- Enum of shared storage access types.
- '''
- DOCUMENT_ADD_MODULE = "documentAddModule"
- DOCUMENT_SELECT_URL = "documentSelectURL"
- DOCUMENT_RUN = "documentRun"
- DOCUMENT_SET = "documentSet"
- DOCUMENT_APPEND = "documentAppend"
- DOCUMENT_DELETE = "documentDelete"
- DOCUMENT_CLEAR = "documentClear"
- DOCUMENT_GET = "documentGet"
- WORKLET_SET = "workletSet"
- WORKLET_APPEND = "workletAppend"
- WORKLET_DELETE = "workletDelete"
- WORKLET_CLEAR = "workletClear"
- WORKLET_GET = "workletGet"
- WORKLET_KEYS = "workletKeys"
- WORKLET_ENTRIES = "workletEntries"
- WORKLET_LENGTH = "workletLength"
- WORKLET_REMAINING_BUDGET = "workletRemainingBudget"
- HEADER_SET = "headerSet"
- HEADER_APPEND = "headerAppend"
- HEADER_DELETE = "headerDelete"
- HEADER_CLEAR = "headerClear"
+class SharedStorageAccessScope(enum.Enum):
+ '''
+ Enum of shared storage access scopes.
+ '''
+ WINDOW = "window"
+ SHARED_STORAGE_WORKLET = "sharedStorageWorklet"
+ PROTECTED_AUDIENCE_WORKLET = "protectedAudienceWorklet"
+ HEADER = "header"
+
+ def to_json(self) -> str:
+ return self.value
+
+ @classmethod
+ def from_json(cls, json: str) -> SharedStorageAccessScope:
+ return cls(json)
+
+
+class SharedStorageAccessMethod(enum.Enum):
+ '''
+ Enum of shared storage access methods.
+ '''
+ ADD_MODULE = "addModule"
+ CREATE_WORKLET = "createWorklet"
+ SELECT_URL = "selectURL"
+ RUN = "run"
+ BATCH_UPDATE = "batchUpdate"
+ SET_ = "set"
+ APPEND = "append"
+ DELETE = "delete"
+ CLEAR = "clear"
+ GET = "get"
+ KEYS = "keys"
+ VALUES = "values"
+ ENTRIES = "entries"
+ LENGTH = "length"
+ REMAINING_BUDGET = "remainingBudget"
def to_json(self) -> str:
return self.value
@classmethod
- def from_json(cls, json: str) -> SharedStorageAccessType:
+ def from_json(cls, json: str) -> SharedStorageAccessMethod:
return cls(json)
@@ -268,6 +281,45 @@ def from_json(cls, json: T_JSON_DICT) -> SharedStorageMetadata:
)
+@dataclass
+class SharedStoragePrivateAggregationConfig:
+ '''
+ Represents a dictionary object passed in as privateAggregationConfig to
+ run or selectURL.
+ '''
+ #: Configures the maximum size allowed for filtering IDs.
+ filtering_id_max_bytes: int
+
+ #: The chosen aggregation service deployment.
+ aggregation_coordinator_origin: typing.Optional[str] = None
+
+ #: The context ID provided.
+ context_id: typing.Optional[str] = None
+
+ #: The limit on the number of contributions in the final report.
+ max_contributions: typing.Optional[int] = None
+
+ def to_json(self) -> T_JSON_DICT:
+ json: T_JSON_DICT = dict()
+ json['filteringIdMaxBytes'] = self.filtering_id_max_bytes
+ if self.aggregation_coordinator_origin is not None:
+ json['aggregationCoordinatorOrigin'] = self.aggregation_coordinator_origin
+ if self.context_id is not None:
+ json['contextId'] = self.context_id
+ if self.max_contributions is not None:
+ json['maxContributions'] = self.max_contributions
+ return json
+
+ @classmethod
+ def from_json(cls, json: T_JSON_DICT) -> SharedStoragePrivateAggregationConfig:
+ return cls(
+ filtering_id_max_bytes=int(json['filteringIdMaxBytes']),
+ aggregation_coordinator_origin=str(json['aggregationCoordinatorOrigin']) if json.get('aggregationCoordinatorOrigin', None) is not None else None,
+ context_id=str(json['contextId']) if json.get('contextId', None) is not None else None,
+ max_contributions=int(json['maxContributions']) if json.get('maxContributions', None) is not None else None,
+ )
+
+
@dataclass
class SharedStorageReportingMetadata:
'''
@@ -323,79 +375,144 @@ class SharedStorageAccessParams:
presence/absence can vary according to SharedStorageAccessType.
'''
#: Spec of the module script URL.
- #: Present only for SharedStorageAccessType.documentAddModule.
+ #: Present only for SharedStorageAccessMethods: addModule and
+ #: createWorklet.
script_source_url: typing.Optional[str] = None
+ #: String denoting "context-origin", "script-origin", or a custom
+ #: origin to be used as the worklet's data origin.
+ #: Present only for SharedStorageAccessMethod: createWorklet.
+ data_origin: typing.Optional[str] = None
+
#: Name of the registered operation to be run.
- #: Present only for SharedStorageAccessType.documentRun and
- #: SharedStorageAccessType.documentSelectURL.
+ #: Present only for SharedStorageAccessMethods: run and selectURL.
operation_name: typing.Optional[str] = None
+ #: ID of the operation call.
+ #: Present only for SharedStorageAccessMethods: run and selectURL.
+ operation_id: typing.Optional[str] = None
+
+ #: Whether or not to keep the worket alive for future run or selectURL
+ #: calls.
+ #: Present only for SharedStorageAccessMethods: run and selectURL.
+ keep_alive: typing.Optional[bool] = None
+
+ #: Configures the private aggregation options.
+ #: Present only for SharedStorageAccessMethods: run and selectURL.
+ private_aggregation_config: typing.Optional[SharedStoragePrivateAggregationConfig] = None
+
#: The operation's serialized data in bytes (converted to a string).
- #: Present only for SharedStorageAccessType.documentRun and
- #: SharedStorageAccessType.documentSelectURL.
+ #: Present only for SharedStorageAccessMethods: run and selectURL.
+ #: TODO(crbug.com/401011862): Consider updating this parameter to binary.
serialized_data: typing.Optional[str] = None
#: Array of candidate URLs' specs, along with any associated metadata.
- #: Present only for SharedStorageAccessType.documentSelectURL.
+ #: Present only for SharedStorageAccessMethod: selectURL.
urls_with_metadata: typing.Optional[typing.List[SharedStorageUrlWithMetadata]] = None
+ #: Spec of the URN:UUID generated for a selectURL call.
+ #: Present only for SharedStorageAccessMethod: selectURL.
+ urn_uuid: typing.Optional[str] = None
+
#: Key for a specific entry in an origin's shared storage.
- #: Present only for SharedStorageAccessType.documentSet,
- #: SharedStorageAccessType.documentAppend,
- #: SharedStorageAccessType.documentDelete,
- #: SharedStorageAccessType.workletSet,
- #: SharedStorageAccessType.workletAppend,
- #: SharedStorageAccessType.workletDelete,
- #: SharedStorageAccessType.workletGet,
- #: SharedStorageAccessType.headerSet,
- #: SharedStorageAccessType.headerAppend, and
- #: SharedStorageAccessType.headerDelete.
+ #: Present only for SharedStorageAccessMethods: set, append, delete, and
+ #: get.
key: typing.Optional[str] = None
#: Value for a specific entry in an origin's shared storage.
- #: Present only for SharedStorageAccessType.documentSet,
- #: SharedStorageAccessType.documentAppend,
- #: SharedStorageAccessType.workletSet,
- #: SharedStorageAccessType.workletAppend,
- #: SharedStorageAccessType.headerSet, and
- #: SharedStorageAccessType.headerAppend.
+ #: Present only for SharedStorageAccessMethods: set and append.
value: typing.Optional[str] = None
#: Whether or not to set an entry for a key if that key is already present.
- #: Present only for SharedStorageAccessType.documentSet,
- #: SharedStorageAccessType.workletSet, and
- #: SharedStorageAccessType.headerSet.
+ #: Present only for SharedStorageAccessMethod: set.
ignore_if_present: typing.Optional[bool] = None
+ #: A number denoting the (0-based) order of the worklet's
+ #: creation relative to all other shared storage worklets created by
+ #: documents using the current storage partition.
+ #: Present only for SharedStorageAccessMethods: addModule, createWorklet.
+ worklet_ordinal: typing.Optional[int] = None
+
+ #: Hex representation of the DevTools token used as the TargetID for the
+ #: associated shared storage worklet.
+ #: Present only for SharedStorageAccessMethods: addModule, createWorklet,
+ #: run, selectURL, and any other SharedStorageAccessMethod when the
+ #: SharedStorageAccessScope is sharedStorageWorklet.
+ worklet_target_id: typing.Optional[target.TargetID] = None
+
+ #: Name of the lock to be acquired, if present.
+ #: Optionally present only for SharedStorageAccessMethods: batchUpdate,
+ #: set, append, delete, and clear.
+ with_lock: typing.Optional[str] = None
+
+ #: If the method has been called as part of a batchUpdate, then this
+ #: number identifies the batch to which it belongs.
+ #: Optionally present only for SharedStorageAccessMethods:
+ #: batchUpdate (required), set, append, delete, and clear.
+ batch_update_id: typing.Optional[str] = None
+
+ #: Number of modifier methods sent in batch.
+ #: Present only for SharedStorageAccessMethod: batchUpdate.
+ batch_size: typing.Optional[int] = None
+
def to_json(self) -> T_JSON_DICT:
json: T_JSON_DICT = dict()
if self.script_source_url is not None:
json['scriptSourceUrl'] = self.script_source_url
+ if self.data_origin is not None:
+ json['dataOrigin'] = self.data_origin
if self.operation_name is not None:
json['operationName'] = self.operation_name
+ if self.operation_id is not None:
+ json['operationId'] = self.operation_id
+ if self.keep_alive is not None:
+ json['keepAlive'] = self.keep_alive
+ if self.private_aggregation_config is not None:
+ json['privateAggregationConfig'] = self.private_aggregation_config.to_json()
if self.serialized_data is not None:
json['serializedData'] = self.serialized_data
if self.urls_with_metadata is not None:
json['urlsWithMetadata'] = [i.to_json() for i in self.urls_with_metadata]
+ if self.urn_uuid is not None:
+ json['urnUuid'] = self.urn_uuid
if self.key is not None:
json['key'] = self.key
if self.value is not None:
json['value'] = self.value
if self.ignore_if_present is not None:
json['ignoreIfPresent'] = self.ignore_if_present
+ if self.worklet_ordinal is not None:
+ json['workletOrdinal'] = self.worklet_ordinal
+ if self.worklet_target_id is not None:
+ json['workletTargetId'] = self.worklet_target_id.to_json()
+ if self.with_lock is not None:
+ json['withLock'] = self.with_lock
+ if self.batch_update_id is not None:
+ json['batchUpdateId'] = self.batch_update_id
+ if self.batch_size is not None:
+ json['batchSize'] = self.batch_size
return json
@classmethod
def from_json(cls, json: T_JSON_DICT) -> SharedStorageAccessParams:
return cls(
script_source_url=str(json['scriptSourceUrl']) if json.get('scriptSourceUrl', None) is not None else None,
+ data_origin=str(json['dataOrigin']) if json.get('dataOrigin', None) is not None else None,
operation_name=str(json['operationName']) if json.get('operationName', None) is not None else None,
+ operation_id=str(json['operationId']) if json.get('operationId', None) is not None else None,
+ keep_alive=bool(json['keepAlive']) if json.get('keepAlive', None) is not None else None,
+ private_aggregation_config=SharedStoragePrivateAggregationConfig.from_json(json['privateAggregationConfig']) if json.get('privateAggregationConfig', None) is not None else None,
serialized_data=str(json['serializedData']) if json.get('serializedData', None) is not None else None,
urls_with_metadata=[SharedStorageUrlWithMetadata.from_json(i) for i in json['urlsWithMetadata']] if json.get('urlsWithMetadata', None) is not None else None,
+ urn_uuid=str(json['urnUuid']) if json.get('urnUuid', None) is not None else None,
key=str(json['key']) if json.get('key', None) is not None else None,
value=str(json['value']) if json.get('value', None) is not None else None,
ignore_if_present=bool(json['ignoreIfPresent']) if json.get('ignoreIfPresent', None) is not None else None,
+ worklet_ordinal=int(json['workletOrdinal']) if json.get('workletOrdinal', None) is not None else None,
+ worklet_target_id=target.TargetID.from_json(json['workletTargetId']) if json.get('workletTargetId', None) is not None else None,
+ with_lock=str(json['withLock']) if json.get('withLock', None) is not None else None,
+ batch_update_id=str(json['batchUpdateId']) if json.get('batchUpdateId', None) is not None else None,
+ batch_size=int(json['batchSize']) if json.get('batchSize', None) is not None else None,
)
@@ -622,28 +739,6 @@ def from_json(cls, json: T_JSON_DICT) -> AttributionReportingEventReportWindows:
)
-@dataclass
-class AttributionReportingTriggerSpec:
- #: number instead of integer because not all uint32 can be represented by
- #: int
- trigger_data: typing.List[float]
-
- event_report_windows: AttributionReportingEventReportWindows
-
- def to_json(self) -> T_JSON_DICT:
- json: T_JSON_DICT = dict()
- json['triggerData'] = [i for i in self.trigger_data]
- json['eventReportWindows'] = self.event_report_windows.to_json()
- return json
-
- @classmethod
- def from_json(cls, json: T_JSON_DICT) -> AttributionReportingTriggerSpec:
- return cls(
- trigger_data=[float(i) for i in json['triggerData']],
- event_report_windows=AttributionReportingEventReportWindows.from_json(json['eventReportWindows']),
- )
-
-
class AttributionReportingTriggerDataMatching(enum.Enum):
EXACT = "exact"
MODULUS = "modulus"
@@ -740,6 +835,26 @@ def from_json(cls, json: T_JSON_DICT) -> AttributionScopesData:
)
+@dataclass
+class AttributionReportingNamedBudgetDef:
+ name: str
+
+ budget: int
+
+ def to_json(self) -> T_JSON_DICT:
+ json: T_JSON_DICT = dict()
+ json['name'] = self.name
+ json['budget'] = self.budget
+ return json
+
+ @classmethod
+ def from_json(cls, json: T_JSON_DICT) -> AttributionReportingNamedBudgetDef:
+ return cls(
+ name=str(json['name']),
+ budget=int(json['budget']),
+ )
+
+
@dataclass
class AttributionReportingSourceRegistration:
time: network.TimeSinceEpoch
@@ -747,7 +862,11 @@ class AttributionReportingSourceRegistration:
#: duration in seconds
expiry: int
- trigger_specs: typing.List[AttributionReportingTriggerSpec]
+ #: number instead of integer because not all uint32 can be represented by
+ #: int
+ trigger_data: typing.List[float]
+
+ event_report_windows: AttributionReportingEventReportWindows
#: duration in seconds
aggregatable_report_window: int
@@ -776,6 +895,12 @@ class AttributionReportingSourceRegistration:
max_event_level_reports: int
+ named_budgets: typing.List[AttributionReportingNamedBudgetDef]
+
+ debug_reporting: bool
+
+ event_level_epsilon: float
+
debug_key: typing.Optional[UnsignedInt64AsBase10] = None
scopes_data: typing.Optional[AttributionScopesData] = None
@@ -784,7 +909,8 @@ def to_json(self) -> T_JSON_DICT:
json: T_JSON_DICT = dict()
json['time'] = self.time.to_json()
json['expiry'] = self.expiry
- json['triggerSpecs'] = [i.to_json() for i in self.trigger_specs]
+ json['triggerData'] = [i for i in self.trigger_data]
+ json['eventReportWindows'] = self.event_report_windows.to_json()
json['aggregatableReportWindow'] = self.aggregatable_report_window
json['type'] = self.type_.to_json()
json['sourceOrigin'] = self.source_origin
@@ -798,6 +924,9 @@ def to_json(self) -> T_JSON_DICT:
json['destinationLimitPriority'] = self.destination_limit_priority.to_json()
json['aggregatableDebugReportingConfig'] = self.aggregatable_debug_reporting_config.to_json()
json['maxEventLevelReports'] = self.max_event_level_reports
+ json['namedBudgets'] = [i.to_json() for i in self.named_budgets]
+ json['debugReporting'] = self.debug_reporting
+ json['eventLevelEpsilon'] = self.event_level_epsilon
if self.debug_key is not None:
json['debugKey'] = self.debug_key.to_json()
if self.scopes_data is not None:
@@ -809,7 +938,8 @@ def from_json(cls, json: T_JSON_DICT) -> AttributionReportingSourceRegistration:
return cls(
time=network.TimeSinceEpoch.from_json(json['time']),
expiry=int(json['expiry']),
- trigger_specs=[AttributionReportingTriggerSpec.from_json(i) for i in json['triggerSpecs']],
+ trigger_data=[float(i) for i in json['triggerData']],
+ event_report_windows=AttributionReportingEventReportWindows.from_json(json['eventReportWindows']),
aggregatable_report_window=int(json['aggregatableReportWindow']),
type_=AttributionReportingSourceType.from_json(json['type']),
source_origin=str(json['sourceOrigin']),
@@ -823,6 +953,9 @@ def from_json(cls, json: T_JSON_DICT) -> AttributionReportingSourceRegistration:
destination_limit_priority=SignedInt64AsBase10.from_json(json['destinationLimitPriority']),
aggregatable_debug_reporting_config=AttributionReportingAggregatableDebugReportingConfig.from_json(json['aggregatableDebugReportingConfig']),
max_event_level_reports=int(json['maxEventLevelReports']),
+ named_budgets=[AttributionReportingNamedBudgetDef.from_json(i) for i in json['namedBudgets']],
+ debug_reporting=bool(json['debugReporting']),
+ event_level_epsilon=float(json['eventLevelEpsilon']),
debug_key=UnsignedInt64AsBase10.from_json(json['debugKey']) if json.get('debugKey', None) is not None else None,
scopes_data=AttributionScopesData.from_json(json['scopesData']) if json.get('scopesData', None) is not None else None,
)
@@ -986,6 +1119,27 @@ def from_json(cls, json: T_JSON_DICT) -> AttributionReportingAggregatableDedupKe
)
+@dataclass
+class AttributionReportingNamedBudgetCandidate:
+ filters: AttributionReportingFilterPair
+
+ name: typing.Optional[str] = None
+
+ def to_json(self) -> T_JSON_DICT:
+ json: T_JSON_DICT = dict()
+ json['filters'] = self.filters.to_json()
+ if self.name is not None:
+ json['name'] = self.name
+ return json
+
+ @classmethod
+ def from_json(cls, json: T_JSON_DICT) -> AttributionReportingNamedBudgetCandidate:
+ return cls(
+ filters=AttributionReportingFilterPair.from_json(json['filters']),
+ name=str(json['name']) if json.get('name', None) is not None else None,
+ )
+
+
@dataclass
class AttributionReportingTriggerRegistration:
filters: AttributionReportingFilterPair
@@ -1008,6 +1162,8 @@ class AttributionReportingTriggerRegistration:
scopes: typing.List[str]
+ named_budgets: typing.List[AttributionReportingNamedBudgetCandidate]
+
debug_key: typing.Optional[UnsignedInt64AsBase10] = None
aggregation_coordinator_origin: typing.Optional[str] = None
@@ -1026,6 +1182,7 @@ def to_json(self) -> T_JSON_DICT:
json['sourceRegistrationTimeConfig'] = self.source_registration_time_config.to_json()
json['aggregatableDebugReportingConfig'] = self.aggregatable_debug_reporting_config.to_json()
json['scopes'] = [i for i in self.scopes]
+ json['namedBudgets'] = [i.to_json() for i in self.named_budgets]
if self.debug_key is not None:
json['debugKey'] = self.debug_key.to_json()
if self.aggregation_coordinator_origin is not None:
@@ -1047,6 +1204,7 @@ def from_json(cls, json: T_JSON_DICT) -> AttributionReportingTriggerRegistration
source_registration_time_config=AttributionReportingSourceRegistrationTimeConfig.from_json(json['sourceRegistrationTimeConfig']),
aggregatable_debug_reporting_config=AttributionReportingAggregatableDebugReportingConfig.from_json(json['aggregatableDebugReportingConfig']),
scopes=[str(i) for i in json['scopes']],
+ named_budgets=[AttributionReportingNamedBudgetCandidate.from_json(i) for i in json['namedBudgets']],
debug_key=UnsignedInt64AsBase10.from_json(json['debugKey']) if json.get('debugKey', None) is not None else None,
aggregation_coordinator_origin=str(json['aggregationCoordinatorOrigin']) if json.get('aggregationCoordinatorOrigin', None) is not None else None,
trigger_context_id=str(json['triggerContextId']) if json.get('triggerContextId', None) is not None else None,
@@ -1107,6 +1265,20 @@ def from_json(cls, json: str) -> AttributionReportingAggregatableResult:
return cls(json)
+class AttributionReportingReportResult(enum.Enum):
+ SENT = "sent"
+ PROHIBITED = "prohibited"
+ FAILED_TO_ASSEMBLE = "failedToAssemble"
+ EXPIRED = "expired"
+
+ def to_json(self) -> str:
+ return self.value
+
+ @classmethod
+ def from_json(cls, json: str) -> AttributionReportingReportResult:
+ return cls(json)
+
+
@dataclass
class RelatedWebsiteSet:
'''
@@ -1137,11 +1309,15 @@ def from_json(cls, json: T_JSON_DICT) -> RelatedWebsiteSet:
)
+@deprecated(version="1.3")
def get_storage_key_for_frame(
frame_id: page.FrameId
) -> typing.Generator[T_JSON_DICT,T_JSON_DICT,SerializedStorageKey]:
'''
Returns a storage key given a frame id.
+ Deprecated. Please use Storage.getStorageKey instead.
+
+ .. deprecated:: 1.3
:param frame_id:
:returns:
@@ -1156,6 +1332,29 @@ def get_storage_key_for_frame(
return SerializedStorageKey.from_json(json['storageKey'])
+def get_storage_key(
+ frame_id: typing.Optional[page.FrameId] = None
+ ) -> typing.Generator[T_JSON_DICT,T_JSON_DICT,SerializedStorageKey]:
+ '''
+ Returns storage key for the given frame. If no frame ID is provided,
+ the storage key of the target executing this command is returned.
+
+ **EXPERIMENTAL**
+
+ :param frame_id: *(Optional)*
+ :returns:
+ '''
+ params: T_JSON_DICT = dict()
+ if frame_id is not None:
+ params['frameId'] = frame_id.to_json()
+ cmd_dict: T_JSON_DICT = {
+ 'method': 'Storage.getStorageKey',
+ 'params': params,
+ }
+ json = yield cmd_dict
+ return SerializedStorageKey.from_json(json['storageKey'])
+
+
def clear_data_for_origin(
origin: str,
storage_types: str
@@ -1846,6 +2045,27 @@ def get_affected_urls_for_third_party_cookie_metadata(
return [str(i) for i in json['matchedUrls']]
+def set_protected_audience_k_anonymity(
+ owner: str,
+ name: str,
+ hashes: typing.List[str]
+ ) -> typing.Generator[T_JSON_DICT,T_JSON_DICT,None]:
+ '''
+ :param owner:
+ :param name:
+ :param hashes:
+ '''
+ params: T_JSON_DICT = dict()
+ params['owner'] = owner
+ params['name'] = name
+ params['hashes'] = [i for i in hashes]
+ cmd_dict: T_JSON_DICT = {
+ 'method': 'Storage.setProtectedAudienceKAnonymity',
+ 'params': params,
+ }
+ json = yield cmd_dict
+
+
@event_class('Storage.cacheStorageContentUpdated')
@dataclass
class CacheStorageContentUpdated:
@@ -2037,12 +2257,16 @@ class SharedStorageAccessed:
'''
#: Time of the access.
access_time: network.TimeSinceEpoch
+ #: Enum value indicating the access scope.
+ scope: SharedStorageAccessScope
#: Enum value indicating the Shared Storage API method invoked.
- type_: SharedStorageAccessType
+ method: SharedStorageAccessMethod
#: DevTools Frame Token for the primary frame tree's root.
main_frame_id: page.FrameId
- #: Serialized origin for the context that invoked the Shared Storage API.
+ #: Serialization of the origin owning the Shared Storage data.
owner_origin: str
+ #: Serialization of the site owning the Shared Storage data.
+ owner_site: str
#: The sub-parameters wrapped by ``params`` are all optional and their
#: presence/absence depends on ``type``.
params: SharedStorageAccessParams
@@ -2051,13 +2275,52 @@ class SharedStorageAccessed:
def from_json(cls, json: T_JSON_DICT) -> SharedStorageAccessed:
return cls(
access_time=network.TimeSinceEpoch.from_json(json['accessTime']),
- type_=SharedStorageAccessType.from_json(json['type']),
+ scope=SharedStorageAccessScope.from_json(json['scope']),
+ method=SharedStorageAccessMethod.from_json(json['method']),
main_frame_id=page.FrameId.from_json(json['mainFrameId']),
owner_origin=str(json['ownerOrigin']),
+ owner_site=str(json['ownerSite']),
params=SharedStorageAccessParams.from_json(json['params'])
)
+@event_class('Storage.sharedStorageWorkletOperationExecutionFinished')
+@dataclass
+class SharedStorageWorkletOperationExecutionFinished:
+ '''
+ A shared storage run or selectURL operation finished its execution.
+ The following parameters are included in all events.
+ '''
+ #: Time that the operation finished.
+ finished_time: network.TimeSinceEpoch
+ #: Time, in microseconds, from start of shared storage JS API call until
+ #: end of operation execution in the worklet.
+ execution_time: int
+ #: Enum value indicating the Shared Storage API method invoked.
+ method: SharedStorageAccessMethod
+ #: ID of the operation call.
+ operation_id: str
+ #: Hex representation of the DevTools token used as the TargetID for the
+ #: associated shared storage worklet.
+ worklet_target_id: target.TargetID
+ #: DevTools Frame Token for the primary frame tree's root.
+ main_frame_id: page.FrameId
+ #: Serialization of the origin owning the Shared Storage data.
+ owner_origin: str
+
+ @classmethod
+ def from_json(cls, json: T_JSON_DICT) -> SharedStorageWorkletOperationExecutionFinished:
+ return cls(
+ finished_time=network.TimeSinceEpoch.from_json(json['finishedTime']),
+ execution_time=int(json['executionTime']),
+ method=SharedStorageAccessMethod.from_json(json['method']),
+ operation_id=str(json['operationId']),
+ worklet_target_id=target.TargetID.from_json(json['workletTargetId']),
+ main_frame_id=page.FrameId.from_json(json['mainFrameId']),
+ owner_origin=str(json['ownerOrigin'])
+ )
+
+
@event_class('Storage.storageBucketCreatedOrUpdated')
@dataclass
class StorageBucketCreatedOrUpdated:
@@ -2120,3 +2383,56 @@ def from_json(cls, json: T_JSON_DICT) -> AttributionReportingTriggerRegistered:
event_level=AttributionReportingEventLevelResult.from_json(json['eventLevel']),
aggregatable=AttributionReportingAggregatableResult.from_json(json['aggregatable'])
)
+
+
+@event_class('Storage.attributionReportingReportSent')
+@dataclass
+class AttributionReportingReportSent:
+ '''
+ **EXPERIMENTAL**
+
+
+ '''
+ url: str
+ body: dict
+ result: AttributionReportingReportResult
+ #: If result is ``sent``, populated with net/HTTP status.
+ net_error: typing.Optional[int]
+ net_error_name: typing.Optional[str]
+ http_status_code: typing.Optional[int]
+
+ @classmethod
+ def from_json(cls, json: T_JSON_DICT) -> AttributionReportingReportSent:
+ return cls(
+ url=str(json['url']),
+ body=dict(json['body']),
+ result=AttributionReportingReportResult.from_json(json['result']),
+ net_error=int(json['netError']) if json.get('netError', None) is not None else None,
+ net_error_name=str(json['netErrorName']) if json.get('netErrorName', None) is not None else None,
+ http_status_code=int(json['httpStatusCode']) if json.get('httpStatusCode', None) is not None else None
+ )
+
+
+@event_class('Storage.attributionReportingVerboseDebugReportSent')
+@dataclass
+class AttributionReportingVerboseDebugReportSent:
+ '''
+ **EXPERIMENTAL**
+
+
+ '''
+ url: str
+ body: typing.Optional[typing.List[dict]]
+ net_error: typing.Optional[int]
+ net_error_name: typing.Optional[str]
+ http_status_code: typing.Optional[int]
+
+ @classmethod
+ def from_json(cls, json: T_JSON_DICT) -> AttributionReportingVerboseDebugReportSent:
+ return cls(
+ url=str(json['url']),
+ body=[dict(i) for i in json['body']] if json.get('body', None) is not None else None,
+ net_error=int(json['netError']) if json.get('netError', None) is not None else None,
+ net_error_name=str(json['netErrorName']) if json.get('netErrorName', None) is not None else None,
+ http_status_code=int(json['httpStatusCode']) if json.get('httpStatusCode', None) is not None else None
+ )
diff --git a/pycdp/cdp/system_info.py b/pycdp/cdp/system_info.py
index 45fffd2..b2cddef 100644
--- a/pycdp/cdp/system_info.py
+++ b/pycdp/cdp/system_info.py
@@ -194,42 +194,6 @@ def from_json(cls, json: str) -> ImageType:
return cls(json)
-@dataclass
-class ImageDecodeAcceleratorCapability:
- '''
- Describes a supported image decoding profile with its associated minimum and
- maximum resolutions and subsampling.
- '''
- #: Image coded, e.g. Jpeg.
- image_type: ImageType
-
- #: Maximum supported dimensions of the image in pixels.
- max_dimensions: Size
-
- #: Minimum supported dimensions of the image in pixels.
- min_dimensions: Size
-
- #: Optional array of supported subsampling formats, e.g. 4:2:0, if known.
- subsamplings: typing.List[SubsamplingFormat]
-
- def to_json(self) -> T_JSON_DICT:
- json: T_JSON_DICT = dict()
- json['imageType'] = self.image_type.to_json()
- json['maxDimensions'] = self.max_dimensions.to_json()
- json['minDimensions'] = self.min_dimensions.to_json()
- json['subsamplings'] = [i.to_json() for i in self.subsamplings]
- return json
-
- @classmethod
- def from_json(cls, json: T_JSON_DICT) -> ImageDecodeAcceleratorCapability:
- return cls(
- image_type=ImageType.from_json(json['imageType']),
- max_dimensions=Size.from_json(json['maxDimensions']),
- min_dimensions=Size.from_json(json['minDimensions']),
- subsamplings=[SubsamplingFormat.from_json(i) for i in json['subsamplings']],
- )
-
-
@dataclass
class GPUInfo:
'''
@@ -247,9 +211,6 @@ class GPUInfo:
#: Supported accelerated video encoding capabilities.
video_encoding: typing.List[VideoEncodeAcceleratorCapability]
- #: Supported accelerated image decoding capabilities.
- image_decoding: typing.List[ImageDecodeAcceleratorCapability]
-
#: An optional dictionary of additional GPU related attributes.
aux_attributes: typing.Optional[dict] = None
@@ -262,7 +223,6 @@ def to_json(self) -> T_JSON_DICT:
json['driverBugWorkarounds'] = [i for i in self.driver_bug_workarounds]
json['videoDecoding'] = [i.to_json() for i in self.video_decoding]
json['videoEncoding'] = [i.to_json() for i in self.video_encoding]
- json['imageDecoding'] = [i.to_json() for i in self.image_decoding]
if self.aux_attributes is not None:
json['auxAttributes'] = self.aux_attributes
if self.feature_status is not None:
@@ -276,7 +236,6 @@ def from_json(cls, json: T_JSON_DICT) -> GPUInfo:
driver_bug_workarounds=[str(i) for i in json['driverBugWorkarounds']],
video_decoding=[VideoDecodeAcceleratorCapability.from_json(i) for i in json['videoDecoding']],
video_encoding=[VideoEncodeAcceleratorCapability.from_json(i) for i in json['videoEncoding']],
- image_decoding=[ImageDecodeAcceleratorCapability.from_json(i) for i in json['imageDecoding']],
aux_attributes=dict(json['auxAttributes']) if json.get('auxAttributes', None) is not None else None,
feature_status=dict(json['featureStatus']) if json.get('featureStatus', None) is not None else None,
)
diff --git a/pycdp/cdp/target.py b/pycdp/cdp/target.py
index e0deed0..23479e6 100644
--- a/pycdp/cdp/target.py
+++ b/pycdp/cdp/target.py
@@ -66,6 +66,9 @@ class TargetInfo:
#: Frame id of originating window (is only set if target has an opener).
opener_frame_id: typing.Optional[page.FrameId] = None
+ #: Id of the parent frame, only present for the "iframe" targets.
+ parent_frame_id: typing.Optional[page.FrameId] = None
+
browser_context_id: typing.Optional[browser.BrowserContextID] = None
#: Provides additional details for specific target types. For example, for
@@ -84,6 +87,8 @@ def to_json(self) -> T_JSON_DICT:
json['openerId'] = self.opener_id.to_json()
if self.opener_frame_id is not None:
json['openerFrameId'] = self.opener_frame_id.to_json()
+ if self.parent_frame_id is not None:
+ json['parentFrameId'] = self.parent_frame_id.to_json()
if self.browser_context_id is not None:
json['browserContextId'] = self.browser_context_id.to_json()
if self.subtype is not None:
@@ -101,6 +106,7 @@ def from_json(cls, json: T_JSON_DICT) -> TargetInfo:
can_access_opener=bool(json['canAccessOpener']),
opener_id=TargetID.from_json(json['openerId']) if json.get('openerId', None) is not None else None,
opener_frame_id=page.FrameId.from_json(json['openerFrameId']) if json.get('openerFrameId', None) is not None else None,
+ parent_frame_id=page.FrameId.from_json(json['parentFrameId']) if json.get('parentFrameId', None) is not None else None,
browser_context_id=browser.BrowserContextID.from_json(json['browserContextId']) if json.get('browserContextId', None) is not None else None,
subtype=str(json['subtype']) if json.get('subtype', None) is not None else None,
)
@@ -331,17 +337,23 @@ def create_browser_context(
return browser.BrowserContextID.from_json(json['browserContextId'])
-def get_browser_contexts() -> typing.Generator[T_JSON_DICT,T_JSON_DICT,typing.List[browser.BrowserContextID]]:
+def get_browser_contexts() -> typing.Generator[T_JSON_DICT,T_JSON_DICT,typing.Tuple[typing.List[browser.BrowserContextID], typing.Optional[browser.BrowserContextID]]]:
'''
Returns all browser contexts created with ``Target.createBrowserContext`` method.
- :returns: An array of browser context ids.
+ :returns: A tuple with the following items:
+
+ 0. **browserContextIds** - An array of browser context ids.
+ 1. **defaultBrowserContextId** - *(Optional)* The id of the default browser context if available.
'''
cmd_dict: T_JSON_DICT = {
'method': 'Target.getBrowserContexts',
}
json = yield cmd_dict
- return [browser.BrowserContextID.from_json(i) for i in json['browserContextIds']]
+ return (
+ [browser.BrowserContextID.from_json(i) for i in json['browserContextIds']],
+ browser.BrowserContextID.from_json(json['defaultBrowserContextId']) if json.get('defaultBrowserContextId', None) is not None else None
+ )
def create_target(
@@ -355,7 +367,9 @@ def create_target(
enable_begin_frame_control: typing.Optional[bool] = None,
new_window: typing.Optional[bool] = None,
background: typing.Optional[bool] = None,
- for_tab: typing.Optional[bool] = None
+ for_tab: typing.Optional[bool] = None,
+ hidden: typing.Optional[bool] = None,
+ focus: typing.Optional[bool] = None
) -> typing.Generator[T_JSON_DICT,T_JSON_DICT,TargetID]:
'''
Creates a new page.
@@ -371,6 +385,8 @@ def create_target(
:param new_window: *(Optional)* Whether to create a new Window or Tab (false by default, not supported by headless shell).
:param background: *(Optional)* Whether to create the target in background or foreground (false by default, not supported by headless shell).
:param for_tab: **(EXPERIMENTAL)** *(Optional)* Whether to create the target of type "tab".
+ :param hidden: **(EXPERIMENTAL)** *(Optional)* Whether to create a hidden target. The hidden target is observable via protocol, but not present in the tab UI strip. Cannot be created with ```forTab: true````, ````newWindow: true```` or ````background: false```. The life-time of the tab is limited to the life-time of the session.
+ :param focus: **(EXPERIMENTAL)** *(Optional)* If specified, the option is used to determine if the new target should be focused or not. By default, the focus behavior depends on the value of the background field. For example, background=false and focus=false will result in the target tab being opened but the browser window remain unchanged (if it was in the background, it will remain in the background) and background=false with focus=undefined will result in the window being focused. Using background: true and focus: true is not supported and will result in an error.
:returns: The id of the page opened.
'''
params: T_JSON_DICT = dict()
@@ -395,6 +411,10 @@ def create_target(
params['background'] = background
if for_tab is not None:
params['forTab'] = for_tab
+ if hidden is not None:
+ params['hidden'] = hidden
+ if focus is not None:
+ params['focus'] = focus
cmd_dict: T_JSON_DICT = {
'method': 'Target.createTarget',
'params': params,
@@ -522,11 +542,14 @@ def set_auto_attach(
filter_: typing.Optional[TargetFilter] = None
) -> typing.Generator[T_JSON_DICT,T_JSON_DICT,None]:
'''
- Controls whether to automatically attach to new targets which are considered to be related to
- this one. When turned on, attaches to all existing related targets as well. When turned off,
+ Controls whether to automatically attach to new targets which are considered
+ to be directly related to this one (for example, iframes or workers).
+ When turned on, attaches to all existing related targets as well. When turned off,
automatically detaches from all currently attached targets.
This also clears all targets added by ``autoAttachRelated`` from the list of targets to watch
for creation of related targets.
+ You might want to call this recursively for auto-attached targets to attach
+ to all available targets.
:param auto_attach: Whether to auto-attach to related targets.
:param wait_for_debugger_on_start: Whether to pause new targets when attaching to them. Use ```Runtime.runIfWaitingForDebugger``` to run paused targets.
@@ -619,6 +642,53 @@ def set_remote_locations(
json = yield cmd_dict
+def get_dev_tools_target(
+ target_id: TargetID
+ ) -> typing.Generator[T_JSON_DICT,T_JSON_DICT,typing.Optional[TargetID]]:
+ '''
+ Gets the targetId of the DevTools page target opened for the given target
+ (if any).
+
+ **EXPERIMENTAL**
+
+ :param target_id: Page or tab target ID.
+ :returns: *(Optional)* The targetId of DevTools page target if exists.
+ '''
+ params: T_JSON_DICT = dict()
+ params['targetId'] = target_id.to_json()
+ cmd_dict: T_JSON_DICT = {
+ 'method': 'Target.getDevToolsTarget',
+ 'params': params,
+ }
+ json = yield cmd_dict
+ return TargetID.from_json(json['targetId']) if json.get('targetId', None) is not None else None
+
+
+def open_dev_tools(
+ target_id: TargetID,
+ panel_id: typing.Optional[str] = None
+ ) -> typing.Generator[T_JSON_DICT,T_JSON_DICT,TargetID]:
+ '''
+ Opens a DevTools window for the target.
+
+ **EXPERIMENTAL**
+
+ :param target_id: This can be the page or tab target ID.
+ :param panel_id: *(Optional)* The id of the panel we want DevTools to open initially. Currently supported panels are elements, console, network, sources, resources and performance.
+ :returns: The targetId of DevTools page target.
+ '''
+ params: T_JSON_DICT = dict()
+ params['targetId'] = target_id.to_json()
+ if panel_id is not None:
+ params['panelId'] = panel_id
+ cmd_dict: T_JSON_DICT = {
+ 'method': 'Target.openDevTools',
+ 'params': params,
+ }
+ json = yield cmd_dict
+ return TargetID.from_json(json['targetId'])
+
+
@event_class('Target.attachedToTarget')
@dataclass
class AttachedToTarget:
diff --git a/pycdp/cdp/tracing.py b/pycdp/cdp/tracing.py
index 35d5ec5..3612198 100644
--- a/pycdp/cdp/tracing.py
+++ b/pycdp/cdp/tracing.py
@@ -31,7 +31,7 @@ def __repr__(self):
@dataclass
class TraceConfig:
- #: Controls how the trace buffer stores data.
+ #: Controls how the trace buffer stores data. The default is ``recordUntilFull``.
record_mode: typing.Optional[str] = None
#: Size of the trace buffer in kilobytes. If not specified or zero is passed, a default value
@@ -190,6 +190,21 @@ def get_categories() -> typing.Generator[T_JSON_DICT,T_JSON_DICT,typing.List[str
return [str(i) for i in json['categories']]
+def get_track_event_descriptor() -> typing.Generator[T_JSON_DICT,T_JSON_DICT,str]:
+ '''
+ Return a descriptor for all available tracing categories.
+
+ **EXPERIMENTAL**
+
+ :returns: Base64-encoded serialized perfetto.protos.TrackEventDescriptor protobuf message. (Encoded as a base64 string when passed over JSON)
+ '''
+ cmd_dict: T_JSON_DICT = {
+ 'method': 'Tracing.getTrackEventDescriptor',
+ }
+ json = yield cmd_dict
+ return str(json['descriptor'])
+
+
def record_clock_sync_marker(
sync_id: str
) -> typing.Generator[T_JSON_DICT,T_JSON_DICT,None]:
diff --git a/pycdp/cdp/web_authn.py b/pycdp/cdp/web_authn.py
index ec501b9..1fb3d10 100644
--- a/pycdp/cdp/web_authn.py
+++ b/pycdp/cdp/web_authn.py
@@ -39,6 +39,7 @@ def from_json(cls, json: str) -> AuthenticatorProtocol:
class Ctap2Version(enum.Enum):
CTAP2_0 = "ctap2_0"
CTAP2_1 = "ctap2_1"
+ CTAP2_2 = "ctap2_2"
def to_json(self) -> str:
return self.value
@@ -98,6 +99,16 @@ class VirtualAuthenticatorOptions:
#: Defaults to false.
has_prf: typing.Optional[bool] = None
+ #: If set to true, the authenticator will support the hmac-secret extension.
+ #: https://fidoalliance.org/specs/fido-v2.1-ps-20210615/fido-client-to-authenticator-protocol-v2.1-ps-20210615.html#sctn-hmac-secret-extension
+ #: Defaults to false.
+ has_hmac_secret: typing.Optional[bool] = None
+
+ #: If set to true, the authenticator will support the hmac-secret-mc extension.
+ #: https://fidoalliance.org/specs/fido-v2.2-rd-20241003/fido-client-to-authenticator-protocol-v2.2-rd-20241003.html#sctn-hmac-secret-make-cred-extension
+ #: Defaults to false.
+ has_hmac_secret_mc: typing.Optional[bool] = None
+
#: If set to true, tests of user presence will succeed immediately.
#: Otherwise, they will not be resolved. Defaults to true.
automatic_presence_simulation: typing.Optional[bool] = None
@@ -134,6 +145,10 @@ def to_json(self) -> T_JSON_DICT:
json['hasMinPinLength'] = self.has_min_pin_length
if self.has_prf is not None:
json['hasPrf'] = self.has_prf
+ if self.has_hmac_secret is not None:
+ json['hasHmacSecret'] = self.has_hmac_secret
+ if self.has_hmac_secret_mc is not None:
+ json['hasHmacSecretMc'] = self.has_hmac_secret_mc
if self.automatic_presence_simulation is not None:
json['automaticPresenceSimulation'] = self.automatic_presence_simulation
if self.is_user_verified is not None:
@@ -156,6 +171,8 @@ def from_json(cls, json: T_JSON_DICT) -> VirtualAuthenticatorOptions:
has_cred_blob=bool(json['hasCredBlob']) if json.get('hasCredBlob', None) is not None else None,
has_min_pin_length=bool(json['hasMinPinLength']) if json.get('hasMinPinLength', None) is not None else None,
has_prf=bool(json['hasPrf']) if json.get('hasPrf', None) is not None else None,
+ has_hmac_secret=bool(json['hasHmacSecret']) if json.get('hasHmacSecret', None) is not None else None,
+ has_hmac_secret_mc=bool(json['hasHmacSecretMc']) if json.get('hasHmacSecretMc', None) is not None else None,
automatic_presence_simulation=bool(json['automaticPresenceSimulation']) if json.get('automaticPresenceSimulation', None) is not None else None,
is_user_verified=bool(json['isUserVerified']) if json.get('isUserVerified', None) is not None else None,
default_backup_eligibility=bool(json['defaultBackupEligibility']) if json.get('defaultBackupEligibility', None) is not None else None,
diff --git a/pycdp/cdp/web_mcp.py b/pycdp/cdp/web_mcp.py
new file mode 100644
index 0000000..dc08b7b
--- /dev/null
+++ b/pycdp/cdp/web_mcp.py
@@ -0,0 +1,140 @@
+# DO NOT EDIT THIS FILE!
+#
+# This file is generated from the CDP specification. If you need to make
+# changes, edit the generator and regenerate all of the modules.
+#
+# CDP domain: WebMCP (experimental)
+
+from __future__ import annotations
+import enum
+import typing
+from dataclasses import dataclass
+from .util import event_class, T_JSON_DICT
+
+from . import dom
+from . import page
+from . import runtime
+
+
+@dataclass
+class Annotation:
+ '''
+ Tool annotations
+ '''
+ #: A hint indicating that the tool does not modify any state.
+ read_only: typing.Optional[bool] = None
+
+ #: If the declarative tool was declared with the autosubmit attribute.
+ autosubmit: typing.Optional[bool] = None
+
+ def to_json(self) -> T_JSON_DICT:
+ json: T_JSON_DICT = dict()
+ if self.read_only is not None:
+ json['readOnly'] = self.read_only
+ if self.autosubmit is not None:
+ json['autosubmit'] = self.autosubmit
+ return json
+
+ @classmethod
+ def from_json(cls, json: T_JSON_DICT) -> Annotation:
+ return cls(
+ read_only=bool(json['readOnly']) if json.get('readOnly', None) is not None else None,
+ autosubmit=bool(json['autosubmit']) if json.get('autosubmit', None) is not None else None,
+ )
+
+
+@dataclass
+class Tool:
+ '''
+ Definition of a tool that can be invoked.
+ '''
+ #: Tool name.
+ name: str
+
+ #: Tool description.
+ description: str
+
+ #: Frame identifier associated with the tool registration.
+ frame_id: page.FrameId
+
+ #: Schema for the tool's input parameters.
+ input_schema: typing.Optional[dict] = None
+
+ #: Optional annotations for the tool.
+ annotations: typing.Optional[Annotation] = None
+
+ #: Optional node ID for declarative tools.
+ backend_node_id: typing.Optional[dom.BackendNodeId] = None
+
+ #: The stack trace at the time of the registration.
+ stack_trace: typing.Optional[runtime.StackTrace] = None
+
+ def to_json(self) -> T_JSON_DICT:
+ json: T_JSON_DICT = dict()
+ json['name'] = self.name
+ json['description'] = self.description
+ json['frameId'] = self.frame_id.to_json()
+ if self.input_schema is not None:
+ json['inputSchema'] = self.input_schema
+ if self.annotations is not None:
+ json['annotations'] = self.annotations.to_json()
+ if self.backend_node_id is not None:
+ json['backendNodeId'] = self.backend_node_id.to_json()
+ if self.stack_trace is not None:
+ json['stackTrace'] = self.stack_trace.to_json()
+ return json
+
+ @classmethod
+ def from_json(cls, json: T_JSON_DICT) -> Tool:
+ return cls(
+ name=str(json['name']),
+ description=str(json['description']),
+ frame_id=page.FrameId.from_json(json['frameId']),
+ input_schema=dict(json['inputSchema']) if json.get('inputSchema', None) is not None else None,
+ annotations=Annotation.from_json(json['annotations']) if json.get('annotations', None) is not None else None,
+ backend_node_id=dom.BackendNodeId.from_json(json['backendNodeId']) if json.get('backendNodeId', None) is not None else None,
+ stack_trace=runtime.StackTrace.from_json(json['stackTrace']) if json.get('stackTrace', None) is not None else None,
+ )
+
+
+def enable() -> typing.Generator[T_JSON_DICT,T_JSON_DICT,None]:
+ '''
+ Enables the WebMCP domain, allowing events to be sent. Enabling the domain will trigger a toolsAdded event for
+ all currently registered tools.
+ '''
+ cmd_dict: T_JSON_DICT = {
+ 'method': 'WebMCP.enable',
+ }
+ json = yield cmd_dict
+
+
+@event_class('WebMCP.toolsAdded')
+@dataclass
+class ToolsAdded:
+ '''
+ Event fired when new tools are added.
+ '''
+ #: Array of tools that were added.
+ tools: typing.List[Tool]
+
+ @classmethod
+ def from_json(cls, json: T_JSON_DICT) -> ToolsAdded:
+ return cls(
+ tools=[Tool.from_json(i) for i in json['tools']]
+ )
+
+
+@event_class('WebMCP.toolsRemoved')
+@dataclass
+class ToolsRemoved:
+ '''
+ Event fired when tools are removed.
+ '''
+ #: Array of tools that were removed.
+ tools: typing.List[Tool]
+
+ @classmethod
+ def from_json(cls, json: T_JSON_DICT) -> ToolsRemoved:
+ return cls(
+ tools=[Tool.from_json(i) for i in json['tools']]
+ )
diff --git a/pycdp/gen/browser_protocol.json b/pycdp/gen/browser_protocol.json
index e16ad85..2d275fb 100644
--- a/pycdp/gen/browser_protocol.json
+++ b/pycdp/gen/browser_protocol.json
@@ -207,7 +207,7 @@
},
{
"id": "AXPropertyName",
- "description": "Values of AXProperty name:\n- from 'busy' to 'roledescription': states which apply to every AX node\n- from 'live' to 'root': attributes which apply to nodes in live regions\n- from 'autocomplete' to 'valuetext': attributes which apply to widgets\n- from 'checked' to 'selected': states which apply to widgets\n- from 'activedescendant' to 'owns' - relationships between elements other than parent/child/sibling.",
+ "description": "Values of AXProperty name:\n- from 'busy' to 'roledescription': states which apply to every AX node\n- from 'live' to 'root': attributes which apply to nodes in live regions\n- from 'autocomplete' to 'valuetext': attributes which apply to widgets\n- from 'checked' to 'selected': states which apply to widgets\n- from 'activedescendant' to 'owns': relationships between elements other than parent/child/sibling\n- from 'activeFullscreenElement' to 'uninteresting': reasons why this noode is hidden",
"type": "string",
"enum": [
"actions",
@@ -250,7 +250,24 @@
"flowto",
"labelledby",
"owns",
- "url"
+ "url",
+ "activeFullscreenElement",
+ "activeModalDialog",
+ "activeAriaModalDialog",
+ "ariaHiddenElement",
+ "ariaHiddenSubtree",
+ "emptyAlt",
+ "emptyText",
+ "inertElement",
+ "inertSubtree",
+ "labelContainer",
+ "labelFor",
+ "notRendered",
+ "notVisible",
+ "presentationalRole",
+ "probablyPresentational",
+ "inactiveCarouselTabContent",
+ "uninteresting"
]
},
{
@@ -717,7 +734,8 @@
},
{
"name": "iterations",
- "description": "`AnimationEffect`'s iterations.",
+ "description": "`AnimationEffect`'s iterations. Omitted if the value is infinite.",
+ "optional": true,
"type": "number"
},
{
@@ -986,7 +1004,8 @@
"description": "Audits domain allows investigation of page violations and possible improvements.",
"experimental": true,
"dependencies": [
- "Network"
+ "Network",
+ "Runtime"
],
"types": [
{
@@ -1045,8 +1064,6 @@
"ExcludeSameSiteNoneInsecure",
"ExcludeSameSiteLax",
"ExcludeSameSiteStrict",
- "ExcludeInvalidSameParty",
- "ExcludeSamePartyCrossPartyContext",
"ExcludeDomainNonASCII",
"ExcludeThirdPartyCookieBlockedInFirstPartySet",
"ExcludeThirdPartyPhaseout",
@@ -1167,6 +1184,29 @@
}
]
},
+ {
+ "id": "PerformanceIssueType",
+ "type": "string",
+ "enum": [
+ "DocumentCookie"
+ ]
+ },
+ {
+ "id": "PerformanceIssueDetails",
+ "description": "Details for a performance issue.",
+ "type": "object",
+ "properties": [
+ {
+ "name": "performanceIssueType",
+ "$ref": "PerformanceIssueType"
+ },
+ {
+ "name": "sourceCodeLocation",
+ "optional": true,
+ "$ref": "SourceCodeLocation"
+ }
+ ]
+ },
{
"id": "MixedContentResolutionStatus",
"type": "string",
@@ -1431,40 +1471,6 @@
}
]
},
- {
- "id": "LowTextContrastIssueDetails",
- "type": "object",
- "properties": [
- {
- "name": "violatingNodeId",
- "$ref": "DOM.BackendNodeId"
- },
- {
- "name": "violatingNodeSelector",
- "type": "string"
- },
- {
- "name": "contrastRatio",
- "type": "number"
- },
- {
- "name": "thresholdAA",
- "type": "number"
- },
- {
- "name": "thresholdAAA",
- "type": "number"
- },
- {
- "name": "fontSize",
- "type": "string"
- },
- {
- "name": "fontWeight",
- "type": "string"
- }
- ]
- },
{
"id": "CorsIssueDetails",
"description": "Details for a CORS related issue, e.g. a warning or error related to\nCORS RFC1918 enforcement.",
@@ -1546,8 +1552,10 @@
"WriteErrorInsufficientResources",
"WriteErrorInvalidMatchField",
"WriteErrorInvalidStructuredHeader",
+ "WriteErrorInvalidTTLField",
"WriteErrorNavigationRequest",
"WriteErrorNoMatchField",
+ "WriteErrorNonIntegerTTLField",
"WriteErrorNonListMatchDestField",
"WriteErrorNonSecureContext",
"WriteErrorNonStringIdField",
@@ -1583,7 +1591,30 @@
"SignatureInputHeaderMissingRequiredParameters",
"ValidationFailedSignatureExpired",
"ValidationFailedInvalidLength",
- "ValidationFailedSignatureMismatch"
+ "ValidationFailedSignatureMismatch",
+ "ValidationFailedIntegrityMismatch"
+ ]
+ },
+ {
+ "id": "UnencodedDigestError",
+ "type": "string",
+ "enum": [
+ "MalformedDictionary",
+ "UnknownAlgorithm",
+ "IncorrectDigestType",
+ "IncorrectDigestLength"
+ ]
+ },
+ {
+ "id": "ConnectionAllowlistError",
+ "type": "string",
+ "enum": [
+ "InvalidHeader",
+ "MoreThanOneList",
+ "ItemNotInnerList",
+ "InvalidAllowlistItemType",
+ "ReportingEndpointNotToken",
+ "InvalidUrlPattern"
]
},
{
@@ -1678,6 +1709,45 @@
"name": "error",
"$ref": "SRIMessageSignatureError"
},
+ {
+ "name": "signatureBase",
+ "type": "string"
+ },
+ {
+ "name": "integrityAssertions",
+ "type": "array",
+ "items": {
+ "type": "string"
+ }
+ },
+ {
+ "name": "request",
+ "$ref": "AffectedRequest"
+ }
+ ]
+ },
+ {
+ "id": "UnencodedDigestIssueDetails",
+ "type": "object",
+ "properties": [
+ {
+ "name": "error",
+ "$ref": "UnencodedDigestError"
+ },
+ {
+ "name": "request",
+ "$ref": "AffectedRequest"
+ }
+ ]
+ },
+ {
+ "id": "ConnectionAllowlistIssueDetails",
+ "type": "object",
+ "properties": [
+ {
+ "name": "error",
+ "$ref": "ConnectionAllowlistError"
+ },
{
"name": "request",
"$ref": "AffectedRequest"
@@ -1693,12 +1763,17 @@
"FormInputWithNoLabelError",
"FormAutocompleteAttributeEmptyError",
"FormEmptyIdAndNameAttributesForInputError",
- "FormAriaLabelledByToNonExistingId",
+ "FormAriaLabelledByToNonExistingIdError",
"FormInputAssignedAutocompleteValueToIdOrNameAttributeError",
- "FormLabelHasNeitherForNorNestedInput",
+ "FormLabelHasNeitherForNorNestedInputError",
"FormLabelForMatchesNonExistingIdError",
"FormInputHasWrongButWellIntendedAutocompleteValueError",
- "ResponseWasBlockedByORB"
+ "ResponseWasBlockedByORB",
+ "NavigationEntryMarkedSkippable",
+ "AutofillAndManualTextPolicyControlledFeaturesInfo",
+ "AutofillPolicyControlledFeatureInfo",
+ "ManualTextPolicyControlledFeatureInfo",
+ "FormModelContextParameterMissingTitleAndDescription"
]
},
{
@@ -1830,10 +1905,6 @@
"ConfigNoResponse",
"ConfigInvalidResponse",
"ConfigInvalidContentType",
- "ClientMetadataHttpNotFound",
- "ClientMetadataNoResponse",
- "ClientMetadataInvalidResponse",
- "ClientMetadataInvalidContentType",
"IdpNotPotentiallyTrustworthy",
"DisabledInSettings",
"DisabledInFlags",
@@ -1855,15 +1926,14 @@
"Canceled",
"RpPageNotVisible",
"SilentMediationFailure",
- "ThirdPartyCookiesBlocked",
"NotSignedInWithIdp",
"MissingTransientUserActivation",
"ReplacedByActiveMode",
- "InvalidFieldsSpecified",
"RelyingPartyOriginIsOpaque",
"TypeNotMatching",
"UiDismissedNoEmbargo",
- "CorsError"
+ "CorsError",
+ "SuppressedBySegmentationPlatform"
]
},
{
@@ -1953,19 +2023,20 @@
]
},
{
- "id": "SelectElementAccessibilityIssueReason",
+ "id": "ElementAccessibilityIssueReason",
"type": "string",
"enum": [
"DisallowedSelectChild",
"DisallowedOptGroupChild",
"NonPhrasingContentOptionChild",
"InteractiveContentOptionChild",
- "InteractiveContentLegendChild"
+ "InteractiveContentLegendChild",
+ "InteractiveContentSummaryDescendant"
]
},
{
- "id": "SelectElementAccessibilityIssueDetails",
- "description": "This issue warns about errors in the select element content model.",
+ "id": "ElementAccessibilityIssueDetails",
+ "description": "This issue warns about errors in the select or summary element content model.",
"type": "object",
"properties": [
{
@@ -1973,8 +2044,8 @@
"$ref": "DOM.BackendNodeId"
},
{
- "name": "selectElementAccessibilityIssueReason",
- "$ref": "SelectElementAccessibilityIssueReason"
+ "name": "elementAccessibilityIssueReason",
+ "$ref": "ElementAccessibilityIssueReason"
},
{
"name": "hasDisallowedAttributes",
@@ -2046,6 +2117,141 @@
}
]
},
+ {
+ "id": "UserReidentificationIssueType",
+ "type": "string",
+ "enum": [
+ "BlockedFrameNavigation",
+ "BlockedSubresource",
+ "NoisedCanvasReadback"
+ ]
+ },
+ {
+ "id": "UserReidentificationIssueDetails",
+ "description": "This issue warns about uses of APIs that may be considered misuse to\nre-identify users.",
+ "type": "object",
+ "properties": [
+ {
+ "name": "type",
+ "$ref": "UserReidentificationIssueType"
+ },
+ {
+ "name": "request",
+ "description": "Applies to BlockedFrameNavigation and BlockedSubresource issue types.",
+ "optional": true,
+ "$ref": "AffectedRequest"
+ },
+ {
+ "name": "sourceCodeLocation",
+ "description": "Applies to NoisedCanvasReadback issue type.",
+ "optional": true,
+ "$ref": "SourceCodeLocation"
+ }
+ ]
+ },
+ {
+ "id": "PermissionElementIssueType",
+ "type": "string",
+ "enum": [
+ "InvalidType",
+ "FencedFrameDisallowed",
+ "CspFrameAncestorsMissing",
+ "PermissionsPolicyBlocked",
+ "PaddingRightUnsupported",
+ "PaddingBottomUnsupported",
+ "InsetBoxShadowUnsupported",
+ "RequestInProgress",
+ "UntrustedEvent",
+ "RegistrationFailed",
+ "TypeNotSupported",
+ "InvalidTypeActivation",
+ "SecurityChecksFailed",
+ "ActivationDisabled",
+ "GeolocationDeprecated",
+ "InvalidDisplayStyle",
+ "NonOpaqueColor",
+ "LowContrast",
+ "FontSizeTooSmall",
+ "FontSizeTooLarge",
+ "InvalidSizeValue"
+ ]
+ },
+ {
+ "id": "PermissionElementIssueDetails",
+ "description": "This issue warns about improper usage of the element.",
+ "type": "object",
+ "properties": [
+ {
+ "name": "issueType",
+ "$ref": "PermissionElementIssueType"
+ },
+ {
+ "name": "type",
+ "description": "The value of the type attribute.",
+ "optional": true,
+ "type": "string"
+ },
+ {
+ "name": "nodeId",
+ "description": "The node ID of the element.",
+ "optional": true,
+ "$ref": "DOM.BackendNodeId"
+ },
+ {
+ "name": "isWarning",
+ "description": "True if the issue is a warning, false if it is an error.",
+ "optional": true,
+ "type": "boolean"
+ },
+ {
+ "name": "permissionName",
+ "description": "Fields for message construction:\nUsed for messages that reference a specific permission name",
+ "optional": true,
+ "type": "string"
+ },
+ {
+ "name": "occluderNodeInfo",
+ "description": "Used for messages about occlusion",
+ "optional": true,
+ "type": "string"
+ },
+ {
+ "name": "occluderParentNodeInfo",
+ "description": "Used for messages about occluder's parent",
+ "optional": true,
+ "type": "string"
+ },
+ {
+ "name": "disableReason",
+ "description": "Used for messages about activation disabled reason",
+ "optional": true,
+ "type": "string"
+ }
+ ]
+ },
+ {
+ "id": "SelectivePermissionsInterventionIssueDetails",
+ "description": "The issue warns about blocked calls to privacy sensitive APIs via the\nSelective Permissions Intervention.",
+ "type": "object",
+ "properties": [
+ {
+ "name": "apiName",
+ "description": "Which API was intervened on.",
+ "type": "string"
+ },
+ {
+ "name": "adAncestry",
+ "description": "Why the ad script using the API is considered an ad.",
+ "$ref": "Network.AdAncestry"
+ },
+ {
+ "name": "stackTrace",
+ "description": "The stack trace at the time of the intervention.",
+ "optional": true,
+ "$ref": "Runtime.StackTrace"
+ }
+ ]
+ },
{
"id": "InspectorIssueCode",
"description": "A unique identifier for the type of issue. Each type may use one of the\noptional fields in InspectorIssueDetails to convey more specific\ninformation about the kind of issue.",
@@ -2057,7 +2263,6 @@
"HeavyAdIssue",
"ContentSecurityPolicyIssue",
"SharedArrayBufferIssue",
- "LowTextContrastIssue",
"CorsIssue",
"AttributionReportingIssue",
"QuirksModeIssue",
@@ -2073,8 +2278,14 @@
"FederatedAuthUserInfoRequestIssue",
"PropertyRuleIssue",
"SharedDictionaryIssue",
- "SelectElementAccessibilityIssue",
- "SRIMessageSignatureIssue"
+ "ElementAccessibilityIssue",
+ "SRIMessageSignatureIssue",
+ "UnencodedDigestIssue",
+ "ConnectionAllowlistIssue",
+ "UserReidentificationIssue",
+ "PermissionElementIssue",
+ "PerformanceIssue",
+ "SelectivePermissionsInterventionIssue"
]
},
{
@@ -2112,11 +2323,6 @@
"optional": true,
"$ref": "SharedArrayBufferIssueDetails"
},
- {
- "name": "lowTextContrastIssueDetails",
- "optional": true,
- "$ref": "LowTextContrastIssueDetails"
- },
{
"name": "corsIssueDetails",
"optional": true,
@@ -2194,14 +2400,44 @@
"$ref": "SharedDictionaryIssueDetails"
},
{
- "name": "selectElementAccessibilityIssueDetails",
+ "name": "elementAccessibilityIssueDetails",
"optional": true,
- "$ref": "SelectElementAccessibilityIssueDetails"
+ "$ref": "ElementAccessibilityIssueDetails"
},
{
"name": "sriMessageSignatureIssueDetails",
"optional": true,
"$ref": "SRIMessageSignatureIssueDetails"
+ },
+ {
+ "name": "unencodedDigestIssueDetails",
+ "optional": true,
+ "$ref": "UnencodedDigestIssueDetails"
+ },
+ {
+ "name": "connectionAllowlistIssueDetails",
+ "optional": true,
+ "$ref": "ConnectionAllowlistIssueDetails"
+ },
+ {
+ "name": "userReidentificationIssueDetails",
+ "optional": true,
+ "$ref": "UserReidentificationIssueDetails"
+ },
+ {
+ "name": "permissionElementIssueDetails",
+ "optional": true,
+ "$ref": "PermissionElementIssueDetails"
+ },
+ {
+ "name": "performanceIssueDetails",
+ "optional": true,
+ "$ref": "PerformanceIssueDetails"
+ },
+ {
+ "name": "selectivePermissionsInterventionIssueDetails",
+ "optional": true,
+ "$ref": "SelectivePermissionsInterventionIssueDetails"
}
]
},
@@ -2292,18 +2528,6 @@
"name": "enable",
"description": "Enables issues domain, sends the issues collected so far to the client by means of the\n`issueAdded` event."
},
- {
- "name": "checkContrast",
- "description": "Runs the contrast check for the target page. Found issues are reported\nusing Audits.issueAdded event.",
- "parameters": [
- {
- "name": "reportAAA",
- "description": "Whether to report WCAG AAA level issues. Default is false.",
- "optional": true,
- "type": "boolean"
- }
- ]
- },
{
"name": "checkFormsIssues",
"description": "Runs the form issues check for the target page. Found issues are reported\nusing Audits.issueAdded event.",
@@ -2331,178 +2555,37 @@
]
},
{
- "domain": "Extensions",
- "description": "Defines commands and events for browser extensions.",
+ "domain": "Autofill",
+ "description": "Defines commands and events for Autofill.",
"experimental": true,
"types": [
{
- "id": "StorageArea",
- "description": "Storage areas.",
- "type": "string",
- "enum": [
- "session",
- "local",
- "sync",
- "managed"
- ]
- }
- ],
- "commands": [
- {
- "name": "loadUnpacked",
- "description": "Installs an unpacked extension from the filesystem similar to\n--load-extension CLI flags. Returns extension ID once the extension\nhas been installed. Available if the client is connected using the\n--remote-debugging-pipe flag and the --enable-unsafe-extension-debugging\nflag is set.",
- "parameters": [
+ "id": "CreditCard",
+ "type": "object",
+ "properties": [
{
- "name": "path",
- "description": "Absolute file path.",
+ "name": "number",
+ "description": "16-digit credit card number.",
"type": "string"
- }
- ],
- "returns": [
+ },
{
- "name": "id",
- "description": "Extension id.",
- "type": "string"
- }
- ]
- },
- {
- "name": "uninstall",
- "description": "Uninstalls an unpacked extension (others not supported) from the profile.\nAvailable if the client is connected using the --remote-debugging-pipe flag\nand the --enable-unsafe-extension-debugging.",
- "parameters": [
- {
- "name": "id",
- "description": "Extension id.",
- "type": "string"
- }
- ]
- },
- {
- "name": "getStorageItems",
- "description": "Gets data from extension storage in the given `storageArea`. If `keys` is\nspecified, these are used to filter the result.",
- "parameters": [
- {
- "name": "id",
- "description": "ID of extension.",
- "type": "string"
- },
- {
- "name": "storageArea",
- "description": "StorageArea to retrieve data from.",
- "$ref": "StorageArea"
- },
- {
- "name": "keys",
- "description": "Keys to retrieve.",
- "optional": true,
- "type": "array",
- "items": {
- "type": "string"
- }
- }
- ],
- "returns": [
- {
- "name": "data",
- "type": "object"
- }
- ]
- },
- {
- "name": "removeStorageItems",
- "description": "Removes `keys` from extension storage in the given `storageArea`.",
- "parameters": [
- {
- "name": "id",
- "description": "ID of extension.",
- "type": "string"
- },
- {
- "name": "storageArea",
- "description": "StorageArea to remove data from.",
- "$ref": "StorageArea"
- },
- {
- "name": "keys",
- "description": "Keys to remove.",
- "type": "array",
- "items": {
- "type": "string"
- }
- }
- ]
- },
- {
- "name": "clearStorageItems",
- "description": "Clears extension storage in the given `storageArea`.",
- "parameters": [
- {
- "name": "id",
- "description": "ID of extension.",
- "type": "string"
- },
- {
- "name": "storageArea",
- "description": "StorageArea to remove data from.",
- "$ref": "StorageArea"
- }
- ]
- },
- {
- "name": "setStorageItems",
- "description": "Sets `values` in extension storage in the given `storageArea`. The provided `values`\nwill be merged with existing values in the storage area.",
- "parameters": [
- {
- "name": "id",
- "description": "ID of extension.",
- "type": "string"
- },
- {
- "name": "storageArea",
- "description": "StorageArea to set data in.",
- "$ref": "StorageArea"
- },
- {
- "name": "values",
- "description": "Values to set.",
- "type": "object"
- }
- ]
- }
- ]
- },
- {
- "domain": "Autofill",
- "description": "Defines commands and events for Autofill.",
- "experimental": true,
- "types": [
- {
- "id": "CreditCard",
- "type": "object",
- "properties": [
- {
- "name": "number",
- "description": "16-digit credit card number.",
- "type": "string"
- },
- {
- "name": "name",
- "description": "Name of the credit card owner.",
- "type": "string"
- },
- {
- "name": "expiryMonth",
- "description": "2-digit expiry month.",
- "type": "string"
- },
- {
- "name": "expiryYear",
- "description": "4-digit expiry year.",
- "type": "string"
- },
- {
- "name": "cvc",
- "description": "3-digit card verification code.",
+ "name": "name",
+ "description": "Name of the credit card owner.",
+ "type": "string"
+ },
+ {
+ "name": "expiryMonth",
+ "description": "2-digit expiry month.",
+ "type": "string"
+ },
+ {
+ "name": "expiryYear",
+ "description": "4-digit expiry year.",
+ "type": "string"
+ },
+ {
+ "name": "cvc",
+ "description": "3-digit card verification code.",
"type": "string"
}
]
@@ -2513,7 +2596,7 @@
"properties": [
{
"name": "name",
- "description": "address field name, for example GIVEN_NAME.",
+ "description": "address field name, for example GIVEN_NAME.\nThe full list of supported field names:\nhttps://source.chromium.org/chromium/chromium/src/+/main:components/autofill/core/browser/field_types.cc;l=38",
"type": "string"
},
{
@@ -2661,8 +2744,15 @@
},
{
"name": "card",
- "description": "Credit card information to fill out the form. Credit card data is not saved.",
+ "description": "Credit card information to fill out the form. Credit card data is not saved. Mutually exclusive with `address`.",
+ "optional": true,
"$ref": "CreditCard"
+ },
+ {
+ "name": "address",
+ "description": "Address to fill out the form. Address data is not saved. Mutually exclusive with `card`.",
+ "optional": true,
+ "$ref": "Address"
}
]
},
@@ -2846,4666 +2936,4772 @@
]
},
{
- "domain": "Browser",
- "description": "The Browser domain defines methods and events for browser managing.",
+ "domain": "BluetoothEmulation",
+ "description": "This domain allows configuring virtual Bluetooth devices to test\nthe web-bluetooth API.",
+ "experimental": true,
"types": [
{
- "id": "BrowserContextID",
- "experimental": true,
- "type": "string"
+ "id": "CentralState",
+ "description": "Indicates the various states of Central.",
+ "type": "string",
+ "enum": [
+ "absent",
+ "powered-off",
+ "powered-on"
+ ]
},
{
- "id": "WindowID",
- "experimental": true,
- "type": "integer"
+ "id": "GATTOperationType",
+ "description": "Indicates the various types of GATT event.",
+ "type": "string",
+ "enum": [
+ "connection",
+ "discovery"
+ ]
},
{
- "id": "WindowState",
- "description": "The state of the browser window.",
- "experimental": true,
+ "id": "CharacteristicWriteType",
+ "description": "Indicates the various types of characteristic write.",
"type": "string",
"enum": [
- "normal",
- "minimized",
- "maximized",
- "fullscreen"
+ "write-default-deprecated",
+ "write-with-response",
+ "write-without-response"
]
},
{
- "id": "Bounds",
- "description": "Browser window bounds information",
- "experimental": true,
+ "id": "CharacteristicOperationType",
+ "description": "Indicates the various types of characteristic operation.",
+ "type": "string",
+ "enum": [
+ "read",
+ "write",
+ "subscribe-to-notifications",
+ "unsubscribe-from-notifications"
+ ]
+ },
+ {
+ "id": "DescriptorOperationType",
+ "description": "Indicates the various types of descriptor operation.",
+ "type": "string",
+ "enum": [
+ "read",
+ "write"
+ ]
+ },
+ {
+ "id": "ManufacturerData",
+ "description": "Stores the manufacturer data",
"type": "object",
"properties": [
{
- "name": "left",
- "description": "The offset from the left edge of the screen to the window in pixels.",
- "optional": true,
+ "name": "key",
+ "description": "Company identifier\nhttps://bitbucket.org/bluetooth-SIG/public/src/main/assigned_numbers/company_identifiers/company_identifiers.yaml\nhttps://usb.org/developers",
"type": "integer"
},
{
- "name": "top",
- "description": "The offset from the top edge of the screen to the window in pixels.",
+ "name": "data",
+ "description": "Manufacturer-specific data (Encoded as a base64 string when passed over JSON)",
+ "type": "string"
+ }
+ ]
+ },
+ {
+ "id": "ScanRecord",
+ "description": "Stores the byte data of the advertisement packet sent by a Bluetooth device.",
+ "type": "object",
+ "properties": [
+ {
+ "name": "name",
"optional": true,
- "type": "integer"
+ "type": "string"
},
{
- "name": "width",
- "description": "The window width in pixels.",
+ "name": "uuids",
+ "optional": true,
+ "type": "array",
+ "items": {
+ "type": "string"
+ }
+ },
+ {
+ "name": "appearance",
+ "description": "Stores the external appearance description of the device.",
"optional": true,
"type": "integer"
},
{
- "name": "height",
- "description": "The window height in pixels.",
+ "name": "txPower",
+ "description": "Stores the transmission power of a broadcasting device.",
"optional": true,
"type": "integer"
},
{
- "name": "windowState",
- "description": "The window state. Default to normal.",
+ "name": "manufacturerData",
+ "description": "Key is the company identifier and the value is an array of bytes of\nmanufacturer specific data.",
"optional": true,
- "$ref": "WindowState"
+ "type": "array",
+ "items": {
+ "$ref": "ManufacturerData"
+ }
}
]
},
{
- "id": "PermissionType",
- "experimental": true,
- "type": "string",
- "enum": [
- "ar",
- "audioCapture",
- "automaticFullscreen",
- "backgroundFetch",
- "backgroundSync",
- "cameraPanTiltZoom",
- "capturedSurfaceControl",
- "clipboardReadWrite",
- "clipboardSanitizedWrite",
- "displayCapture",
- "durableStorage",
- "geolocation",
- "handTracking",
- "idleDetection",
- "keyboardLock",
- "localFonts",
- "midi",
- "midiSysex",
- "nfc",
- "notifications",
- "paymentHandler",
- "periodicBackgroundSync",
- "pointerLock",
- "protectedMediaIdentifier",
- "sensors",
- "smartCard",
- "speakerSelection",
- "storageAccess",
- "topLevelStorageAccess",
- "videoCapture",
- "vr",
- "wakeLockScreen",
- "wakeLockSystem",
- "webAppInstallation",
- "webPrinting",
- "windowManagement"
- ]
- },
- {
- "id": "PermissionSetting",
- "experimental": true,
- "type": "string",
- "enum": [
- "granted",
- "denied",
- "prompt"
+ "id": "ScanEntry",
+ "description": "Stores the advertisement packet information that is sent by a Bluetooth device.",
+ "type": "object",
+ "properties": [
+ {
+ "name": "deviceAddress",
+ "type": "string"
+ },
+ {
+ "name": "rssi",
+ "type": "integer"
+ },
+ {
+ "name": "scanRecord",
+ "$ref": "ScanRecord"
+ }
]
},
{
- "id": "PermissionDescriptor",
- "description": "Definition of PermissionDescriptor defined in the Permissions API:\nhttps://w3c.github.io/permissions/#dom-permissiondescriptor.",
- "experimental": true,
+ "id": "CharacteristicProperties",
+ "description": "Describes the properties of a characteristic. This follows Bluetooth Core\nSpecification BT 4.2 Vol 3 Part G 3.3.1. Characteristic Properties.",
"type": "object",
"properties": [
{
- "name": "name",
- "description": "Name of permission.\nSee https://cs.chromium.org/chromium/src/third_party/blink/renderer/modules/permissions/permission_descriptor.idl for valid permission names.",
- "type": "string"
+ "name": "broadcast",
+ "optional": true,
+ "type": "boolean"
},
{
- "name": "sysex",
- "description": "For \"midi\" permission, may also specify sysex control.",
+ "name": "read",
"optional": true,
"type": "boolean"
},
{
- "name": "userVisibleOnly",
- "description": "For \"push\" permission, may specify userVisibleOnly.\nNote that userVisibleOnly = true is the only currently supported type.",
+ "name": "writeWithoutResponse",
"optional": true,
"type": "boolean"
},
{
- "name": "allowWithoutSanitization",
- "description": "For \"clipboard\" permission, may specify allowWithoutSanitization.",
+ "name": "write",
"optional": true,
"type": "boolean"
},
{
- "name": "allowWithoutGesture",
- "description": "For \"fullscreen\" permission, must specify allowWithoutGesture:true.",
+ "name": "notify",
"optional": true,
"type": "boolean"
},
{
- "name": "panTiltZoom",
- "description": "For \"camera\" permission, may specify panTiltZoom.",
+ "name": "indicate",
+ "optional": true,
+ "type": "boolean"
+ },
+ {
+ "name": "authenticatedSignedWrites",
+ "optional": true,
+ "type": "boolean"
+ },
+ {
+ "name": "extendedProperties",
"optional": true,
"type": "boolean"
}
]
- },
- {
- "id": "BrowserCommandId",
- "description": "Browser command ids used by executeBrowserCommand.",
- "experimental": true,
- "type": "string",
- "enum": [
- "openTabSearch",
- "closeTabSearch"
- ]
- },
+ }
+ ],
+ "commands": [
{
- "id": "Bucket",
- "description": "Chrome histogram bucket.",
- "experimental": true,
- "type": "object",
- "properties": [
+ "name": "enable",
+ "description": "Enable the BluetoothEmulation domain.",
+ "parameters": [
{
- "name": "low",
- "description": "Minimum value (inclusive).",
- "type": "integer"
+ "name": "state",
+ "description": "State of the simulated central.",
+ "$ref": "CentralState"
},
{
- "name": "high",
- "description": "Maximum value (exclusive).",
- "type": "integer"
- },
+ "name": "leSupported",
+ "description": "If the simulated central supports low-energy.",
+ "type": "boolean"
+ }
+ ]
+ },
+ {
+ "name": "setSimulatedCentralState",
+ "description": "Set the state of the simulated central.",
+ "parameters": [
{
- "name": "count",
- "description": "Number of samples.",
- "type": "integer"
+ "name": "state",
+ "description": "State of the simulated central.",
+ "$ref": "CentralState"
}
]
},
{
- "id": "Histogram",
- "description": "Chrome histogram.",
- "experimental": true,
- "type": "object",
- "properties": [
+ "name": "disable",
+ "description": "Disable the BluetoothEmulation domain."
+ },
+ {
+ "name": "simulatePreconnectedPeripheral",
+ "description": "Simulates a peripheral with |address|, |name| and |knownServiceUuids|\nthat has already been connected to the system.",
+ "parameters": [
{
- "name": "name",
- "description": "Name.",
+ "name": "address",
"type": "string"
},
{
- "name": "sum",
- "description": "Sum of sample values.",
- "type": "integer"
+ "name": "name",
+ "type": "string"
},
{
- "name": "count",
- "description": "Total number of samples.",
- "type": "integer"
+ "name": "manufacturerData",
+ "type": "array",
+ "items": {
+ "$ref": "ManufacturerData"
+ }
},
{
- "name": "buckets",
- "description": "Buckets.",
+ "name": "knownServiceUuids",
"type": "array",
"items": {
- "$ref": "Bucket"
+ "type": "string"
}
}
]
- }
- ],
- "commands": [
+ },
{
- "name": "setPermission",
- "description": "Set permission settings for given origin.",
- "experimental": true,
+ "name": "simulateAdvertisement",
+ "description": "Simulates an advertisement packet described in |entry| being received by\nthe central.",
"parameters": [
{
- "name": "permission",
- "description": "Descriptor of permission to override.",
- "$ref": "PermissionDescriptor"
- },
- {
- "name": "setting",
- "description": "Setting of the permission.",
- "$ref": "PermissionSetting"
- },
- {
- "name": "origin",
- "description": "Origin the permission applies to, all origins if not specified.",
- "optional": true,
- "type": "string"
- },
- {
- "name": "browserContextId",
- "description": "Context to override. When omitted, default browser context is used.",
- "optional": true,
- "$ref": "BrowserContextID"
+ "name": "entry",
+ "$ref": "ScanEntry"
}
]
},
{
- "name": "grantPermissions",
- "description": "Grant specific permissions to the given origin and reject all others.",
- "experimental": true,
+ "name": "simulateGATTOperationResponse",
+ "description": "Simulates the response code from the peripheral with |address| for a\nGATT operation of |type|. The |code| value follows the HCI Error Codes from\nBluetooth Core Specification Vol 2 Part D 1.3 List Of Error Codes.",
"parameters": [
{
- "name": "permissions",
- "type": "array",
- "items": {
- "$ref": "PermissionType"
- }
+ "name": "address",
+ "type": "string"
},
{
- "name": "origin",
- "description": "Origin the permission applies to, all origins if not specified.",
- "optional": true,
- "type": "string"
+ "name": "type",
+ "$ref": "GATTOperationType"
},
{
- "name": "browserContextId",
- "description": "BrowserContext to override permissions. When omitted, default browser context is used.",
- "optional": true,
- "$ref": "BrowserContextID"
+ "name": "code",
+ "type": "integer"
}
]
},
{
- "name": "resetPermissions",
- "description": "Reset all permission management for all origins.",
+ "name": "simulateCharacteristicOperationResponse",
+ "description": "Simulates the response from the characteristic with |characteristicId| for a\ncharacteristic operation of |type|. The |code| value follows the Error\nCodes from Bluetooth Core Specification Vol 3 Part F 3.4.1.1 Error Response.\nThe |data| is expected to exist when simulating a successful read operation\nresponse.",
"parameters": [
{
- "name": "browserContextId",
- "description": "BrowserContext to reset permissions. When omitted, default browser context is used.",
+ "name": "characteristicId",
+ "type": "string"
+ },
+ {
+ "name": "type",
+ "$ref": "CharacteristicOperationType"
+ },
+ {
+ "name": "code",
+ "type": "integer"
+ },
+ {
+ "name": "data",
"optional": true,
- "$ref": "BrowserContextID"
+ "type": "string"
}
]
},
{
- "name": "setDownloadBehavior",
- "description": "Set the behavior when downloading a file.",
- "experimental": true,
+ "name": "simulateDescriptorOperationResponse",
+ "description": "Simulates the response from the descriptor with |descriptorId| for a\ndescriptor operation of |type|. The |code| value follows the Error\nCodes from Bluetooth Core Specification Vol 3 Part F 3.4.1.1 Error Response.\nThe |data| is expected to exist when simulating a successful read operation\nresponse.",
"parameters": [
{
- "name": "behavior",
- "description": "Whether to allow all or deny all download requests, or use default Chrome behavior if\navailable (otherwise deny). |allowAndName| allows download and names files according to\ntheir download guids.",
- "type": "string",
- "enum": [
- "deny",
- "allow",
- "allowAndName",
- "default"
- ]
+ "name": "descriptorId",
+ "type": "string"
},
{
- "name": "browserContextId",
- "description": "BrowserContext to set download behavior. When omitted, default browser context is used.",
- "optional": true,
- "$ref": "BrowserContextID"
+ "name": "type",
+ "$ref": "DescriptorOperationType"
},
{
- "name": "downloadPath",
- "description": "The default path to save downloaded files to. This is required if behavior is set to 'allow'\nor 'allowAndName'.",
- "optional": true,
- "type": "string"
+ "name": "code",
+ "type": "integer"
},
{
- "name": "eventsEnabled",
- "description": "Whether to emit download events (defaults to false).",
+ "name": "data",
"optional": true,
- "type": "boolean"
+ "type": "string"
}
]
},
{
- "name": "cancelDownload",
- "description": "Cancel a download if in progress",
- "experimental": true,
+ "name": "addService",
+ "description": "Adds a service with |serviceUuid| to the peripheral with |address|.",
"parameters": [
{
- "name": "guid",
- "description": "Global unique identifier of the download.",
+ "name": "address",
"type": "string"
},
{
- "name": "browserContextId",
- "description": "BrowserContext to perform the action in. When omitted, default browser context is used.",
- "optional": true,
- "$ref": "BrowserContextID"
+ "name": "serviceUuid",
+ "type": "string"
}
- ]
- },
- {
- "name": "close",
- "description": "Close browser gracefully."
- },
- {
- "name": "crash",
- "description": "Crashes browser on the main thread.",
- "experimental": true
- },
- {
- "name": "crashGpuProcess",
- "description": "Crashes GPU process.",
- "experimental": true
- },
- {
- "name": "getVersion",
- "description": "Returns version information.",
+ ],
"returns": [
{
- "name": "protocolVersion",
- "description": "Protocol version.",
- "type": "string"
- },
- {
- "name": "product",
- "description": "Product name.",
- "type": "string"
- },
- {
- "name": "revision",
- "description": "Product revision.",
- "type": "string"
- },
- {
- "name": "userAgent",
- "description": "User-Agent.",
- "type": "string"
- },
- {
- "name": "jsVersion",
- "description": "V8 version.",
+ "name": "serviceId",
+ "description": "An identifier that uniquely represents this service.",
"type": "string"
}
]
},
{
- "name": "getBrowserCommandLine",
- "description": "Returns the command line switches for the browser process if, and only if\n--enable-automation is on the commandline.",
- "experimental": true,
- "returns": [
+ "name": "removeService",
+ "description": "Removes the service respresented by |serviceId| from the simulated central.",
+ "parameters": [
{
- "name": "arguments",
- "description": "Commandline parameters",
- "type": "array",
- "items": {
- "type": "string"
- }
+ "name": "serviceId",
+ "type": "string"
}
]
},
{
- "name": "getHistograms",
- "description": "Get Chrome histograms.",
- "experimental": true,
+ "name": "addCharacteristic",
+ "description": "Adds a characteristic with |characteristicUuid| and |properties| to the\nservice represented by |serviceId|.",
"parameters": [
{
- "name": "query",
- "description": "Requested substring in name. Only histograms which have query as a\nsubstring in their name are extracted. An empty or absent query returns\nall histograms.",
- "optional": true,
+ "name": "serviceId",
"type": "string"
},
{
- "name": "delta",
- "description": "If true, retrieve delta since last delta call.",
- "optional": true,
- "type": "boolean"
- }
- ],
- "returns": [
- {
- "name": "histograms",
- "description": "Histograms.",
- "type": "array",
- "items": {
- "$ref": "Histogram"
- }
- }
- ]
- },
- {
- "name": "getHistogram",
- "description": "Get a Chrome histogram by name.",
- "experimental": true,
- "parameters": [
- {
- "name": "name",
- "description": "Requested histogram name.",
+ "name": "characteristicUuid",
"type": "string"
},
{
- "name": "delta",
- "description": "If true, retrieve delta since last delta call.",
- "optional": true,
- "type": "boolean"
+ "name": "properties",
+ "$ref": "CharacteristicProperties"
}
],
"returns": [
{
- "name": "histogram",
- "description": "Histogram.",
- "$ref": "Histogram"
+ "name": "characteristicId",
+ "description": "An identifier that uniquely represents this characteristic.",
+ "type": "string"
}
]
},
{
- "name": "getWindowBounds",
- "description": "Get position and size of the browser window.",
- "experimental": true,
+ "name": "removeCharacteristic",
+ "description": "Removes the characteristic respresented by |characteristicId| from the\nsimulated central.",
"parameters": [
{
- "name": "windowId",
- "description": "Browser window id.",
- "$ref": "WindowID"
- }
- ],
- "returns": [
- {
- "name": "bounds",
- "description": "Bounds information of the window. When window state is 'minimized', the restored window\nposition and size are returned.",
- "$ref": "Bounds"
+ "name": "characteristicId",
+ "type": "string"
}
]
},
{
- "name": "getWindowForTarget",
- "description": "Get the browser window that contains the devtools target.",
- "experimental": true,
+ "name": "addDescriptor",
+ "description": "Adds a descriptor with |descriptorUuid| to the characteristic respresented\nby |characteristicId|.",
"parameters": [
{
- "name": "targetId",
- "description": "Devtools agent host id. If called as a part of the session, associated targetId is used.",
- "optional": true,
- "$ref": "Target.TargetID"
+ "name": "characteristicId",
+ "type": "string"
+ },
+ {
+ "name": "descriptorUuid",
+ "type": "string"
}
],
"returns": [
{
- "name": "windowId",
- "description": "Browser window id.",
- "$ref": "WindowID"
- },
- {
- "name": "bounds",
- "description": "Bounds information of the window. When window state is 'minimized', the restored window\nposition and size are returned.",
- "$ref": "Bounds"
+ "name": "descriptorId",
+ "description": "An identifier that uniquely represents this descriptor.",
+ "type": "string"
}
]
},
{
- "name": "setWindowBounds",
- "description": "Set position and/or size of the browser window.",
- "experimental": true,
+ "name": "removeDescriptor",
+ "description": "Removes the descriptor with |descriptorId| from the simulated central.",
"parameters": [
{
- "name": "windowId",
- "description": "Browser window id.",
- "$ref": "WindowID"
- },
- {
- "name": "bounds",
- "description": "New window bounds. The 'minimized', 'maximized' and 'fullscreen' states cannot be combined\nwith 'left', 'top', 'width' or 'height'. Leaves unspecified fields unchanged.",
- "$ref": "Bounds"
+ "name": "descriptorId",
+ "type": "string"
}
]
},
{
- "name": "setDockTile",
- "description": "Set dock tile details, platform-specific.",
- "experimental": true,
+ "name": "simulateGATTDisconnection",
+ "description": "Simulates a GATT disconnection from the peripheral with |address|.",
"parameters": [
{
- "name": "badgeLabel",
- "optional": true,
- "type": "string"
- },
- {
- "name": "image",
- "description": "Png encoded image. (Encoded as a base64 string when passed over JSON)",
- "optional": true,
+ "name": "address",
"type": "string"
}
]
- },
+ }
+ ],
+ "events": [
{
- "name": "executeBrowserCommand",
- "description": "Invoke custom browser commands used by telemetry.",
- "experimental": true,
+ "name": "gattOperationReceived",
+ "description": "Event for when a GATT operation of |type| to the peripheral with |address|\nhappened.",
"parameters": [
{
- "name": "commandId",
- "$ref": "BrowserCommandId"
+ "name": "address",
+ "type": "string"
+ },
+ {
+ "name": "type",
+ "$ref": "GATTOperationType"
}
]
},
{
- "name": "addPrivacySandboxEnrollmentOverride",
- "description": "Allows a site to use privacy sandbox features that require enrollment\nwithout the site actually being enrolled. Only supported on page targets.",
+ "name": "characteristicOperationReceived",
+ "description": "Event for when a characteristic operation of |type| to the characteristic\nrespresented by |characteristicId| happened. |data| and |writeType| is\nexpected to exist when |type| is write.",
"parameters": [
{
- "name": "url",
+ "name": "characteristicId",
"type": "string"
- }
- ]
- }
- ],
- "events": [
- {
- "name": "downloadWillBegin",
- "description": "Fired when page is about to start a download.",
- "experimental": true,
- "parameters": [
- {
- "name": "frameId",
- "description": "Id of the frame that caused the download to begin.",
- "$ref": "Page.FrameId"
},
{
- "name": "guid",
- "description": "Global unique identifier of the download.",
- "type": "string"
+ "name": "type",
+ "$ref": "CharacteristicOperationType"
},
{
- "name": "url",
- "description": "URL of the resource being downloaded.",
+ "name": "data",
+ "optional": true,
"type": "string"
},
{
- "name": "suggestedFilename",
- "description": "Suggested file name of the resource (the actual name of the file saved on disk may differ).",
- "type": "string"
+ "name": "writeType",
+ "optional": true,
+ "$ref": "CharacteristicWriteType"
}
]
},
{
- "name": "downloadProgress",
- "description": "Fired when download makes progress. Last call has |done| == true.",
- "experimental": true,
+ "name": "descriptorOperationReceived",
+ "description": "Event for when a descriptor operation of |type| to the descriptor\nrespresented by |descriptorId| happened. |data| is expected to exist when\n|type| is write.",
"parameters": [
{
- "name": "guid",
- "description": "Global unique identifier of the download.",
+ "name": "descriptorId",
"type": "string"
},
{
- "name": "totalBytes",
- "description": "Total expected bytes to download.",
- "type": "number"
- },
- {
- "name": "receivedBytes",
- "description": "Total bytes received.",
- "type": "number"
+ "name": "type",
+ "$ref": "DescriptorOperationType"
},
{
- "name": "state",
- "description": "Download status.",
- "type": "string",
- "enum": [
- "inProgress",
- "completed",
- "canceled"
- ]
+ "name": "data",
+ "optional": true,
+ "type": "string"
}
]
}
]
},
{
- "domain": "CSS",
- "description": "This domain exposes CSS read/write operations. All CSS objects (stylesheets, rules, and styles)\nhave an associated `id` used in subsequent operations on the related object. Each object type has\na specific `id` structure, and those are not interchangeable between objects of different kinds.\nCSS objects can be loaded using the `get*ForNode()` calls (which accept a DOM node id). A client\ncan also keep track of stylesheets via the `styleSheetAdded`/`styleSheetRemoved` events and\nsubsequently load the required stylesheet contents using the `getStyleSheet[Text]()` methods.",
- "experimental": true,
- "dependencies": [
- "DOM",
- "Page"
- ],
+ "domain": "Browser",
+ "description": "The Browser domain defines methods and events for browser managing.",
"types": [
{
- "id": "StyleSheetId",
+ "id": "BrowserContextID",
+ "experimental": true,
"type": "string"
},
{
- "id": "StyleSheetOrigin",
- "description": "Stylesheet type: \"injected\" for stylesheets injected via extension, \"user-agent\" for user-agent\nstylesheets, \"inspector\" for stylesheets created by the inspector (i.e. those holding the \"via\ninspector\" rules), \"regular\" for regular stylesheets.",
+ "id": "WindowID",
+ "experimental": true,
+ "type": "integer"
+ },
+ {
+ "id": "WindowState",
+ "description": "The state of the browser window.",
+ "experimental": true,
"type": "string",
"enum": [
- "injected",
- "user-agent",
- "inspector",
- "regular"
+ "normal",
+ "minimized",
+ "maximized",
+ "fullscreen"
]
},
{
- "id": "PseudoElementMatches",
- "description": "CSS rule collection for a single pseudo style.",
+ "id": "Bounds",
+ "description": "Browser window bounds information",
+ "experimental": true,
"type": "object",
"properties": [
{
- "name": "pseudoType",
- "description": "Pseudo element type.",
- "$ref": "DOM.PseudoType"
- },
- {
- "name": "pseudoIdentifier",
- "description": "Pseudo element custom ident.",
+ "name": "left",
+ "description": "The offset from the left edge of the screen to the window in pixels.",
"optional": true,
- "type": "string"
+ "type": "integer"
},
{
- "name": "matches",
- "description": "Matches of CSS rules applicable to the pseudo style.",
- "type": "array",
- "items": {
- "$ref": "RuleMatch"
- }
- }
- ]
- },
- {
- "id": "CSSAnimationStyle",
- "description": "CSS style coming from animations with the name of the animation.",
- "type": "object",
- "properties": [
- {
- "name": "name",
- "description": "The name of the animation.",
+ "name": "top",
+ "description": "The offset from the top edge of the screen to the window in pixels.",
"optional": true,
- "type": "string"
+ "type": "integer"
},
{
- "name": "style",
- "description": "The style coming from the animation.",
- "$ref": "CSSStyle"
- }
- ]
- },
- {
- "id": "InheritedStyleEntry",
- "description": "Inherited CSS rule collection from ancestor node.",
- "type": "object",
- "properties": [
- {
- "name": "inlineStyle",
- "description": "The ancestor node's inline style, if any, in the style inheritance chain.",
+ "name": "width",
+ "description": "The window width in pixels.",
"optional": true,
- "$ref": "CSSStyle"
+ "type": "integer"
},
{
- "name": "matchedCSSRules",
- "description": "Matches of CSS rules matching the ancestor node in the style inheritance chain.",
- "type": "array",
- "items": {
- "$ref": "RuleMatch"
- }
- }
- ]
- },
- {
- "id": "InheritedAnimatedStyleEntry",
- "description": "Inherited CSS style collection for animated styles from ancestor node.",
- "type": "object",
- "properties": [
- {
- "name": "animationStyles",
- "description": "Styles coming from the animations of the ancestor, if any, in the style inheritance chain.",
+ "name": "height",
+ "description": "The window height in pixels.",
"optional": true,
- "type": "array",
- "items": {
- "$ref": "CSSAnimationStyle"
- }
+ "type": "integer"
},
{
- "name": "transitionsStyle",
- "description": "The style coming from the transitions of the ancestor, if any, in the style inheritance chain.",
+ "name": "windowState",
+ "description": "The window state. Default to normal.",
"optional": true,
- "$ref": "CSSStyle"
+ "$ref": "WindowState"
}
]
},
{
- "id": "InheritedPseudoElementMatches",
- "description": "Inherited pseudo element matches from pseudos of an ancestor node.",
- "type": "object",
- "properties": [
- {
- "name": "pseudoElements",
- "description": "Matches of pseudo styles from the pseudos of an ancestor node.",
- "type": "array",
- "items": {
- "$ref": "PseudoElementMatches"
- }
- }
+ "id": "PermissionType",
+ "experimental": true,
+ "type": "string",
+ "enum": [
+ "ar",
+ "audioCapture",
+ "automaticFullscreen",
+ "backgroundFetch",
+ "backgroundSync",
+ "cameraPanTiltZoom",
+ "capturedSurfaceControl",
+ "clipboardReadWrite",
+ "clipboardSanitizedWrite",
+ "displayCapture",
+ "durableStorage",
+ "geolocation",
+ "handTracking",
+ "idleDetection",
+ "keyboardLock",
+ "localFonts",
+ "localNetwork",
+ "localNetworkAccess",
+ "loopbackNetwork",
+ "midi",
+ "midiSysex",
+ "nfc",
+ "notifications",
+ "paymentHandler",
+ "periodicBackgroundSync",
+ "pointerLock",
+ "protectedMediaIdentifier",
+ "sensors",
+ "smartCard",
+ "speakerSelection",
+ "storageAccess",
+ "topLevelStorageAccess",
+ "videoCapture",
+ "vr",
+ "wakeLockScreen",
+ "wakeLockSystem",
+ "webAppInstallation",
+ "webPrinting",
+ "windowManagement"
]
},
{
- "id": "RuleMatch",
- "description": "Match data for a CSS rule.",
- "type": "object",
- "properties": [
- {
- "name": "rule",
- "description": "CSS rule in the match.",
- "$ref": "CSSRule"
- },
- {
- "name": "matchingSelectors",
- "description": "Matching selector indices in the rule's selectorList selectors (0-based).",
- "type": "array",
- "items": {
- "type": "integer"
- }
- }
+ "id": "PermissionSetting",
+ "experimental": true,
+ "type": "string",
+ "enum": [
+ "granted",
+ "denied",
+ "prompt"
]
},
{
- "id": "Value",
- "description": "Data for a simple selector (these are delimited by commas in a selector list).",
+ "id": "PermissionDescriptor",
+ "description": "Definition of PermissionDescriptor defined in the Permissions API:\nhttps://w3c.github.io/permissions/#dom-permissiondescriptor.",
+ "experimental": true,
"type": "object",
"properties": [
{
- "name": "text",
- "description": "Value text.",
+ "name": "name",
+ "description": "Name of permission.\nSee https://cs.chromium.org/chromium/src/third_party/blink/renderer/modules/permissions/permission_descriptor.idl for valid permission names.",
"type": "string"
},
{
- "name": "range",
- "description": "Value range in the underlying resource (if available).",
+ "name": "sysex",
+ "description": "For \"midi\" permission, may also specify sysex control.",
"optional": true,
- "$ref": "SourceRange"
+ "type": "boolean"
},
{
- "name": "specificity",
- "description": "Specificity of the selector.",
- "experimental": true,
+ "name": "userVisibleOnly",
+ "description": "For \"push\" permission, may specify userVisibleOnly.\nNote that userVisibleOnly = true is the only currently supported type.",
"optional": true,
- "$ref": "Specificity"
+ "type": "boolean"
+ },
+ {
+ "name": "allowWithoutSanitization",
+ "description": "For \"clipboard\" permission, may specify allowWithoutSanitization.",
+ "optional": true,
+ "type": "boolean"
+ },
+ {
+ "name": "allowWithoutGesture",
+ "description": "For \"fullscreen\" permission, must specify allowWithoutGesture:true.",
+ "optional": true,
+ "type": "boolean"
+ },
+ {
+ "name": "panTiltZoom",
+ "description": "For \"camera\" permission, may specify panTiltZoom.",
+ "optional": true,
+ "type": "boolean"
}
]
},
{
- "id": "Specificity",
- "description": "Specificity:\nhttps://drafts.csswg.org/selectors/#specificity-rules",
+ "id": "BrowserCommandId",
+ "description": "Browser command ids used by executeBrowserCommand.",
+ "experimental": true,
+ "type": "string",
+ "enum": [
+ "openTabSearch",
+ "closeTabSearch",
+ "openGlic"
+ ]
+ },
+ {
+ "id": "Bucket",
+ "description": "Chrome histogram bucket.",
"experimental": true,
"type": "object",
"properties": [
{
- "name": "a",
- "description": "The a component, which represents the number of ID selectors.",
+ "name": "low",
+ "description": "Minimum value (inclusive).",
"type": "integer"
},
{
- "name": "b",
- "description": "The b component, which represents the number of class selectors, attributes selectors, and\npseudo-classes.",
+ "name": "high",
+ "description": "Maximum value (exclusive).",
"type": "integer"
},
{
- "name": "c",
- "description": "The c component, which represents the number of type selectors and pseudo-elements.",
+ "name": "count",
+ "description": "Number of samples.",
"type": "integer"
}
]
},
{
- "id": "SelectorList",
- "description": "Selector list data.",
+ "id": "Histogram",
+ "description": "Chrome histogram.",
+ "experimental": true,
"type": "object",
"properties": [
{
- "name": "selectors",
- "description": "Selectors in the list.",
+ "name": "name",
+ "description": "Name.",
+ "type": "string"
+ },
+ {
+ "name": "sum",
+ "description": "Sum of sample values.",
+ "type": "integer"
+ },
+ {
+ "name": "count",
+ "description": "Total number of samples.",
+ "type": "integer"
+ },
+ {
+ "name": "buckets",
+ "description": "Buckets.",
"type": "array",
"items": {
- "$ref": "Value"
+ "$ref": "Bucket"
}
- },
- {
- "name": "text",
- "description": "Rule selector text.",
- "type": "string"
}
]
},
{
- "id": "CSSStyleSheetHeader",
- "description": "CSS stylesheet metainformation.",
- "type": "object",
- "properties": [
+ "id": "PrivacySandboxAPI",
+ "experimental": true,
+ "type": "string",
+ "enum": [
+ "BiddingAndAuctionServices",
+ "TrustedKeyValue"
+ ]
+ }
+ ],
+ "commands": [
+ {
+ "name": "setPermission",
+ "description": "Set permission settings for given embedding and embedded origins.",
+ "experimental": true,
+ "parameters": [
{
- "name": "styleSheetId",
- "description": "The stylesheet identifier.",
- "$ref": "StyleSheetId"
+ "name": "permission",
+ "description": "Descriptor of permission to override.",
+ "$ref": "PermissionDescriptor"
},
{
- "name": "frameId",
- "description": "Owner frame identifier.",
- "$ref": "Page.FrameId"
+ "name": "setting",
+ "description": "Setting of the permission.",
+ "$ref": "PermissionSetting"
},
{
- "name": "sourceURL",
- "description": "Stylesheet resource URL. Empty if this is a constructed stylesheet created using\nnew CSSStyleSheet() (but non-empty if this is a constructed stylesheet imported\nas a CSS module script).",
+ "name": "origin",
+ "description": "Embedding origin the permission applies to, all origins if not specified.",
+ "optional": true,
"type": "string"
},
{
- "name": "sourceMapURL",
- "description": "URL of source map associated with the stylesheet (if any).",
+ "name": "embeddedOrigin",
+ "description": "Embedded origin the permission applies to. It is ignored unless the embedding origin is\npresent and valid. If the embedding origin is provided but the embedded origin isn't, the\nembedding origin is used as the embedded origin.",
"optional": true,
"type": "string"
},
{
- "name": "origin",
- "description": "Stylesheet origin.",
- "$ref": "StyleSheetOrigin"
+ "name": "browserContextId",
+ "description": "Context to override. When omitted, default browser context is used.",
+ "optional": true,
+ "$ref": "BrowserContextID"
+ }
+ ]
+ },
+ {
+ "name": "grantPermissions",
+ "description": "Grant specific permissions to the given origin and reject all others. Deprecated. Use\nsetPermission instead.",
+ "experimental": true,
+ "deprecated": true,
+ "parameters": [
+ {
+ "name": "permissions",
+ "type": "array",
+ "items": {
+ "$ref": "PermissionType"
+ }
},
{
- "name": "title",
- "description": "Stylesheet title.",
+ "name": "origin",
+ "description": "Origin the permission applies to, all origins if not specified.",
+ "optional": true,
"type": "string"
},
{
- "name": "ownerNode",
- "description": "The backend id for the owner node of the stylesheet.",
+ "name": "browserContextId",
+ "description": "BrowserContext to override permissions. When omitted, default browser context is used.",
"optional": true,
- "$ref": "DOM.BackendNodeId"
- },
+ "$ref": "BrowserContextID"
+ }
+ ]
+ },
+ {
+ "name": "resetPermissions",
+ "description": "Reset all permission management for all origins.",
+ "parameters": [
{
- "name": "disabled",
- "description": "Denotes whether the stylesheet is disabled.",
- "type": "boolean"
+ "name": "browserContextId",
+ "description": "BrowserContext to reset permissions. When omitted, default browser context is used.",
+ "optional": true,
+ "$ref": "BrowserContextID"
+ }
+ ]
+ },
+ {
+ "name": "setDownloadBehavior",
+ "description": "Set the behavior when downloading a file.",
+ "experimental": true,
+ "parameters": [
+ {
+ "name": "behavior",
+ "description": "Whether to allow all or deny all download requests, or use default Chrome behavior if\navailable (otherwise deny). |allowAndName| allows download and names files according to\ntheir download guids.",
+ "type": "string",
+ "enum": [
+ "deny",
+ "allow",
+ "allowAndName",
+ "default"
+ ]
},
{
- "name": "hasSourceURL",
- "description": "Whether the sourceURL field value comes from the sourceURL comment.",
+ "name": "browserContextId",
+ "description": "BrowserContext to set download behavior. When omitted, default browser context is used.",
"optional": true,
- "type": "boolean"
+ "$ref": "BrowserContextID"
},
{
- "name": "isInline",
- "description": "Whether this stylesheet is created for STYLE tag by parser. This flag is not set for\ndocument.written STYLE tags.",
- "type": "boolean"
+ "name": "downloadPath",
+ "description": "The default path to save downloaded files to. This is required if behavior is set to 'allow'\nor 'allowAndName'.",
+ "optional": true,
+ "type": "string"
},
{
- "name": "isMutable",
- "description": "Whether this stylesheet is mutable. Inline stylesheets become mutable\nafter they have been modified via CSSOM API.\n`` element's stylesheets become mutable only if DevTools modifies them.\nConstructed stylesheets (new CSSStyleSheet()) are mutable immediately after creation.",
+ "name": "eventsEnabled",
+ "description": "Whether to emit download events (defaults to false).",
+ "optional": true,
"type": "boolean"
- },
+ }
+ ]
+ },
+ {
+ "name": "cancelDownload",
+ "description": "Cancel a download if in progress",
+ "experimental": true,
+ "parameters": [
{
- "name": "isConstructed",
- "description": "True if this stylesheet is created through new CSSStyleSheet() or imported as a\nCSS module script.",
- "type": "boolean"
+ "name": "guid",
+ "description": "Global unique identifier of the download.",
+ "type": "string"
},
{
- "name": "startLine",
- "description": "Line offset of the stylesheet within the resource (zero based).",
- "type": "number"
- },
+ "name": "browserContextId",
+ "description": "BrowserContext to perform the action in. When omitted, default browser context is used.",
+ "optional": true,
+ "$ref": "BrowserContextID"
+ }
+ ]
+ },
+ {
+ "name": "close",
+ "description": "Close browser gracefully."
+ },
+ {
+ "name": "crash",
+ "description": "Crashes browser on the main thread.",
+ "experimental": true
+ },
+ {
+ "name": "crashGpuProcess",
+ "description": "Crashes GPU process.",
+ "experimental": true
+ },
+ {
+ "name": "getVersion",
+ "description": "Returns version information.",
+ "returns": [
{
- "name": "startColumn",
- "description": "Column offset of the stylesheet within the resource (zero based).",
- "type": "number"
+ "name": "protocolVersion",
+ "description": "Protocol version.",
+ "type": "string"
},
{
- "name": "length",
- "description": "Size of the content (in characters).",
- "type": "number"
+ "name": "product",
+ "description": "Product name.",
+ "type": "string"
},
{
- "name": "endLine",
- "description": "Line offset of the end of the stylesheet within the resource (zero based).",
- "type": "number"
+ "name": "revision",
+ "description": "Product revision.",
+ "type": "string"
},
{
- "name": "endColumn",
- "description": "Column offset of the end of the stylesheet within the resource (zero based).",
- "type": "number"
+ "name": "userAgent",
+ "description": "User-Agent.",
+ "type": "string"
},
{
- "name": "loadingFailed",
- "description": "If the style sheet was loaded from a network resource, this indicates when the resource failed to load",
- "experimental": true,
- "optional": true,
- "type": "boolean"
+ "name": "jsVersion",
+ "description": "V8 version.",
+ "type": "string"
}
]
},
{
- "id": "CSSRule",
- "description": "CSS rule representation.",
- "type": "object",
- "properties": [
- {
- "name": "styleSheetId",
- "description": "The css style sheet identifier (absent for user agent stylesheet and user-specified\nstylesheet rules) this rule came from.",
- "optional": true,
- "$ref": "StyleSheetId"
- },
- {
- "name": "selectorList",
- "description": "Rule selector data.",
- "$ref": "SelectorList"
- },
+ "name": "getBrowserCommandLine",
+ "description": "Returns the command line switches for the browser process if, and only if\n--enable-automation is on the commandline.",
+ "experimental": true,
+ "returns": [
{
- "name": "nestingSelectors",
- "description": "Array of selectors from ancestor style rules, sorted by distance from the current rule.",
- "experimental": true,
- "optional": true,
+ "name": "arguments",
+ "description": "Commandline parameters",
"type": "array",
"items": {
"type": "string"
}
- },
- {
- "name": "origin",
- "description": "Parent stylesheet's origin.",
- "$ref": "StyleSheetOrigin"
- },
- {
- "name": "style",
- "description": "Associated style declaration.",
- "$ref": "CSSStyle"
- },
+ }
+ ]
+ },
+ {
+ "name": "getHistograms",
+ "description": "Get Chrome histograms.",
+ "experimental": true,
+ "parameters": [
{
- "name": "media",
- "description": "Media list array (for rules involving media queries). The array enumerates media queries\nstarting with the innermost one, going outwards.",
+ "name": "query",
+ "description": "Requested substring in name. Only histograms which have query as a\nsubstring in their name are extracted. An empty or absent query returns\nall histograms.",
"optional": true,
- "type": "array",
- "items": {
- "$ref": "CSSMedia"
- }
+ "type": "string"
},
{
- "name": "containerQueries",
- "description": "Container query list array (for rules involving container queries).\nThe array enumerates container queries starting with the innermost one, going outwards.",
- "experimental": true,
+ "name": "delta",
+ "description": "If true, retrieve delta since last delta call.",
"optional": true,
+ "type": "boolean"
+ }
+ ],
+ "returns": [
+ {
+ "name": "histograms",
+ "description": "Histograms.",
"type": "array",
"items": {
- "$ref": "CSSContainerQuery"
+ "$ref": "Histogram"
}
- },
- {
- "name": "supports",
- "description": "@supports CSS at-rule array.\nThe array enumerates @supports at-rules starting with the innermost one, going outwards.",
- "experimental": true,
- "optional": true,
- "type": "array",
- "items": {
- "$ref": "CSSSupports"
- }
- },
- {
- "name": "layers",
- "description": "Cascade layer array. Contains the layer hierarchy that this rule belongs to starting\nwith the innermost layer and going outwards.",
- "experimental": true,
- "optional": true,
- "type": "array",
- "items": {
- "$ref": "CSSLayer"
- }
- },
+ }
+ ]
+ },
+ {
+ "name": "getHistogram",
+ "description": "Get a Chrome histogram by name.",
+ "experimental": true,
+ "parameters": [
{
- "name": "scopes",
- "description": "@scope CSS at-rule array.\nThe array enumerates @scope at-rules starting with the innermost one, going outwards.",
- "experimental": true,
- "optional": true,
- "type": "array",
- "items": {
- "$ref": "CSSScope"
- }
+ "name": "name",
+ "description": "Requested histogram name.",
+ "type": "string"
},
{
- "name": "ruleTypes",
- "description": "The array keeps the types of ancestor CSSRules from the innermost going outwards.",
- "experimental": true,
+ "name": "delta",
+ "description": "If true, retrieve delta since last delta call.",
"optional": true,
- "type": "array",
- "items": {
- "$ref": "CSSRuleType"
- }
- },
+ "type": "boolean"
+ }
+ ],
+ "returns": [
{
- "name": "startingStyles",
- "description": "@starting-style CSS at-rule array.\nThe array enumerates @starting-style at-rules starting with the innermost one, going outwards.",
- "experimental": true,
- "optional": true,
- "type": "array",
- "items": {
- "$ref": "CSSStartingStyle"
- }
+ "name": "histogram",
+ "description": "Histogram.",
+ "$ref": "Histogram"
}
]
},
{
- "id": "CSSRuleType",
- "description": "Enum indicating the type of a CSS rule, used to represent the order of a style rule's ancestors.\nThis list only contains rule types that are collected during the ancestor rule collection.",
+ "name": "getWindowBounds",
+ "description": "Get position and size of the browser window.",
"experimental": true,
- "type": "string",
- "enum": [
- "MediaRule",
- "SupportsRule",
- "ContainerRule",
- "LayerRule",
- "ScopeRule",
- "StyleRule",
- "StartingStyleRule"
+ "parameters": [
+ {
+ "name": "windowId",
+ "description": "Browser window id.",
+ "$ref": "WindowID"
+ }
+ ],
+ "returns": [
+ {
+ "name": "bounds",
+ "description": "Bounds information of the window. When window state is 'minimized', the restored window\nposition and size are returned.",
+ "$ref": "Bounds"
+ }
]
},
{
- "id": "RuleUsage",
- "description": "CSS coverage information.",
- "type": "object",
- "properties": [
- {
- "name": "styleSheetId",
- "description": "The css style sheet identifier (absent for user agent stylesheet and user-specified\nstylesheet rules) this rule came from.",
- "$ref": "StyleSheetId"
- },
+ "name": "getWindowForTarget",
+ "description": "Get the browser window that contains the devtools target.",
+ "experimental": true,
+ "parameters": [
{
- "name": "startOffset",
- "description": "Offset of the start of the rule (including selector) from the beginning of the stylesheet.",
- "type": "number"
- },
+ "name": "targetId",
+ "description": "Devtools agent host id. If called as a part of the session, associated targetId is used.",
+ "optional": true,
+ "$ref": "Target.TargetID"
+ }
+ ],
+ "returns": [
{
- "name": "endOffset",
- "description": "Offset of the end of the rule body from the beginning of the stylesheet.",
- "type": "number"
+ "name": "windowId",
+ "description": "Browser window id.",
+ "$ref": "WindowID"
},
{
- "name": "used",
- "description": "Indicates whether the rule was actually used by some element in the page.",
- "type": "boolean"
+ "name": "bounds",
+ "description": "Bounds information of the window. When window state is 'minimized', the restored window\nposition and size are returned.",
+ "$ref": "Bounds"
}
]
},
{
- "id": "SourceRange",
- "description": "Text range within a resource. All numbers are zero-based.",
- "type": "object",
- "properties": [
+ "name": "setWindowBounds",
+ "description": "Set position and/or size of the browser window.",
+ "experimental": true,
+ "parameters": [
{
- "name": "startLine",
- "description": "Start line of range.",
- "type": "integer"
+ "name": "windowId",
+ "description": "Browser window id.",
+ "$ref": "WindowID"
},
{
- "name": "startColumn",
- "description": "Start column of range (inclusive).",
- "type": "integer"
+ "name": "bounds",
+ "description": "New window bounds. The 'minimized', 'maximized' and 'fullscreen' states cannot be combined\nwith 'left', 'top', 'width' or 'height'. Leaves unspecified fields unchanged.",
+ "$ref": "Bounds"
+ }
+ ]
+ },
+ {
+ "name": "setContentsSize",
+ "description": "Set size of the browser contents resizing browser window as necessary.",
+ "experimental": true,
+ "parameters": [
+ {
+ "name": "windowId",
+ "description": "Browser window id.",
+ "$ref": "WindowID"
},
{
- "name": "endLine",
- "description": "End line of range",
+ "name": "width",
+ "description": "The window contents width in DIP. Assumes current width if omitted.\nMust be specified if 'height' is omitted.",
+ "optional": true,
"type": "integer"
},
{
- "name": "endColumn",
- "description": "End column of range (exclusive).",
+ "name": "height",
+ "description": "The window contents height in DIP. Assumes current height if omitted.\nMust be specified if 'width' is omitted.",
+ "optional": true,
"type": "integer"
}
]
},
{
- "id": "ShorthandEntry",
- "type": "object",
- "properties": [
- {
- "name": "name",
- "description": "Shorthand name.",
- "type": "string"
- },
+ "name": "setDockTile",
+ "description": "Set dock tile details, platform-specific.",
+ "experimental": true,
+ "parameters": [
{
- "name": "value",
- "description": "Shorthand value.",
+ "name": "badgeLabel",
+ "optional": true,
"type": "string"
},
{
- "name": "important",
- "description": "Whether the property has \"!important\" annotation (implies `false` if absent).",
+ "name": "image",
+ "description": "Png encoded image. (Encoded as a base64 string when passed over JSON)",
"optional": true,
- "type": "boolean"
+ "type": "string"
}
]
},
{
- "id": "CSSComputedStyleProperty",
- "type": "object",
- "properties": [
+ "name": "executeBrowserCommand",
+ "description": "Invoke custom browser commands used by telemetry.",
+ "experimental": true,
+ "parameters": [
{
- "name": "name",
- "description": "Computed style property name.",
- "type": "string"
- },
+ "name": "commandId",
+ "$ref": "BrowserCommandId"
+ }
+ ]
+ },
+ {
+ "name": "addPrivacySandboxEnrollmentOverride",
+ "description": "Allows a site to use privacy sandbox features that require enrollment\nwithout the site actually being enrolled. Only supported on page targets.",
+ "parameters": [
{
- "name": "value",
- "description": "Computed style property value.",
+ "name": "url",
"type": "string"
}
]
},
{
- "id": "CSSStyle",
- "description": "CSS style representation.",
- "type": "object",
- "properties": [
- {
- "name": "styleSheetId",
- "description": "The css style sheet identifier (absent for user agent stylesheet and user-specified\nstylesheet rules) this rule came from.",
- "optional": true,
- "$ref": "StyleSheetId"
- },
+ "name": "addPrivacySandboxCoordinatorKeyConfig",
+ "description": "Configures encryption keys used with a given privacy sandbox API to talk\nto a trusted coordinator. Since this is intended for test automation only,\ncoordinatorOrigin must be a .test domain. No existing coordinator\nconfiguration for the origin may exist.",
+ "parameters": [
{
- "name": "cssProperties",
- "description": "CSS properties in the style.",
- "type": "array",
- "items": {
- "$ref": "CSSProperty"
- }
+ "name": "api",
+ "$ref": "PrivacySandboxAPI"
},
{
- "name": "shorthandEntries",
- "description": "Computed values for all shorthands found in the style.",
- "type": "array",
- "items": {
- "$ref": "ShorthandEntry"
- }
+ "name": "coordinatorOrigin",
+ "type": "string"
},
{
- "name": "cssText",
- "description": "Style declaration text (if available).",
- "optional": true,
+ "name": "keyConfig",
"type": "string"
},
{
- "name": "range",
- "description": "Style declaration range in the enclosing stylesheet (if available).",
+ "name": "browserContextId",
+ "description": "BrowserContext to perform the action in. When omitted, default browser\ncontext is used.",
"optional": true,
- "$ref": "SourceRange"
+ "$ref": "BrowserContextID"
}
]
- },
+ }
+ ],
+ "events": [
{
- "id": "CSSProperty",
- "description": "CSS property declaration data.",
- "type": "object",
- "properties": [
+ "name": "downloadWillBegin",
+ "description": "Fired when page is about to start a download.",
+ "experimental": true,
+ "parameters": [
{
- "name": "name",
- "description": "The property name.",
- "type": "string"
+ "name": "frameId",
+ "description": "Id of the frame that caused the download to begin.",
+ "$ref": "Page.FrameId"
},
{
- "name": "value",
- "description": "The property value.",
+ "name": "guid",
+ "description": "Global unique identifier of the download.",
"type": "string"
},
{
- "name": "important",
- "description": "Whether the property has \"!important\" annotation (implies `false` if absent).",
- "optional": true,
- "type": "boolean"
+ "name": "url",
+ "description": "URL of the resource being downloaded.",
+ "type": "string"
},
{
- "name": "implicit",
- "description": "Whether the property is implicit (implies `false` if absent).",
- "optional": true,
- "type": "boolean"
- },
+ "name": "suggestedFilename",
+ "description": "Suggested file name of the resource (the actual name of the file saved on disk may differ).",
+ "type": "string"
+ }
+ ]
+ },
+ {
+ "name": "downloadProgress",
+ "description": "Fired when download makes progress. Last call has |done| == true.",
+ "experimental": true,
+ "parameters": [
{
- "name": "text",
- "description": "The full property text as specified in the style.",
- "optional": true,
+ "name": "guid",
+ "description": "Global unique identifier of the download.",
"type": "string"
},
{
- "name": "parsedOk",
- "description": "Whether the property is understood by the browser (implies `true` if absent).",
- "optional": true,
- "type": "boolean"
+ "name": "totalBytes",
+ "description": "Total expected bytes to download.",
+ "type": "number"
},
{
- "name": "disabled",
- "description": "Whether the property is disabled by the user (present for source-based properties only).",
- "optional": true,
- "type": "boolean"
+ "name": "receivedBytes",
+ "description": "Total bytes received.",
+ "type": "number"
},
{
- "name": "range",
- "description": "The entire property range in the enclosing style declaration (if available).",
- "optional": true,
- "$ref": "SourceRange"
+ "name": "state",
+ "description": "Download status.",
+ "type": "string",
+ "enum": [
+ "inProgress",
+ "completed",
+ "canceled"
+ ]
},
{
- "name": "longhandProperties",
- "description": "Parsed longhand components of this property if it is a shorthand.\nThis field will be empty if the given property is not a shorthand.",
+ "name": "filePath",
+ "description": "If download is \"completed\", provides the path of the downloaded file.\nDepending on the platform, it is not guaranteed to be set, nor the file\nis guaranteed to exist.",
"experimental": true,
"optional": true,
- "type": "array",
- "items": {
- "$ref": "CSSProperty"
- }
+ "type": "string"
}
]
+ }
+ ]
+ },
+ {
+ "domain": "CSS",
+ "description": "This domain exposes CSS read/write operations. All CSS objects (stylesheets, rules, and styles)\nhave an associated `id` used in subsequent operations on the related object. Each object type has\na specific `id` structure, and those are not interchangeable between objects of different kinds.\nCSS objects can be loaded using the `get*ForNode()` calls (which accept a DOM node id). A client\ncan also keep track of stylesheets via the `styleSheetAdded`/`styleSheetRemoved` events and\nsubsequently load the required stylesheet contents using the `getStyleSheet[Text]()` methods.",
+ "experimental": true,
+ "dependencies": [
+ "DOM",
+ "Page"
+ ],
+ "types": [
+ {
+ "id": "StyleSheetOrigin",
+ "description": "Stylesheet type: \"injected\" for stylesheets injected via extension, \"user-agent\" for user-agent\nstylesheets, \"inspector\" for stylesheets created by the inspector (i.e. those holding the \"via\ninspector\" rules), \"regular\" for regular stylesheets.",
+ "type": "string",
+ "enum": [
+ "injected",
+ "user-agent",
+ "inspector",
+ "regular"
+ ]
},
{
- "id": "CSSMedia",
- "description": "CSS media rule descriptor.",
+ "id": "PseudoElementMatches",
+ "description": "CSS rule collection for a single pseudo style.",
"type": "object",
"properties": [
{
- "name": "text",
- "description": "Media query text.",
- "type": "string"
- },
- {
- "name": "source",
- "description": "Source of the media query: \"mediaRule\" if specified by a @media rule, \"importRule\" if\nspecified by an @import rule, \"linkedSheet\" if specified by a \"media\" attribute in a linked\nstylesheet's LINK tag, \"inlineSheet\" if specified by a \"media\" attribute in an inline\nstylesheet's STYLE tag.",
- "type": "string",
- "enum": [
- "mediaRule",
- "importRule",
- "linkedSheet",
- "inlineSheet"
- ]
+ "name": "pseudoType",
+ "description": "Pseudo element type.",
+ "$ref": "DOM.PseudoType"
},
{
- "name": "sourceURL",
- "description": "URL of the document containing the media query description.",
+ "name": "pseudoIdentifier",
+ "description": "Pseudo element custom ident.",
"optional": true,
"type": "string"
},
{
- "name": "range",
- "description": "The associated rule (@media or @import) header range in the enclosing stylesheet (if\navailable).",
+ "name": "matches",
+ "description": "Matches of CSS rules applicable to the pseudo style.",
+ "type": "array",
+ "items": {
+ "$ref": "RuleMatch"
+ }
+ }
+ ]
+ },
+ {
+ "id": "CSSAnimationStyle",
+ "description": "CSS style coming from animations with the name of the animation.",
+ "type": "object",
+ "properties": [
+ {
+ "name": "name",
+ "description": "The name of the animation.",
"optional": true,
- "$ref": "SourceRange"
+ "type": "string"
},
{
- "name": "styleSheetId",
- "description": "Identifier of the stylesheet containing this object (if exists).",
+ "name": "style",
+ "description": "The style coming from the animation.",
+ "$ref": "CSSStyle"
+ }
+ ]
+ },
+ {
+ "id": "InheritedStyleEntry",
+ "description": "Inherited CSS rule collection from ancestor node.",
+ "type": "object",
+ "properties": [
+ {
+ "name": "inlineStyle",
+ "description": "The ancestor node's inline style, if any, in the style inheritance chain.",
"optional": true,
- "$ref": "StyleSheetId"
+ "$ref": "CSSStyle"
},
{
- "name": "mediaList",
- "description": "Array of media queries.",
- "optional": true,
+ "name": "matchedCSSRules",
+ "description": "Matches of CSS rules matching the ancestor node in the style inheritance chain.",
"type": "array",
"items": {
- "$ref": "MediaQuery"
+ "$ref": "RuleMatch"
}
}
]
},
{
- "id": "MediaQuery",
- "description": "Media query descriptor.",
+ "id": "InheritedAnimatedStyleEntry",
+ "description": "Inherited CSS style collection for animated styles from ancestor node.",
"type": "object",
"properties": [
{
- "name": "expressions",
- "description": "Array of media query expressions.",
+ "name": "animationStyles",
+ "description": "Styles coming from the animations of the ancestor, if any, in the style inheritance chain.",
+ "optional": true,
"type": "array",
"items": {
- "$ref": "MediaQueryExpression"
+ "$ref": "CSSAnimationStyle"
}
},
{
- "name": "active",
- "description": "Whether the media query condition is satisfied.",
- "type": "boolean"
+ "name": "transitionsStyle",
+ "description": "The style coming from the transitions of the ancestor, if any, in the style inheritance chain.",
+ "optional": true,
+ "$ref": "CSSStyle"
}
]
},
{
- "id": "MediaQueryExpression",
- "description": "Media query expression descriptor.",
+ "id": "InheritedPseudoElementMatches",
+ "description": "Inherited pseudo element matches from pseudos of an ancestor node.",
"type": "object",
"properties": [
{
- "name": "value",
- "description": "Media query expression value.",
- "type": "number"
- },
- {
- "name": "unit",
- "description": "Media query expression units.",
- "type": "string"
- },
- {
- "name": "feature",
- "description": "Media query expression feature.",
- "type": "string"
- },
+ "name": "pseudoElements",
+ "description": "Matches of pseudo styles from the pseudos of an ancestor node.",
+ "type": "array",
+ "items": {
+ "$ref": "PseudoElementMatches"
+ }
+ }
+ ]
+ },
+ {
+ "id": "RuleMatch",
+ "description": "Match data for a CSS rule.",
+ "type": "object",
+ "properties": [
{
- "name": "valueRange",
- "description": "The associated range of the value text in the enclosing stylesheet (if available).",
- "optional": true,
- "$ref": "SourceRange"
+ "name": "rule",
+ "description": "CSS rule in the match.",
+ "$ref": "CSSRule"
},
{
- "name": "computedLength",
- "description": "Computed length of media query expression (if applicable).",
- "optional": true,
- "type": "number"
+ "name": "matchingSelectors",
+ "description": "Matching selector indices in the rule's selectorList selectors (0-based).",
+ "type": "array",
+ "items": {
+ "type": "integer"
+ }
}
]
},
{
- "id": "CSSContainerQuery",
- "description": "CSS container query rule descriptor.",
- "experimental": true,
+ "id": "Value",
+ "description": "Data for a simple selector (these are delimited by commas in a selector list).",
"type": "object",
"properties": [
{
"name": "text",
- "description": "Container query text.",
+ "description": "Value text.",
"type": "string"
},
{
"name": "range",
- "description": "The associated rule header range in the enclosing stylesheet (if\navailable).",
+ "description": "Value range in the underlying resource (if available).",
"optional": true,
"$ref": "SourceRange"
},
{
- "name": "styleSheetId",
- "description": "Identifier of the stylesheet containing this object (if exists).",
+ "name": "specificity",
+ "description": "Specificity of the selector.",
+ "experimental": true,
"optional": true,
- "$ref": "StyleSheetId"
- },
+ "$ref": "Specificity"
+ }
+ ]
+ },
+ {
+ "id": "Specificity",
+ "description": "Specificity:\nhttps://drafts.csswg.org/selectors/#specificity-rules",
+ "experimental": true,
+ "type": "object",
+ "properties": [
{
- "name": "name",
- "description": "Optional name for the container.",
- "optional": true,
- "type": "string"
+ "name": "a",
+ "description": "The a component, which represents the number of ID selectors.",
+ "type": "integer"
},
{
- "name": "physicalAxes",
- "description": "Optional physical axes queried for the container.",
- "optional": true,
- "$ref": "DOM.PhysicalAxes"
- },
- {
- "name": "logicalAxes",
- "description": "Optional logical axes queried for the container.",
- "optional": true,
- "$ref": "DOM.LogicalAxes"
+ "name": "b",
+ "description": "The b component, which represents the number of class selectors, attributes selectors, and\npseudo-classes.",
+ "type": "integer"
},
{
- "name": "queriesScrollState",
- "description": "true if the query contains scroll-state() queries.",
- "optional": true,
- "type": "boolean"
+ "name": "c",
+ "description": "The c component, which represents the number of type selectors and pseudo-elements.",
+ "type": "integer"
}
]
},
{
- "id": "CSSSupports",
- "description": "CSS Supports at-rule descriptor.",
- "experimental": true,
+ "id": "SelectorList",
+ "description": "Selector list data.",
"type": "object",
"properties": [
{
- "name": "text",
- "description": "Supports rule text.",
- "type": "string"
- },
- {
- "name": "active",
- "description": "Whether the supports condition is satisfied.",
- "type": "boolean"
- },
- {
- "name": "range",
- "description": "The associated rule header range in the enclosing stylesheet (if\navailable).",
- "optional": true,
- "$ref": "SourceRange"
+ "name": "selectors",
+ "description": "Selectors in the list.",
+ "type": "array",
+ "items": {
+ "$ref": "Value"
+ }
},
{
- "name": "styleSheetId",
- "description": "Identifier of the stylesheet containing this object (if exists).",
- "optional": true,
- "$ref": "StyleSheetId"
+ "name": "text",
+ "description": "Rule selector text.",
+ "type": "string"
}
]
},
{
- "id": "CSSScope",
- "description": "CSS Scope at-rule descriptor.",
- "experimental": true,
+ "id": "CSSStyleSheetHeader",
+ "description": "CSS stylesheet metainformation.",
"type": "object",
"properties": [
{
- "name": "text",
- "description": "Scope rule text.",
- "type": "string"
+ "name": "styleSheetId",
+ "description": "The stylesheet identifier.",
+ "$ref": "DOM.StyleSheetId"
},
{
- "name": "range",
- "description": "The associated rule header range in the enclosing stylesheet (if\navailable).",
- "optional": true,
- "$ref": "SourceRange"
+ "name": "frameId",
+ "description": "Owner frame identifier.",
+ "$ref": "Page.FrameId"
},
{
- "name": "styleSheetId",
- "description": "Identifier of the stylesheet containing this object (if exists).",
- "optional": true,
- "$ref": "StyleSheetId"
- }
- ]
- },
- {
- "id": "CSSLayer",
- "description": "CSS Layer at-rule descriptor.",
- "experimental": true,
- "type": "object",
- "properties": [
- {
- "name": "text",
- "description": "Layer name.",
+ "name": "sourceURL",
+ "description": "Stylesheet resource URL. Empty if this is a constructed stylesheet created using\nnew CSSStyleSheet() (but non-empty if this is a constructed stylesheet imported\nas a CSS module script).",
"type": "string"
},
{
- "name": "range",
- "description": "The associated rule header range in the enclosing stylesheet (if\navailable).",
+ "name": "sourceMapURL",
+ "description": "URL of source map associated with the stylesheet (if any).",
"optional": true,
- "$ref": "SourceRange"
+ "type": "string"
},
{
- "name": "styleSheetId",
- "description": "Identifier of the stylesheet containing this object (if exists).",
- "optional": true,
- "$ref": "StyleSheetId"
- }
- ]
- },
- {
- "id": "CSSStartingStyle",
- "description": "CSS Starting Style at-rule descriptor.",
- "experimental": true,
- "type": "object",
- "properties": [
+ "name": "origin",
+ "description": "Stylesheet origin.",
+ "$ref": "StyleSheetOrigin"
+ },
{
- "name": "range",
- "description": "The associated rule header range in the enclosing stylesheet (if\navailable).",
- "optional": true,
- "$ref": "SourceRange"
+ "name": "title",
+ "description": "Stylesheet title.",
+ "type": "string"
},
{
- "name": "styleSheetId",
- "description": "Identifier of the stylesheet containing this object (if exists).",
+ "name": "ownerNode",
+ "description": "The backend id for the owner node of the stylesheet.",
"optional": true,
- "$ref": "StyleSheetId"
- }
- ]
- },
- {
- "id": "CSSLayerData",
- "description": "CSS Layer data.",
- "experimental": true,
- "type": "object",
- "properties": [
+ "$ref": "DOM.BackendNodeId"
+ },
{
- "name": "name",
- "description": "Layer name.",
- "type": "string"
+ "name": "disabled",
+ "description": "Denotes whether the stylesheet is disabled.",
+ "type": "boolean"
},
{
- "name": "subLayers",
- "description": "Direct sub-layers",
+ "name": "hasSourceURL",
+ "description": "Whether the sourceURL field value comes from the sourceURL comment.",
"optional": true,
- "type": "array",
- "items": {
- "$ref": "CSSLayerData"
- }
+ "type": "boolean"
},
{
- "name": "order",
- "description": "Layer order. The order determines the order of the layer in the cascade order.\nA higher number has higher priority in the cascade order.",
- "type": "number"
- }
- ]
- },
- {
- "id": "PlatformFontUsage",
- "description": "Information about amount of glyphs that were rendered with given font.",
- "type": "object",
- "properties": [
- {
- "name": "familyName",
- "description": "Font's family name reported by platform.",
- "type": "string"
+ "name": "isInline",
+ "description": "Whether this stylesheet is created for STYLE tag by parser. This flag is not set for\ndocument.written STYLE tags.",
+ "type": "boolean"
},
{
- "name": "postScriptName",
- "description": "Font's PostScript name reported by platform.",
- "type": "string"
+ "name": "isMutable",
+ "description": "Whether this stylesheet is mutable. Inline stylesheets become mutable\nafter they have been modified via CSSOM API.\n`` element's stylesheets become mutable only if DevTools modifies them.\nConstructed stylesheets (new CSSStyleSheet()) are mutable immediately after creation.",
+ "type": "boolean"
},
{
- "name": "isCustomFont",
- "description": "Indicates if the font was downloaded or resolved locally.",
+ "name": "isConstructed",
+ "description": "True if this stylesheet is created through new CSSStyleSheet() or imported as a\nCSS module script.",
"type": "boolean"
},
{
- "name": "glyphCount",
- "description": "Amount of glyphs that were rendered with this font.",
+ "name": "startLine",
+ "description": "Line offset of the stylesheet within the resource (zero based).",
"type": "number"
- }
- ]
- },
- {
- "id": "FontVariationAxis",
- "description": "Information about font variation axes for variable fonts",
- "type": "object",
- "properties": [
- {
- "name": "tag",
- "description": "The font-variation-setting tag (a.k.a. \"axis tag\").",
- "type": "string"
},
{
- "name": "name",
- "description": "Human-readable variation name in the default language (normally, \"en\").",
- "type": "string"
+ "name": "startColumn",
+ "description": "Column offset of the stylesheet within the resource (zero based).",
+ "type": "number"
},
{
- "name": "minValue",
- "description": "The minimum value (inclusive) the font supports for this tag.",
+ "name": "length",
+ "description": "Size of the content (in characters).",
"type": "number"
},
{
- "name": "maxValue",
- "description": "The maximum value (inclusive) the font supports for this tag.",
+ "name": "endLine",
+ "description": "Line offset of the end of the stylesheet within the resource (zero based).",
"type": "number"
},
{
- "name": "defaultValue",
- "description": "The default value.",
+ "name": "endColumn",
+ "description": "Column offset of the end of the stylesheet within the resource (zero based).",
"type": "number"
+ },
+ {
+ "name": "loadingFailed",
+ "description": "If the style sheet was loaded from a network resource, this indicates when the resource failed to load",
+ "experimental": true,
+ "optional": true,
+ "type": "boolean"
}
]
},
{
- "id": "FontFace",
- "description": "Properties of a web font: https://www.w3.org/TR/2008/REC-CSS2-20080411/fonts.html#font-descriptions\nand additional information such as platformFontFamily and fontVariationAxes.",
+ "id": "CSSRule",
+ "description": "CSS rule representation.",
"type": "object",
"properties": [
{
- "name": "fontFamily",
- "description": "The font-family.",
- "type": "string"
+ "name": "styleSheetId",
+ "description": "The css style sheet identifier (absent for user agent stylesheet and user-specified\nstylesheet rules) this rule came from.",
+ "optional": true,
+ "$ref": "DOM.StyleSheetId"
},
{
- "name": "fontStyle",
- "description": "The font-style.",
- "type": "string"
+ "name": "selectorList",
+ "description": "Rule selector data.",
+ "$ref": "SelectorList"
},
{
- "name": "fontVariant",
- "description": "The font-variant.",
- "type": "string"
+ "name": "nestingSelectors",
+ "description": "Array of selectors from ancestor style rules, sorted by distance from the current rule.",
+ "experimental": true,
+ "optional": true,
+ "type": "array",
+ "items": {
+ "type": "string"
+ }
},
{
- "name": "fontWeight",
- "description": "The font-weight.",
- "type": "string"
+ "name": "origin",
+ "description": "Parent stylesheet's origin.",
+ "$ref": "StyleSheetOrigin"
},
{
- "name": "fontStretch",
- "description": "The font-stretch.",
- "type": "string"
+ "name": "style",
+ "description": "Associated style declaration.",
+ "$ref": "CSSStyle"
},
{
- "name": "fontDisplay",
- "description": "The font-display.",
- "type": "string"
+ "name": "originTreeScopeNodeId",
+ "description": "The BackendNodeId of the DOM node that constitutes the origin tree scope of this rule.",
+ "experimental": true,
+ "optional": true,
+ "$ref": "DOM.BackendNodeId"
},
{
- "name": "unicodeRange",
- "description": "The unicode-range.",
- "type": "string"
+ "name": "media",
+ "description": "Media list array (for rules involving media queries). The array enumerates media queries\nstarting with the innermost one, going outwards.",
+ "optional": true,
+ "type": "array",
+ "items": {
+ "$ref": "CSSMedia"
+ }
},
{
- "name": "src",
- "description": "The src.",
- "type": "string"
+ "name": "containerQueries",
+ "description": "Container query list array (for rules involving container queries).\nThe array enumerates container queries starting with the innermost one, going outwards.",
+ "experimental": true,
+ "optional": true,
+ "type": "array",
+ "items": {
+ "$ref": "CSSContainerQuery"
+ }
},
{
- "name": "platformFontFamily",
- "description": "The resolved platform font family",
- "type": "string"
+ "name": "supports",
+ "description": "@supports CSS at-rule array.\nThe array enumerates @supports at-rules starting with the innermost one, going outwards.",
+ "experimental": true,
+ "optional": true,
+ "type": "array",
+ "items": {
+ "$ref": "CSSSupports"
+ }
},
{
- "name": "fontVariationAxes",
- "description": "Available variation settings (a.k.a. \"axes\").",
+ "name": "layers",
+ "description": "Cascade layer array. Contains the layer hierarchy that this rule belongs to starting\nwith the innermost layer and going outwards.",
+ "experimental": true,
"optional": true,
"type": "array",
"items": {
- "$ref": "FontVariationAxis"
+ "$ref": "CSSLayer"
}
- }
- ]
- },
- {
- "id": "CSSTryRule",
- "description": "CSS try rule representation.",
- "type": "object",
- "properties": [
+ },
{
- "name": "styleSheetId",
- "description": "The css style sheet identifier (absent for user agent stylesheet and user-specified\nstylesheet rules) this rule came from.",
+ "name": "scopes",
+ "description": "@scope CSS at-rule array.\nThe array enumerates @scope at-rules starting with the innermost one, going outwards.",
+ "experimental": true,
"optional": true,
- "$ref": "StyleSheetId"
+ "type": "array",
+ "items": {
+ "$ref": "CSSScope"
+ }
},
{
- "name": "origin",
- "description": "Parent stylesheet's origin.",
- "$ref": "StyleSheetOrigin"
+ "name": "ruleTypes",
+ "description": "The array keeps the types of ancestor CSSRules from the innermost going outwards.",
+ "experimental": true,
+ "optional": true,
+ "type": "array",
+ "items": {
+ "$ref": "CSSRuleType"
+ }
},
{
- "name": "style",
- "description": "Associated style declaration.",
- "$ref": "CSSStyle"
+ "name": "startingStyles",
+ "description": "@starting-style CSS at-rule array.\nThe array enumerates @starting-style at-rules starting with the innermost one, going outwards.",
+ "experimental": true,
+ "optional": true,
+ "type": "array",
+ "items": {
+ "$ref": "CSSStartingStyle"
+ }
+ },
+ {
+ "name": "navigations",
+ "description": "@navigation CSS at-rule array.\nThe array enumerates @navigation at-rules starting with the innermost one, going outwards.",
+ "experimental": true,
+ "optional": true,
+ "type": "array",
+ "items": {
+ "$ref": "CSSNavigation"
+ }
}
]
},
{
- "id": "CSSPositionTryRule",
- "description": "CSS @position-try rule representation.",
+ "id": "CSSRuleType",
+ "description": "Enum indicating the type of a CSS rule, used to represent the order of a style rule's ancestors.\nThis list only contains rule types that are collected during the ancestor rule collection.",
+ "experimental": true,
+ "type": "string",
+ "enum": [
+ "MediaRule",
+ "SupportsRule",
+ "ContainerRule",
+ "LayerRule",
+ "ScopeRule",
+ "StyleRule",
+ "StartingStyleRule",
+ "NavigationRule"
+ ]
+ },
+ {
+ "id": "RuleUsage",
+ "description": "CSS coverage information.",
"type": "object",
"properties": [
- {
- "name": "name",
- "description": "The prelude dashed-ident name",
- "$ref": "Value"
- },
{
"name": "styleSheetId",
"description": "The css style sheet identifier (absent for user agent stylesheet and user-specified\nstylesheet rules) this rule came from.",
- "optional": true,
- "$ref": "StyleSheetId"
+ "$ref": "DOM.StyleSheetId"
},
{
- "name": "origin",
- "description": "Parent stylesheet's origin.",
- "$ref": "StyleSheetOrigin"
+ "name": "startOffset",
+ "description": "Offset of the start of the rule (including selector) from the beginning of the stylesheet.",
+ "type": "number"
},
{
- "name": "style",
- "description": "Associated style declaration.",
- "$ref": "CSSStyle"
+ "name": "endOffset",
+ "description": "Offset of the end of the rule body from the beginning of the stylesheet.",
+ "type": "number"
},
{
- "name": "active",
+ "name": "used",
+ "description": "Indicates whether the rule was actually used by some element in the page.",
"type": "boolean"
}
]
},
{
- "id": "CSSKeyframesRule",
- "description": "CSS keyframes rule representation.",
+ "id": "SourceRange",
+ "description": "Text range within a resource. All numbers are zero-based.",
"type": "object",
"properties": [
{
- "name": "animationName",
- "description": "Animation name.",
- "$ref": "Value"
+ "name": "startLine",
+ "description": "Start line of range.",
+ "type": "integer"
},
{
- "name": "keyframes",
- "description": "List of keyframes.",
- "type": "array",
- "items": {
- "$ref": "CSSKeyframeRule"
- }
+ "name": "startColumn",
+ "description": "Start column of range (inclusive).",
+ "type": "integer"
+ },
+ {
+ "name": "endLine",
+ "description": "End line of range",
+ "type": "integer"
+ },
+ {
+ "name": "endColumn",
+ "description": "End column of range (exclusive).",
+ "type": "integer"
}
]
},
{
- "id": "CSSPropertyRegistration",
- "description": "Representation of a custom property registration through CSS.registerProperty",
+ "id": "ShorthandEntry",
"type": "object",
"properties": [
{
- "name": "propertyName",
+ "name": "name",
+ "description": "Shorthand name.",
"type": "string"
},
{
- "name": "initialValue",
- "optional": true,
- "$ref": "Value"
+ "name": "value",
+ "description": "Shorthand value.",
+ "type": "string"
},
{
- "name": "inherits",
+ "name": "important",
+ "description": "Whether the property has \"!important\" annotation (implies `false` if absent).",
+ "optional": true,
"type": "boolean"
- },
- {
- "name": "syntax",
- "type": "string"
}
]
},
{
- "id": "CSSFontPaletteValuesRule",
- "description": "CSS font-palette-values rule representation.",
+ "id": "CSSComputedStyleProperty",
"type": "object",
"properties": [
{
- "name": "styleSheetId",
- "description": "The css style sheet identifier (absent for user agent stylesheet and user-specified\nstylesheet rules) this rule came from.",
- "optional": true,
- "$ref": "StyleSheetId"
- },
- {
- "name": "origin",
- "description": "Parent stylesheet's origin.",
- "$ref": "StyleSheetOrigin"
+ "name": "name",
+ "description": "Computed style property name.",
+ "type": "string"
},
{
- "name": "fontPaletteName",
- "description": "Associated font palette name.",
- "$ref": "Value"
- },
+ "name": "value",
+ "description": "Computed style property value.",
+ "type": "string"
+ }
+ ]
+ },
+ {
+ "id": "ComputedStyleExtraFields",
+ "experimental": true,
+ "type": "object",
+ "properties": [
{
- "name": "style",
- "description": "Associated style declaration.",
- "$ref": "CSSStyle"
+ "name": "isAppearanceBase",
+ "description": "Returns whether or not this node is being rendered with base appearance,\nwhich happens when it has its appearance property set to base/base-select\nor it is in the subtree of an element being rendered with base appearance.",
+ "type": "boolean"
}
]
},
{
- "id": "CSSPropertyRule",
- "description": "CSS property at-rule representation.",
+ "id": "CSSStyle",
+ "description": "CSS style representation.",
"type": "object",
"properties": [
{
"name": "styleSheetId",
"description": "The css style sheet identifier (absent for user agent stylesheet and user-specified\nstylesheet rules) this rule came from.",
"optional": true,
- "$ref": "StyleSheetId"
+ "$ref": "DOM.StyleSheetId"
},
{
- "name": "origin",
- "description": "Parent stylesheet's origin.",
- "$ref": "StyleSheetOrigin"
+ "name": "cssProperties",
+ "description": "CSS properties in the style.",
+ "type": "array",
+ "items": {
+ "$ref": "CSSProperty"
+ }
},
{
- "name": "propertyName",
- "description": "Associated property name.",
- "$ref": "Value"
+ "name": "shorthandEntries",
+ "description": "Computed values for all shorthands found in the style.",
+ "type": "array",
+ "items": {
+ "$ref": "ShorthandEntry"
+ }
},
{
- "name": "style",
- "description": "Associated style declaration.",
- "$ref": "CSSStyle"
+ "name": "cssText",
+ "description": "Style declaration text (if available).",
+ "optional": true,
+ "type": "string"
+ },
+ {
+ "name": "range",
+ "description": "Style declaration range in the enclosing stylesheet (if available).",
+ "optional": true,
+ "$ref": "SourceRange"
}
]
},
{
- "id": "CSSFunctionParameter",
- "description": "CSS function argument representation.",
+ "id": "CSSProperty",
+ "description": "CSS property declaration data.",
"type": "object",
"properties": [
{
"name": "name",
- "description": "The parameter name.",
+ "description": "The property name.",
"type": "string"
},
{
- "name": "type",
- "description": "The parameter type.",
+ "name": "value",
+ "description": "The property value.",
"type": "string"
- }
- ]
- },
- {
- "id": "CSSFunctionConditionNode",
- "description": "CSS function conditional block representation.",
- "type": "object",
- "properties": [
+ },
{
- "name": "media",
- "description": "Media query for this conditional block. Only one type of condition should be set.",
+ "name": "important",
+ "description": "Whether the property has \"!important\" annotation (implies `false` if absent).",
"optional": true,
- "$ref": "CSSMedia"
+ "type": "boolean"
},
{
- "name": "containerQueries",
- "description": "Container query for this conditional block. Only one type of condition should be set.",
+ "name": "implicit",
+ "description": "Whether the property is implicit (implies `false` if absent).",
"optional": true,
- "$ref": "CSSContainerQuery"
+ "type": "boolean"
},
{
- "name": "supports",
- "description": "@supports CSS at-rule condition. Only one type of condition should be set.",
+ "name": "text",
+ "description": "The full property text as specified in the style.",
"optional": true,
- "$ref": "CSSSupports"
+ "type": "string"
},
{
- "name": "children",
- "description": "Block body.",
- "type": "array",
- "items": {
- "$ref": "CSSFunctionNode"
- }
+ "name": "parsedOk",
+ "description": "Whether the property is understood by the browser (implies `true` if absent).",
+ "optional": true,
+ "type": "boolean"
},
{
- "name": "conditionText",
- "description": "The condition text.",
- "type": "string"
- }
- ]
- },
- {
- "id": "CSSFunctionNode",
- "description": "Section of the body of a CSS function rule.",
- "type": "object",
- "properties": [
+ "name": "disabled",
+ "description": "Whether the property is disabled by the user (present for source-based properties only).",
+ "optional": true,
+ "type": "boolean"
+ },
{
- "name": "condition",
- "description": "A conditional block. If set, style should not be set.",
+ "name": "range",
+ "description": "The entire property range in the enclosing style declaration (if available).",
"optional": true,
- "$ref": "CSSFunctionConditionNode"
+ "$ref": "SourceRange"
},
{
- "name": "style",
- "description": "Values set by this node. If set, condition should not be set.",
+ "name": "longhandProperties",
+ "description": "Parsed longhand components of this property if it is a shorthand.\nThis field will be empty if the given property is not a shorthand.",
+ "experimental": true,
"optional": true,
- "$ref": "CSSStyle"
+ "type": "array",
+ "items": {
+ "$ref": "CSSProperty"
+ }
}
]
},
{
- "id": "CSSFunctionRule",
- "description": "CSS function at-rule representation.",
+ "id": "CSSMedia",
+ "description": "CSS media rule descriptor.",
"type": "object",
"properties": [
{
- "name": "name",
- "description": "Name of the function.",
- "$ref": "Value"
+ "name": "text",
+ "description": "Media query text.",
+ "type": "string"
},
{
- "name": "styleSheetId",
- "description": "The css style sheet identifier (absent for user agent stylesheet and user-specified\nstylesheet rules) this rule came from.",
+ "name": "source",
+ "description": "Source of the media query: \"mediaRule\" if specified by a @media rule, \"importRule\" if\nspecified by an @import rule, \"linkedSheet\" if specified by a \"media\" attribute in a linked\nstylesheet's LINK tag, \"inlineSheet\" if specified by a \"media\" attribute in an inline\nstylesheet's STYLE tag.",
+ "type": "string",
+ "enum": [
+ "mediaRule",
+ "importRule",
+ "linkedSheet",
+ "inlineSheet"
+ ]
+ },
+ {
+ "name": "sourceURL",
+ "description": "URL of the document containing the media query description.",
"optional": true,
- "$ref": "StyleSheetId"
+ "type": "string"
},
{
- "name": "origin",
- "description": "Parent stylesheet's origin.",
- "$ref": "StyleSheetOrigin"
+ "name": "range",
+ "description": "The associated rule (@media or @import) header range in the enclosing stylesheet (if\navailable).",
+ "optional": true,
+ "$ref": "SourceRange"
},
{
- "name": "parameters",
- "description": "List of parameters.",
+ "name": "styleSheetId",
+ "description": "Identifier of the stylesheet containing this object (if exists).",
+ "optional": true,
+ "$ref": "DOM.StyleSheetId"
+ },
+ {
+ "name": "mediaList",
+ "description": "Array of media queries.",
+ "optional": true,
"type": "array",
"items": {
- "$ref": "CSSFunctionParameter"
+ "$ref": "MediaQuery"
}
- },
+ }
+ ]
+ },
+ {
+ "id": "MediaQuery",
+ "description": "Media query descriptor.",
+ "type": "object",
+ "properties": [
{
- "name": "children",
- "description": "Function body.",
+ "name": "expressions",
+ "description": "Array of media query expressions.",
"type": "array",
"items": {
- "$ref": "CSSFunctionNode"
+ "$ref": "MediaQueryExpression"
}
+ },
+ {
+ "name": "active",
+ "description": "Whether the media query condition is satisfied.",
+ "type": "boolean"
}
]
},
{
- "id": "CSSKeyframeRule",
- "description": "CSS keyframe rule representation.",
+ "id": "MediaQueryExpression",
+ "description": "Media query expression descriptor.",
"type": "object",
"properties": [
{
- "name": "styleSheetId",
- "description": "The css style sheet identifier (absent for user agent stylesheet and user-specified\nstylesheet rules) this rule came from.",
- "optional": true,
- "$ref": "StyleSheetId"
+ "name": "value",
+ "description": "Media query expression value.",
+ "type": "number"
},
{
- "name": "origin",
- "description": "Parent stylesheet's origin.",
- "$ref": "StyleSheetOrigin"
+ "name": "unit",
+ "description": "Media query expression units.",
+ "type": "string"
},
{
- "name": "keyText",
- "description": "Associated key text.",
- "$ref": "Value"
+ "name": "feature",
+ "description": "Media query expression feature.",
+ "type": "string"
},
{
- "name": "style",
- "description": "Associated style declaration.",
- "$ref": "CSSStyle"
+ "name": "valueRange",
+ "description": "The associated range of the value text in the enclosing stylesheet (if available).",
+ "optional": true,
+ "$ref": "SourceRange"
+ },
+ {
+ "name": "computedLength",
+ "description": "Computed length of media query expression (if applicable).",
+ "optional": true,
+ "type": "number"
}
]
},
{
- "id": "StyleDeclarationEdit",
- "description": "A descriptor of operation to mutate style declaration text.",
+ "id": "CSSContainerQuery",
+ "description": "CSS container query rule descriptor.",
+ "experimental": true,
"type": "object",
"properties": [
{
- "name": "styleSheetId",
- "description": "The css style sheet identifier.",
- "$ref": "StyleSheetId"
+ "name": "text",
+ "description": "Container query text.",
+ "type": "string"
},
{
"name": "range",
- "description": "The range of the style text in the enclosing stylesheet.",
+ "description": "The associated rule header range in the enclosing stylesheet (if\navailable).",
+ "optional": true,
"$ref": "SourceRange"
},
- {
- "name": "text",
- "description": "New style text.",
- "type": "string"
- }
- ]
- }
- ],
- "commands": [
- {
- "name": "addRule",
- "description": "Inserts a new rule with the given `ruleText` in a stylesheet with given `styleSheetId`, at the\nposition specified by `location`.",
- "parameters": [
{
"name": "styleSheetId",
- "description": "The css style sheet identifier where a new rule should be inserted.",
- "$ref": "StyleSheetId"
+ "description": "Identifier of the stylesheet containing this object (if exists).",
+ "optional": true,
+ "$ref": "DOM.StyleSheetId"
},
{
- "name": "ruleText",
- "description": "The text of a new rule.",
+ "name": "name",
+ "description": "Optional name for the container.",
+ "optional": true,
"type": "string"
},
{
- "name": "location",
- "description": "Text position of a new rule in the target style sheet.",
- "$ref": "SourceRange"
+ "name": "physicalAxes",
+ "description": "Optional physical axes queried for the container.",
+ "optional": true,
+ "$ref": "DOM.PhysicalAxes"
},
{
- "name": "nodeForPropertySyntaxValidation",
- "description": "NodeId for the DOM node in whose context custom property declarations for registered properties should be\nvalidated. If omitted, declarations in the new rule text can only be validated statically, which may produce\nincorrect results if the declaration contains a var() for example.",
- "experimental": true,
+ "name": "logicalAxes",
+ "description": "Optional logical axes queried for the container.",
"optional": true,
- "$ref": "DOM.NodeId"
- }
- ],
- "returns": [
- {
- "name": "rule",
- "description": "The newly created rule.",
- "$ref": "CSSRule"
- }
- ]
- },
- {
- "name": "collectClassNames",
- "description": "Returns all class names from specified stylesheet.",
- "parameters": [
+ "$ref": "DOM.LogicalAxes"
+ },
{
- "name": "styleSheetId",
- "$ref": "StyleSheetId"
- }
- ],
- "returns": [
+ "name": "queriesScrollState",
+ "description": "true if the query contains scroll-state() queries.",
+ "optional": true,
+ "type": "boolean"
+ },
{
- "name": "classNames",
- "description": "Class name list.",
- "type": "array",
- "items": {
- "type": "string"
- }
+ "name": "queriesAnchored",
+ "description": "true if the query contains anchored() queries.",
+ "optional": true,
+ "type": "boolean"
}
]
},
{
- "name": "createStyleSheet",
- "description": "Creates a new special \"via-inspector\" stylesheet in the frame with given `frameId`.",
- "parameters": [
+ "id": "CSSSupports",
+ "description": "CSS Supports at-rule descriptor.",
+ "experimental": true,
+ "type": "object",
+ "properties": [
{
- "name": "frameId",
- "description": "Identifier of the frame where \"via-inspector\" stylesheet should be created.",
- "$ref": "Page.FrameId"
+ "name": "text",
+ "description": "Supports rule text.",
+ "type": "string"
},
{
- "name": "force",
- "description": "If true, creates a new stylesheet for every call. If false,\nreturns a stylesheet previously created by a call with force=false\nfor the frame's document if it exists or creates a new stylesheet\n(default: false).",
- "optional": true,
+ "name": "active",
+ "description": "Whether the supports condition is satisfied.",
"type": "boolean"
- }
- ],
- "returns": [
- {
- "name": "styleSheetId",
- "description": "Identifier of the created \"via-inspector\" stylesheet.",
- "$ref": "StyleSheetId"
- }
- ]
- },
- {
- "name": "disable",
- "description": "Disables the CSS agent for the given page."
- },
- {
- "name": "enable",
- "description": "Enables the CSS agent for the given page. Clients should not assume that the CSS agent has been\nenabled until the result of this command is received."
- },
- {
- "name": "forcePseudoState",
- "description": "Ensures that the given node will have specified pseudo-classes whenever its style is computed by\nthe browser.",
- "parameters": [
- {
- "name": "nodeId",
- "description": "The element id for which to force the pseudo state.",
- "$ref": "DOM.NodeId"
},
{
- "name": "forcedPseudoClasses",
- "description": "Element pseudo classes to force when computing the element's style.",
- "type": "array",
- "items": {
- "type": "string"
- }
- }
- ]
- },
- {
- "name": "forceStartingStyle",
- "description": "Ensures that the given node is in its starting-style state.",
- "parameters": [
- {
- "name": "nodeId",
- "description": "The element id for which to force the starting-style state.",
- "$ref": "DOM.NodeId"
+ "name": "range",
+ "description": "The associated rule header range in the enclosing stylesheet (if\navailable).",
+ "optional": true,
+ "$ref": "SourceRange"
},
{
- "name": "forced",
- "description": "Boolean indicating if this is on or off.",
- "type": "boolean"
+ "name": "styleSheetId",
+ "description": "Identifier of the stylesheet containing this object (if exists).",
+ "optional": true,
+ "$ref": "DOM.StyleSheetId"
}
]
},
{
- "name": "getBackgroundColors",
- "parameters": [
+ "id": "CSSNavigation",
+ "description": "CSS Navigation at-rule descriptor.",
+ "experimental": true,
+ "type": "object",
+ "properties": [
{
- "name": "nodeId",
- "description": "Id of the node to get background colors for.",
- "$ref": "DOM.NodeId"
- }
- ],
- "returns": [
+ "name": "text",
+ "description": "Navigation rule text.",
+ "type": "string"
+ },
{
- "name": "backgroundColors",
- "description": "The range of background colors behind this element, if it contains any visible text. If no\nvisible text is present, this will be undefined. In the case of a flat background color,\nthis will consist of simply that color. In the case of a gradient, this will consist of each\nof the color stops. For anything more complicated, this will be an empty array. Images will\nbe ignored (as if the image had failed to load).",
+ "name": "active",
+ "description": "Whether the navigation condition is satisfied.",
"optional": true,
- "type": "array",
- "items": {
- "type": "string"
- }
+ "type": "boolean"
},
{
- "name": "computedFontSize",
- "description": "The computed font size for this node, as a CSS computed value string (e.g. '12px').",
+ "name": "range",
+ "description": "The associated rule header range in the enclosing stylesheet (if\navailable).",
"optional": true,
- "type": "string"
+ "$ref": "SourceRange"
},
{
- "name": "computedFontWeight",
- "description": "The computed font weight for this node, as a CSS computed value string (e.g. 'normal' or\n'100').",
+ "name": "styleSheetId",
+ "description": "Identifier of the stylesheet containing this object (if exists).",
"optional": true,
- "type": "string"
- }
- ]
- },
- {
- "name": "getComputedStyleForNode",
- "description": "Returns the computed style for a DOM node identified by `nodeId`.",
- "parameters": [
- {
- "name": "nodeId",
- "$ref": "DOM.NodeId"
- }
- ],
- "returns": [
- {
- "name": "computedStyle",
- "description": "Computed style for the specified DOM node.",
- "type": "array",
- "items": {
- "$ref": "CSSComputedStyleProperty"
- }
+ "$ref": "DOM.StyleSheetId"
}
]
},
{
- "name": "resolveValues",
- "description": "Resolve the specified values in the context of the provided element.\nFor example, a value of '1em' is evaluated according to the computed\n'font-size' of the element and a value 'calc(1px + 2px)' will be\nresolved to '3px'.",
- "parameters": [
- {
- "name": "values",
- "description": "Substitution functions (var()/env()/attr()) and cascade-dependent\nkeywords (revert/revert-layer) do not work.",
- "type": "array",
- "items": {
- "type": "string"
- }
- },
- {
- "name": "nodeId",
- "description": "Id of the node in whose context the expression is evaluated",
- "$ref": "DOM.NodeId"
- },
+ "id": "CSSScope",
+ "description": "CSS Scope at-rule descriptor.",
+ "experimental": true,
+ "type": "object",
+ "properties": [
{
- "name": "propertyName",
- "description": "Only longhands and custom property names are accepted.",
- "optional": true,
+ "name": "text",
+ "description": "Scope rule text.",
"type": "string"
},
{
- "name": "pseudoType",
- "description": "Pseudo element type, only works for pseudo elements that generate\nelements in the tree, such as ::before and ::after.",
- "experimental": true,
+ "name": "range",
+ "description": "The associated rule header range in the enclosing stylesheet (if\navailable).",
"optional": true,
- "$ref": "DOM.PseudoType"
+ "$ref": "SourceRange"
},
{
- "name": "pseudoIdentifier",
- "description": "Pseudo element custom ident.",
- "experimental": true,
+ "name": "styleSheetId",
+ "description": "Identifier of the stylesheet containing this object (if exists).",
"optional": true,
- "type": "string"
- }
- ],
- "returns": [
- {
- "name": "results",
- "type": "array",
- "items": {
- "type": "string"
- }
+ "$ref": "DOM.StyleSheetId"
}
]
},
{
- "name": "getLonghandProperties",
+ "id": "CSSLayer",
+ "description": "CSS Layer at-rule descriptor.",
"experimental": true,
- "parameters": [
+ "type": "object",
+ "properties": [
{
- "name": "shorthandName",
+ "name": "text",
+ "description": "Layer name.",
"type": "string"
},
{
- "name": "value",
- "type": "string"
- }
- ],
- "returns": [
+ "name": "range",
+ "description": "The associated rule header range in the enclosing stylesheet (if\navailable).",
+ "optional": true,
+ "$ref": "SourceRange"
+ },
{
- "name": "longhandProperties",
- "type": "array",
- "items": {
- "$ref": "CSSProperty"
- }
+ "name": "styleSheetId",
+ "description": "Identifier of the stylesheet containing this object (if exists).",
+ "optional": true,
+ "$ref": "DOM.StyleSheetId"
}
]
},
{
- "name": "getInlineStylesForNode",
- "description": "Returns the styles defined inline (explicitly in the \"style\" attribute and implicitly, using DOM\nattributes) for a DOM node identified by `nodeId`.",
- "parameters": [
- {
- "name": "nodeId",
- "$ref": "DOM.NodeId"
- }
- ],
- "returns": [
+ "id": "CSSStartingStyle",
+ "description": "CSS Starting Style at-rule descriptor.",
+ "experimental": true,
+ "type": "object",
+ "properties": [
{
- "name": "inlineStyle",
- "description": "Inline style for the specified DOM node.",
+ "name": "range",
+ "description": "The associated rule header range in the enclosing stylesheet (if\navailable).",
"optional": true,
- "$ref": "CSSStyle"
+ "$ref": "SourceRange"
},
{
- "name": "attributesStyle",
- "description": "Attribute-defined element style (e.g. resulting from \"width=20 height=100%\").",
+ "name": "styleSheetId",
+ "description": "Identifier of the stylesheet containing this object (if exists).",
"optional": true,
- "$ref": "CSSStyle"
+ "$ref": "DOM.StyleSheetId"
}
]
},
{
- "name": "getAnimatedStylesForNode",
- "description": "Returns the styles coming from animations & transitions\nincluding the animation & transition styles coming from inheritance chain.",
+ "id": "CSSLayerData",
+ "description": "CSS Layer data.",
"experimental": true,
- "parameters": [
+ "type": "object",
+ "properties": [
{
- "name": "nodeId",
- "$ref": "DOM.NodeId"
- }
- ],
- "returns": [
+ "name": "name",
+ "description": "Layer name.",
+ "type": "string"
+ },
{
- "name": "animationStyles",
- "description": "Styles coming from animations.",
+ "name": "subLayers",
+ "description": "Direct sub-layers",
"optional": true,
"type": "array",
"items": {
- "$ref": "CSSAnimationStyle"
+ "$ref": "CSSLayerData"
}
},
{
- "name": "transitionsStyle",
- "description": "Style coming from transitions.",
- "optional": true,
- "$ref": "CSSStyle"
- },
- {
- "name": "inherited",
- "description": "Inherited style entries for animationsStyle and transitionsStyle from\nthe inheritance chain of the element.",
- "optional": true,
- "type": "array",
- "items": {
- "$ref": "InheritedAnimatedStyleEntry"
- }
+ "name": "order",
+ "description": "Layer order. The order determines the order of the layer in the cascade order.\nA higher number has higher priority in the cascade order.",
+ "type": "number"
}
]
},
{
- "name": "getMatchedStylesForNode",
- "description": "Returns requested styles for a DOM node identified by `nodeId`.",
- "parameters": [
+ "id": "PlatformFontUsage",
+ "description": "Information about amount of glyphs that were rendered with given font.",
+ "type": "object",
+ "properties": [
{
- "name": "nodeId",
- "$ref": "DOM.NodeId"
- }
- ],
- "returns": [
+ "name": "familyName",
+ "description": "Font's family name reported by platform.",
+ "type": "string"
+ },
{
- "name": "inlineStyle",
- "description": "Inline style for the specified DOM node.",
- "optional": true,
- "$ref": "CSSStyle"
+ "name": "postScriptName",
+ "description": "Font's PostScript name reported by platform.",
+ "type": "string"
},
{
- "name": "attributesStyle",
- "description": "Attribute-defined element style (e.g. resulting from \"width=20 height=100%\").",
- "optional": true,
- "$ref": "CSSStyle"
+ "name": "isCustomFont",
+ "description": "Indicates if the font was downloaded or resolved locally.",
+ "type": "boolean"
},
{
- "name": "matchedCSSRules",
- "description": "CSS rules matching this node, from all applicable stylesheets.",
- "optional": true,
- "type": "array",
- "items": {
- "$ref": "RuleMatch"
- }
+ "name": "glyphCount",
+ "description": "Amount of glyphs that were rendered with this font.",
+ "type": "number"
+ }
+ ]
+ },
+ {
+ "id": "FontVariationAxis",
+ "description": "Information about font variation axes for variable fonts",
+ "type": "object",
+ "properties": [
+ {
+ "name": "tag",
+ "description": "The font-variation-setting tag (a.k.a. \"axis tag\").",
+ "type": "string"
},
{
- "name": "pseudoElements",
- "description": "Pseudo style matches for this node.",
- "optional": true,
- "type": "array",
- "items": {
- "$ref": "PseudoElementMatches"
- }
+ "name": "name",
+ "description": "Human-readable variation name in the default language (normally, \"en\").",
+ "type": "string"
},
{
- "name": "inherited",
- "description": "A chain of inherited styles (from the immediate node parent up to the DOM tree root).",
- "optional": true,
- "type": "array",
- "items": {
- "$ref": "InheritedStyleEntry"
- }
+ "name": "minValue",
+ "description": "The minimum value (inclusive) the font supports for this tag.",
+ "type": "number"
},
{
- "name": "inheritedPseudoElements",
- "description": "A chain of inherited pseudo element styles (from the immediate node parent up to the DOM tree root).",
- "optional": true,
- "type": "array",
- "items": {
- "$ref": "InheritedPseudoElementMatches"
- }
+ "name": "maxValue",
+ "description": "The maximum value (inclusive) the font supports for this tag.",
+ "type": "number"
},
{
- "name": "cssKeyframesRules",
- "description": "A list of CSS keyframed animations matching this node.",
- "optional": true,
- "type": "array",
- "items": {
- "$ref": "CSSKeyframesRule"
- }
+ "name": "defaultValue",
+ "description": "The default value.",
+ "type": "number"
+ }
+ ]
+ },
+ {
+ "id": "FontFace",
+ "description": "Properties of a web font: https://www.w3.org/TR/2008/REC-CSS2-20080411/fonts.html#font-descriptions\nand additional information such as platformFontFamily and fontVariationAxes.",
+ "type": "object",
+ "properties": [
+ {
+ "name": "fontFamily",
+ "description": "The font-family.",
+ "type": "string"
},
{
- "name": "cssPositionTryRules",
- "description": "A list of CSS @position-try rules matching this node, based on the position-try-fallbacks property.",
- "optional": true,
- "type": "array",
- "items": {
- "$ref": "CSSPositionTryRule"
- }
+ "name": "fontStyle",
+ "description": "The font-style.",
+ "type": "string"
},
{
- "name": "activePositionFallbackIndex",
- "description": "Index of the active fallback in the applied position-try-fallback property,\nwill not be set if there is no active position-try fallback.",
- "optional": true,
- "type": "integer"
+ "name": "fontVariant",
+ "description": "The font-variant.",
+ "type": "string"
},
{
- "name": "cssPropertyRules",
- "description": "A list of CSS at-property rules matching this node.",
- "optional": true,
- "type": "array",
- "items": {
- "$ref": "CSSPropertyRule"
- }
+ "name": "fontWeight",
+ "description": "The font-weight.",
+ "type": "string"
},
{
- "name": "cssPropertyRegistrations",
- "description": "A list of CSS property registrations matching this node.",
- "optional": true,
- "type": "array",
- "items": {
- "$ref": "CSSPropertyRegistration"
- }
+ "name": "fontStretch",
+ "description": "The font-stretch.",
+ "type": "string"
},
{
- "name": "cssFontPaletteValuesRule",
- "description": "A font-palette-values rule matching this node.",
- "optional": true,
- "$ref": "CSSFontPaletteValuesRule"
+ "name": "fontDisplay",
+ "description": "The font-display.",
+ "type": "string"
},
{
- "name": "parentLayoutNodeId",
- "description": "Id of the first parent element that does not have display: contents.",
- "experimental": true,
- "optional": true,
- "$ref": "DOM.NodeId"
+ "name": "unicodeRange",
+ "description": "The unicode-range.",
+ "type": "string"
},
{
- "name": "cssFunctionRules",
- "description": "A list of CSS at-function rules referenced by styles of this node.",
- "experimental": true,
+ "name": "src",
+ "description": "The src.",
+ "type": "string"
+ },
+ {
+ "name": "platformFontFamily",
+ "description": "The resolved platform font family",
+ "type": "string"
+ },
+ {
+ "name": "fontVariationAxes",
+ "description": "Available variation settings (a.k.a. \"axes\").",
"optional": true,
"type": "array",
"items": {
- "$ref": "CSSFunctionRule"
+ "$ref": "FontVariationAxis"
}
}
]
},
{
- "name": "getMediaQueries",
- "description": "Returns all media queries parsed by the rendering engine.",
- "returns": [
+ "id": "CSSTryRule",
+ "description": "CSS try rule representation.",
+ "type": "object",
+ "properties": [
{
- "name": "medias",
- "type": "array",
- "items": {
- "$ref": "CSSMedia"
- }
+ "name": "styleSheetId",
+ "description": "The css style sheet identifier (absent for user agent stylesheet and user-specified\nstylesheet rules) this rule came from.",
+ "optional": true,
+ "$ref": "DOM.StyleSheetId"
+ },
+ {
+ "name": "origin",
+ "description": "Parent stylesheet's origin.",
+ "$ref": "StyleSheetOrigin"
+ },
+ {
+ "name": "style",
+ "description": "Associated style declaration.",
+ "$ref": "CSSStyle"
}
]
},
{
- "name": "getPlatformFontsForNode",
- "description": "Requests information about platform fonts which we used to render child TextNodes in the given\nnode.",
- "parameters": [
+ "id": "CSSPositionTryRule",
+ "description": "CSS @position-try rule representation.",
+ "type": "object",
+ "properties": [
{
- "name": "nodeId",
- "$ref": "DOM.NodeId"
- }
- ],
- "returns": [
+ "name": "name",
+ "description": "The prelude dashed-ident name",
+ "$ref": "Value"
+ },
{
- "name": "fonts",
- "description": "Usage statistics for every employed platform font.",
- "type": "array",
- "items": {
- "$ref": "PlatformFontUsage"
- }
+ "name": "styleSheetId",
+ "description": "The css style sheet identifier (absent for user agent stylesheet and user-specified\nstylesheet rules) this rule came from.",
+ "optional": true,
+ "$ref": "DOM.StyleSheetId"
+ },
+ {
+ "name": "origin",
+ "description": "Parent stylesheet's origin.",
+ "$ref": "StyleSheetOrigin"
+ },
+ {
+ "name": "style",
+ "description": "Associated style declaration.",
+ "$ref": "CSSStyle"
+ },
+ {
+ "name": "active",
+ "type": "boolean"
}
]
},
{
- "name": "getStyleSheetText",
- "description": "Returns the current textual content for a stylesheet.",
- "parameters": [
+ "id": "CSSKeyframesRule",
+ "description": "CSS keyframes rule representation.",
+ "type": "object",
+ "properties": [
{
- "name": "styleSheetId",
- "$ref": "StyleSheetId"
- }
- ],
- "returns": [
+ "name": "animationName",
+ "description": "Animation name.",
+ "$ref": "Value"
+ },
{
- "name": "text",
- "description": "The stylesheet text.",
- "type": "string"
+ "name": "keyframes",
+ "description": "List of keyframes.",
+ "type": "array",
+ "items": {
+ "$ref": "CSSKeyframeRule"
+ }
}
]
},
{
- "name": "getLayersForNode",
- "description": "Returns all layers parsed by the rendering engine for the tree scope of a node.\nGiven a DOM element identified by nodeId, getLayersForNode returns the root\nlayer for the nearest ancestor document or shadow root. The layer root contains\nthe full layer tree for the tree scope and their ordering.",
- "experimental": true,
- "parameters": [
+ "id": "CSSPropertyRegistration",
+ "description": "Representation of a custom property registration through CSS.registerProperty",
+ "type": "object",
+ "properties": [
{
- "name": "nodeId",
- "$ref": "DOM.NodeId"
- }
- ],
- "returns": [
+ "name": "propertyName",
+ "type": "string"
+ },
{
- "name": "rootLayer",
- "$ref": "CSSLayerData"
+ "name": "initialValue",
+ "optional": true,
+ "$ref": "Value"
+ },
+ {
+ "name": "inherits",
+ "type": "boolean"
+ },
+ {
+ "name": "syntax",
+ "type": "string"
}
]
},
{
- "name": "getLocationForSelector",
- "description": "Given a CSS selector text and a style sheet ID, getLocationForSelector\nreturns an array of locations of the CSS selector in the style sheet.",
- "experimental": true,
- "parameters": [
+ "id": "CSSAtRule",
+ "description": "CSS generic @rule representation.",
+ "type": "object",
+ "properties": [
+ {
+ "name": "type",
+ "description": "Type of at-rule.",
+ "type": "string",
+ "enum": [
+ "font-face",
+ "font-feature-values",
+ "font-palette-values"
+ ]
+ },
+ {
+ "name": "subsection",
+ "description": "Subsection of font-feature-values, if this is a subsection.",
+ "optional": true,
+ "type": "string",
+ "enum": [
+ "swash",
+ "annotation",
+ "ornaments",
+ "stylistic",
+ "styleset",
+ "character-variant"
+ ]
+ },
+ {
+ "name": "name",
+ "description": "LINT.ThenChange(//third_party/blink/renderer/core/inspector/inspector_style_sheet.cc:FontVariantAlternatesFeatureType,//third_party/blink/renderer/core/inspector/inspector_css_agent.cc:FontVariantAlternatesFeatureType)\nAssociated name, if applicable.",
+ "optional": true,
+ "$ref": "Value"
+ },
{
"name": "styleSheetId",
- "$ref": "StyleSheetId"
+ "description": "The css style sheet identifier (absent for user agent stylesheet and user-specified\nstylesheet rules) this rule came from.",
+ "optional": true,
+ "$ref": "DOM.StyleSheetId"
},
{
- "name": "selectorText",
- "type": "string"
- }
- ],
- "returns": [
+ "name": "origin",
+ "description": "Parent stylesheet's origin.",
+ "$ref": "StyleSheetOrigin"
+ },
{
- "name": "ranges",
- "type": "array",
- "items": {
- "$ref": "SourceRange"
- }
+ "name": "style",
+ "description": "Associated style declaration.",
+ "$ref": "CSSStyle"
}
]
},
{
- "name": "trackComputedStyleUpdatesForNode",
- "description": "Starts tracking the given node for the computed style updates\nand whenever the computed style is updated for node, it queues\na `computedStyleUpdated` event with throttling.\nThere can only be 1 node tracked for computed style updates\nso passing a new node id removes tracking from the previous node.\nPass `undefined` to disable tracking.",
- "experimental": true,
- "parameters": [
+ "id": "CSSPropertyRule",
+ "description": "CSS property at-rule representation.",
+ "type": "object",
+ "properties": [
{
- "name": "nodeId",
+ "name": "styleSheetId",
+ "description": "The css style sheet identifier (absent for user agent stylesheet and user-specified\nstylesheet rules) this rule came from.",
"optional": true,
- "$ref": "DOM.NodeId"
+ "$ref": "DOM.StyleSheetId"
+ },
+ {
+ "name": "origin",
+ "description": "Parent stylesheet's origin.",
+ "$ref": "StyleSheetOrigin"
+ },
+ {
+ "name": "propertyName",
+ "description": "Associated property name.",
+ "$ref": "Value"
+ },
+ {
+ "name": "style",
+ "description": "Associated style declaration.",
+ "$ref": "CSSStyle"
}
]
},
{
- "name": "trackComputedStyleUpdates",
- "description": "Starts tracking the given computed styles for updates. The specified array of properties\nreplaces the one previously specified. Pass empty array to disable tracking.\nUse takeComputedStyleUpdates to retrieve the list of nodes that had properties modified.\nThe changes to computed style properties are only tracked for nodes pushed to the front-end\nby the DOM agent. If no changes to the tracked properties occur after the node has been pushed\nto the front-end, no updates will be issued for the node.",
- "experimental": true,
- "parameters": [
+ "id": "CSSFunctionParameter",
+ "description": "CSS function argument representation.",
+ "type": "object",
+ "properties": [
{
- "name": "propertiesToTrack",
- "type": "array",
- "items": {
- "$ref": "CSSComputedStyleProperty"
- }
+ "name": "name",
+ "description": "The parameter name.",
+ "type": "string"
+ },
+ {
+ "name": "type",
+ "description": "The parameter type.",
+ "type": "string"
}
]
},
{
- "name": "takeComputedStyleUpdates",
- "description": "Polls the next batch of computed style updates.",
- "experimental": true,
- "returns": [
+ "id": "CSSFunctionConditionNode",
+ "description": "CSS function conditional block representation.",
+ "type": "object",
+ "properties": [
{
- "name": "nodeIds",
- "description": "The list of node Ids that have their tracked computed styles updated.",
+ "name": "media",
+ "description": "Media query for this conditional block. Only one type of condition should be set.",
+ "optional": true,
+ "$ref": "CSSMedia"
+ },
+ {
+ "name": "containerQueries",
+ "description": "Container query for this conditional block. Only one type of condition should be set.",
+ "optional": true,
+ "$ref": "CSSContainerQuery"
+ },
+ {
+ "name": "supports",
+ "description": "@supports CSS at-rule condition. Only one type of condition should be set.",
+ "optional": true,
+ "$ref": "CSSSupports"
+ },
+ {
+ "name": "navigation",
+ "description": "@navigation condition. Only one type of condition should be set.",
+ "optional": true,
+ "$ref": "CSSNavigation"
+ },
+ {
+ "name": "children",
+ "description": "Block body.",
"type": "array",
"items": {
- "$ref": "DOM.NodeId"
+ "$ref": "CSSFunctionNode"
}
+ },
+ {
+ "name": "conditionText",
+ "description": "The condition text.",
+ "type": "string"
}
]
},
{
- "name": "setEffectivePropertyValueForNode",
- "description": "Find a rule with the given active property for the given node and set the new value for this\nproperty",
- "parameters": [
- {
- "name": "nodeId",
- "description": "The element id for which to set property.",
- "$ref": "DOM.NodeId"
- },
+ "id": "CSSFunctionNode",
+ "description": "Section of the body of a CSS function rule.",
+ "type": "object",
+ "properties": [
{
- "name": "propertyName",
- "type": "string"
+ "name": "condition",
+ "description": "A conditional block. If set, style should not be set.",
+ "optional": true,
+ "$ref": "CSSFunctionConditionNode"
},
{
- "name": "value",
- "type": "string"
+ "name": "style",
+ "description": "Values set by this node. If set, condition should not be set.",
+ "optional": true,
+ "$ref": "CSSStyle"
}
]
},
{
- "name": "setPropertyRulePropertyName",
- "description": "Modifies the property rule property name.",
- "parameters": [
+ "id": "CSSFunctionRule",
+ "description": "CSS function at-rule representation.",
+ "type": "object",
+ "properties": [
+ {
+ "name": "name",
+ "description": "Name of the function.",
+ "$ref": "Value"
+ },
{
"name": "styleSheetId",
- "$ref": "StyleSheetId"
+ "description": "The css style sheet identifier (absent for user agent stylesheet and user-specified\nstylesheet rules) this rule came from.",
+ "optional": true,
+ "$ref": "DOM.StyleSheetId"
},
{
- "name": "range",
- "$ref": "SourceRange"
+ "name": "origin",
+ "description": "Parent stylesheet's origin.",
+ "$ref": "StyleSheetOrigin"
},
{
- "name": "propertyName",
- "type": "string"
- }
- ],
- "returns": [
+ "name": "parameters",
+ "description": "List of parameters.",
+ "type": "array",
+ "items": {
+ "$ref": "CSSFunctionParameter"
+ }
+ },
{
- "name": "propertyName",
- "description": "The resulting key text after modification.",
- "$ref": "Value"
+ "name": "children",
+ "description": "Function body.",
+ "type": "array",
+ "items": {
+ "$ref": "CSSFunctionNode"
+ }
+ },
+ {
+ "name": "originTreeScopeNodeId",
+ "description": "The BackendNodeId of the DOM node that constitutes the origin tree scope of this rule.",
+ "experimental": true,
+ "optional": true,
+ "$ref": "DOM.BackendNodeId"
}
]
},
{
- "name": "setKeyframeKey",
- "description": "Modifies the keyframe rule key text.",
- "parameters": [
+ "id": "CSSKeyframeRule",
+ "description": "CSS keyframe rule representation.",
+ "type": "object",
+ "properties": [
{
"name": "styleSheetId",
- "$ref": "StyleSheetId"
+ "description": "The css style sheet identifier (absent for user agent stylesheet and user-specified\nstylesheet rules) this rule came from.",
+ "optional": true,
+ "$ref": "DOM.StyleSheetId"
},
{
- "name": "range",
- "$ref": "SourceRange"
+ "name": "origin",
+ "description": "Parent stylesheet's origin.",
+ "$ref": "StyleSheetOrigin"
},
{
"name": "keyText",
- "type": "string"
- }
- ],
- "returns": [
- {
- "name": "keyText",
- "description": "The resulting key text after modification.",
+ "description": "Associated key text.",
"$ref": "Value"
+ },
+ {
+ "name": "style",
+ "description": "Associated style declaration.",
+ "$ref": "CSSStyle"
}
]
},
{
- "name": "setMediaText",
- "description": "Modifies the rule selector.",
- "parameters": [
+ "id": "StyleDeclarationEdit",
+ "description": "A descriptor of operation to mutate style declaration text.",
+ "type": "object",
+ "properties": [
{
"name": "styleSheetId",
- "$ref": "StyleSheetId"
+ "description": "The css style sheet identifier.",
+ "$ref": "DOM.StyleSheetId"
},
{
"name": "range",
+ "description": "The range of the style text in the enclosing stylesheet.",
"$ref": "SourceRange"
},
{
"name": "text",
+ "description": "New style text.",
"type": "string"
}
- ],
- "returns": [
- {
- "name": "media",
- "description": "The resulting CSS media rule after modification.",
- "$ref": "CSSMedia"
- }
]
- },
+ }
+ ],
+ "commands": [
{
- "name": "setContainerQueryText",
- "description": "Modifies the expression of a container query.",
- "experimental": true,
+ "name": "addRule",
+ "description": "Inserts a new rule with the given `ruleText` in a stylesheet with given `styleSheetId`, at the\nposition specified by `location`.",
"parameters": [
{
"name": "styleSheetId",
- "$ref": "StyleSheetId"
+ "description": "The css style sheet identifier where a new rule should be inserted.",
+ "$ref": "DOM.StyleSheetId"
},
{
- "name": "range",
+ "name": "ruleText",
+ "description": "The text of a new rule.",
+ "type": "string"
+ },
+ {
+ "name": "location",
+ "description": "Text position of a new rule in the target style sheet.",
"$ref": "SourceRange"
},
{
- "name": "text",
- "type": "string"
+ "name": "nodeForPropertySyntaxValidation",
+ "description": "NodeId for the DOM node in whose context custom property declarations for registered properties should be\nvalidated. If omitted, declarations in the new rule text can only be validated statically, which may produce\nincorrect results if the declaration contains a var() for example.",
+ "experimental": true,
+ "optional": true,
+ "$ref": "DOM.NodeId"
}
],
"returns": [
{
- "name": "containerQuery",
- "description": "The resulting CSS container query rule after modification.",
- "$ref": "CSSContainerQuery"
+ "name": "rule",
+ "description": "The newly created rule.",
+ "$ref": "CSSRule"
}
]
},
{
- "name": "setSupportsText",
- "description": "Modifies the expression of a supports at-rule.",
- "experimental": true,
+ "name": "collectClassNames",
+ "description": "Returns all class names from specified stylesheet.",
"parameters": [
{
"name": "styleSheetId",
- "$ref": "StyleSheetId"
- },
- {
- "name": "range",
- "$ref": "SourceRange"
- },
- {
- "name": "text",
- "type": "string"
+ "$ref": "DOM.StyleSheetId"
}
],
"returns": [
{
- "name": "supports",
- "description": "The resulting CSS Supports rule after modification.",
- "$ref": "CSSSupports"
+ "name": "classNames",
+ "description": "Class name list.",
+ "type": "array",
+ "items": {
+ "type": "string"
+ }
}
]
},
{
- "name": "setScopeText",
- "description": "Modifies the expression of a scope at-rule.",
- "experimental": true,
+ "name": "createStyleSheet",
+ "description": "Creates a new special \"via-inspector\" stylesheet in the frame with given `frameId`.",
"parameters": [
{
- "name": "styleSheetId",
- "$ref": "StyleSheetId"
- },
- {
- "name": "range",
- "$ref": "SourceRange"
+ "name": "frameId",
+ "description": "Identifier of the frame where \"via-inspector\" stylesheet should be created.",
+ "$ref": "Page.FrameId"
},
{
- "name": "text",
- "type": "string"
+ "name": "force",
+ "description": "If true, creates a new stylesheet for every call. If false,\nreturns a stylesheet previously created by a call with force=false\nfor the frame's document if it exists or creates a new stylesheet\n(default: false).",
+ "optional": true,
+ "type": "boolean"
}
],
"returns": [
{
- "name": "scope",
- "description": "The resulting CSS Scope rule after modification.",
- "$ref": "CSSScope"
+ "name": "styleSheetId",
+ "description": "Identifier of the created \"via-inspector\" stylesheet.",
+ "$ref": "DOM.StyleSheetId"
}
]
},
{
- "name": "setRuleSelector",
- "description": "Modifies the rule selector.",
+ "name": "disable",
+ "description": "Disables the CSS agent for the given page."
+ },
+ {
+ "name": "enable",
+ "description": "Enables the CSS agent for the given page. Clients should not assume that the CSS agent has been\nenabled until the result of this command is received."
+ },
+ {
+ "name": "forcePseudoState",
+ "description": "Ensures that the given node will have specified pseudo-classes whenever its style is computed by\nthe browser.",
"parameters": [
{
- "name": "styleSheetId",
- "$ref": "StyleSheetId"
- },
- {
- "name": "range",
- "$ref": "SourceRange"
+ "name": "nodeId",
+ "description": "The element id for which to force the pseudo state.",
+ "$ref": "DOM.NodeId"
},
{
- "name": "selector",
- "type": "string"
- }
- ],
- "returns": [
- {
- "name": "selectorList",
- "description": "The resulting selector list after modification.",
- "$ref": "SelectorList"
+ "name": "forcedPseudoClasses",
+ "description": "Element pseudo classes to force when computing the element's style.",
+ "type": "array",
+ "items": {
+ "type": "string"
+ }
}
]
},
{
- "name": "setStyleSheetText",
- "description": "Sets the new stylesheet text.",
+ "name": "forceStartingStyle",
+ "description": "Ensures that the given node is in its starting-style state.",
"parameters": [
{
- "name": "styleSheetId",
- "$ref": "StyleSheetId"
+ "name": "nodeId",
+ "description": "The element id for which to force the starting-style state.",
+ "$ref": "DOM.NodeId"
},
{
- "name": "text",
- "type": "string"
- }
- ],
- "returns": [
- {
- "name": "sourceMapURL",
- "description": "URL of source map associated with script (if any).",
- "optional": true,
- "type": "string"
+ "name": "forced",
+ "description": "Boolean indicating if this is on or off.",
+ "type": "boolean"
}
]
},
{
- "name": "setStyleTexts",
- "description": "Applies specified style edits one after another in the given order.",
+ "name": "getBackgroundColors",
"parameters": [
{
- "name": "edits",
+ "name": "nodeId",
+ "description": "Id of the node to get background colors for.",
+ "$ref": "DOM.NodeId"
+ }
+ ],
+ "returns": [
+ {
+ "name": "backgroundColors",
+ "description": "The range of background colors behind this element, if it contains any visible text. If no\nvisible text is present, this will be undefined. In the case of a flat background color,\nthis will consist of simply that color. In the case of a gradient, this will consist of each\nof the color stops. For anything more complicated, this will be an empty array. Images will\nbe ignored (as if the image had failed to load).",
+ "optional": true,
"type": "array",
"items": {
- "$ref": "StyleDeclarationEdit"
+ "type": "string"
}
},
{
- "name": "nodeForPropertySyntaxValidation",
- "description": "NodeId for the DOM node in whose context custom property declarations for registered properties should be\nvalidated. If omitted, declarations in the new rule text can only be validated statically, which may produce\nincorrect results if the declaration contains a var() for example.",
- "experimental": true,
+ "name": "computedFontSize",
+ "description": "The computed font size for this node, as a CSS computed value string (e.g. '12px').",
"optional": true,
+ "type": "string"
+ },
+ {
+ "name": "computedFontWeight",
+ "description": "The computed font weight for this node, as a CSS computed value string (e.g. 'normal' or\n'100').",
+ "optional": true,
+ "type": "string"
+ }
+ ]
+ },
+ {
+ "name": "getComputedStyleForNode",
+ "description": "Returns the computed style for a DOM node identified by `nodeId`.",
+ "parameters": [
+ {
+ "name": "nodeId",
"$ref": "DOM.NodeId"
}
],
"returns": [
{
- "name": "styles",
- "description": "The resulting styles after modification.",
+ "name": "computedStyle",
+ "description": "Computed style for the specified DOM node.",
"type": "array",
"items": {
- "$ref": "CSSStyle"
+ "$ref": "CSSComputedStyleProperty"
}
+ },
+ {
+ "name": "extraFields",
+ "description": "A list of non-standard \"extra fields\" which blink stores alongside each\ncomputed style.",
+ "experimental": true,
+ "$ref": "ComputedStyleExtraFields"
}
]
},
{
- "name": "startRuleUsageTracking",
- "description": "Enables the selector recording."
- },
- {
- "name": "stopRuleUsageTracking",
- "description": "Stop tracking rule usage and return the list of rules that were used since last call to\n`takeCoverageDelta` (or since start of coverage instrumentation).",
- "returns": [
+ "name": "resolveValues",
+ "description": "Resolve the specified values in the context of the provided element.\nFor example, a value of '1em' is evaluated according to the computed\n'font-size' of the element and a value 'calc(1px + 2px)' will be\nresolved to '3px'.\nIf the `propertyName` was specified the `values` are resolved as if\nthey were property's declaration. If a value cannot be parsed according\nto the provided property syntax, the value is parsed using combined\nsyntax as if null `propertyName` was provided. If the value cannot be\nresolved even then, return the provided value without any changes.\nNote: this function currently does not resolve CSS random() function,\nit returns unmodified random() function parts.`",
+ "experimental": true,
+ "parameters": [
{
- "name": "ruleUsage",
+ "name": "values",
+ "description": "Cascade-dependent keywords (revert/revert-layer) do not work.",
"type": "array",
"items": {
- "$ref": "RuleUsage"
+ "type": "string"
}
+ },
+ {
+ "name": "nodeId",
+ "description": "Id of the node in whose context the expression is evaluated",
+ "$ref": "DOM.NodeId"
+ },
+ {
+ "name": "propertyName",
+ "description": "Only longhands and custom property names are accepted.",
+ "optional": true,
+ "type": "string"
+ },
+ {
+ "name": "pseudoType",
+ "description": "Pseudo element type, only works for pseudo elements that generate\nelements in the tree, such as ::before and ::after.",
+ "optional": true,
+ "$ref": "DOM.PseudoType"
+ },
+ {
+ "name": "pseudoIdentifier",
+ "description": "Pseudo element custom ident.",
+ "optional": true,
+ "type": "string"
}
- ]
- },
- {
- "name": "takeCoverageDelta",
- "description": "Obtain list of rules that became used since last call to this method (or since start of coverage\ninstrumentation).",
+ ],
"returns": [
{
- "name": "coverage",
+ "name": "results",
"type": "array",
"items": {
- "$ref": "RuleUsage"
+ "type": "string"
}
- },
- {
- "name": "timestamp",
- "description": "Monotonically increasing time, in seconds.",
- "type": "number"
}
]
},
{
- "name": "setLocalFontsEnabled",
- "description": "Enables/disables rendering of local CSS fonts (enabled by default).",
+ "name": "getLonghandProperties",
"experimental": true,
"parameters": [
{
- "name": "enabled",
- "description": "Whether rendering of local fonts is enabled.",
- "type": "boolean"
- }
- ]
- }
- ],
- "events": [
- {
- "name": "fontsUpdated",
- "description": "Fires whenever a web font is updated. A non-empty font parameter indicates a successfully loaded\nweb font.",
- "parameters": [
+ "name": "shorthandName",
+ "type": "string"
+ },
{
- "name": "font",
- "description": "The web font that has loaded.",
- "optional": true,
- "$ref": "FontFace"
+ "name": "value",
+ "type": "string"
}
- ]
- },
- {
- "name": "mediaQueryResultChanged",
- "description": "Fires whenever a MediaQuery result changes (for example, after a browser window has been\nresized.) The current implementation considers only viewport-dependent media features."
- },
- {
- "name": "styleSheetAdded",
- "description": "Fired whenever an active document stylesheet is added.",
- "parameters": [
+ ],
+ "returns": [
{
- "name": "header",
- "description": "Added stylesheet metainfo.",
- "$ref": "CSSStyleSheetHeader"
+ "name": "longhandProperties",
+ "type": "array",
+ "items": {
+ "$ref": "CSSProperty"
+ }
}
]
},
{
- "name": "styleSheetChanged",
- "description": "Fired whenever a stylesheet is changed as a result of the client operation.",
+ "name": "getInlineStylesForNode",
+ "description": "Returns the styles defined inline (explicitly in the \"style\" attribute and implicitly, using DOM\nattributes) for a DOM node identified by `nodeId`.",
"parameters": [
{
- "name": "styleSheetId",
- "$ref": "StyleSheetId"
+ "name": "nodeId",
+ "$ref": "DOM.NodeId"
}
- ]
- },
- {
- "name": "styleSheetRemoved",
- "description": "Fired whenever an active document stylesheet is removed.",
- "parameters": [
+ ],
+ "returns": [
{
- "name": "styleSheetId",
- "description": "Identifier of the removed stylesheet.",
- "$ref": "StyleSheetId"
+ "name": "inlineStyle",
+ "description": "Inline style for the specified DOM node.",
+ "optional": true,
+ "$ref": "CSSStyle"
+ },
+ {
+ "name": "attributesStyle",
+ "description": "Attribute-defined element style (e.g. resulting from \"width=20 height=100%\").",
+ "optional": true,
+ "$ref": "CSSStyle"
}
]
},
{
- "name": "computedStyleUpdated",
+ "name": "getAnimatedStylesForNode",
+ "description": "Returns the styles coming from animations & transitions\nincluding the animation & transition styles coming from inheritance chain.",
"experimental": true,
"parameters": [
{
"name": "nodeId",
- "description": "The node id that has updated computed styles.",
"$ref": "DOM.NodeId"
}
- ]
- }
- ]
- },
- {
- "domain": "CacheStorage",
- "experimental": true,
- "dependencies": [
- "Storage"
- ],
- "types": [
- {
- "id": "CacheId",
- "description": "Unique identifier of the Cache object.",
- "type": "string"
- },
- {
- "id": "CachedResponseType",
- "description": "type of HTTP response cached",
- "type": "string",
- "enum": [
- "basic",
- "cors",
- "default",
- "error",
- "opaqueResponse",
- "opaqueRedirect"
+ ],
+ "returns": [
+ {
+ "name": "animationStyles",
+ "description": "Styles coming from animations.",
+ "optional": true,
+ "type": "array",
+ "items": {
+ "$ref": "CSSAnimationStyle"
+ }
+ },
+ {
+ "name": "transitionsStyle",
+ "description": "Style coming from transitions.",
+ "optional": true,
+ "$ref": "CSSStyle"
+ },
+ {
+ "name": "inherited",
+ "description": "Inherited style entries for animationsStyle and transitionsStyle from\nthe inheritance chain of the element.",
+ "optional": true,
+ "type": "array",
+ "items": {
+ "$ref": "InheritedAnimatedStyleEntry"
+ }
+ }
]
},
{
- "id": "DataEntry",
- "description": "Data entry.",
- "type": "object",
- "properties": [
+ "name": "getMatchedStylesForNode",
+ "description": "Returns requested styles for a DOM node identified by `nodeId`.",
+ "parameters": [
{
- "name": "requestURL",
- "description": "Request URL.",
- "type": "string"
+ "name": "nodeId",
+ "$ref": "DOM.NodeId"
+ }
+ ],
+ "returns": [
+ {
+ "name": "inlineStyle",
+ "description": "Inline style for the specified DOM node.",
+ "optional": true,
+ "$ref": "CSSStyle"
},
{
- "name": "requestMethod",
- "description": "Request method.",
- "type": "string"
+ "name": "attributesStyle",
+ "description": "Attribute-defined element style (e.g. resulting from \"width=20 height=100%\").",
+ "optional": true,
+ "$ref": "CSSStyle"
},
{
- "name": "requestHeaders",
- "description": "Request headers",
+ "name": "matchedCSSRules",
+ "description": "CSS rules matching this node, from all applicable stylesheets.",
+ "optional": true,
"type": "array",
"items": {
- "$ref": "Header"
+ "$ref": "RuleMatch"
}
},
{
- "name": "responseTime",
- "description": "Number of seconds since epoch.",
- "type": "number"
+ "name": "pseudoElements",
+ "description": "Pseudo style matches for this node.",
+ "optional": true,
+ "type": "array",
+ "items": {
+ "$ref": "PseudoElementMatches"
+ }
},
{
- "name": "responseStatus",
- "description": "HTTP response status code.",
- "type": "integer"
+ "name": "inherited",
+ "description": "A chain of inherited styles (from the immediate node parent up to the DOM tree root).",
+ "optional": true,
+ "type": "array",
+ "items": {
+ "$ref": "InheritedStyleEntry"
+ }
},
{
- "name": "responseStatusText",
- "description": "HTTP response status text.",
- "type": "string"
+ "name": "inheritedPseudoElements",
+ "description": "A chain of inherited pseudo element styles (from the immediate node parent up to the DOM tree root).",
+ "optional": true,
+ "type": "array",
+ "items": {
+ "$ref": "InheritedPseudoElementMatches"
+ }
},
{
- "name": "responseType",
- "description": "HTTP response type",
- "$ref": "CachedResponseType"
+ "name": "cssKeyframesRules",
+ "description": "A list of CSS keyframed animations matching this node.",
+ "optional": true,
+ "type": "array",
+ "items": {
+ "$ref": "CSSKeyframesRule"
+ }
},
{
- "name": "responseHeaders",
- "description": "Response headers",
+ "name": "cssPositionTryRules",
+ "description": "A list of CSS @position-try rules matching this node, based on the position-try-fallbacks property.",
+ "optional": true,
"type": "array",
"items": {
- "$ref": "Header"
+ "$ref": "CSSPositionTryRule"
}
- }
- ]
- },
- {
- "id": "Cache",
- "description": "Cache identifier.",
- "type": "object",
- "properties": [
+ },
{
- "name": "cacheId",
- "description": "An opaque unique id of the cache.",
- "$ref": "CacheId"
+ "name": "activePositionFallbackIndex",
+ "description": "Index of the active fallback in the applied position-try-fallback property,\nwill not be set if there is no active position-try fallback.",
+ "optional": true,
+ "type": "integer"
},
{
- "name": "securityOrigin",
- "description": "Security origin of the cache.",
- "type": "string"
+ "name": "cssPropertyRules",
+ "description": "A list of CSS at-property rules matching this node.",
+ "optional": true,
+ "type": "array",
+ "items": {
+ "$ref": "CSSPropertyRule"
+ }
},
{
- "name": "storageKey",
- "description": "Storage key of the cache.",
- "type": "string"
+ "name": "cssPropertyRegistrations",
+ "description": "A list of CSS property registrations matching this node.",
+ "optional": true,
+ "type": "array",
+ "items": {
+ "$ref": "CSSPropertyRegistration"
+ }
},
{
- "name": "storageBucket",
- "description": "Storage bucket of the cache.",
+ "name": "cssAtRules",
+ "description": "A list of simple @rules matching this node or its pseudo-elements.",
"optional": true,
- "$ref": "Storage.StorageBucket"
+ "type": "array",
+ "items": {
+ "$ref": "CSSAtRule"
+ }
},
{
- "name": "cacheName",
- "description": "The name of the cache.",
- "type": "string"
+ "name": "parentLayoutNodeId",
+ "description": "Id of the first parent element that does not have display: contents.",
+ "experimental": true,
+ "optional": true,
+ "$ref": "DOM.NodeId"
+ },
+ {
+ "name": "cssFunctionRules",
+ "description": "A list of CSS at-function rules referenced by styles of this node.",
+ "experimental": true,
+ "optional": true,
+ "type": "array",
+ "items": {
+ "$ref": "CSSFunctionRule"
+ }
}
]
},
{
- "id": "Header",
- "type": "object",
- "properties": [
+ "name": "getEnvironmentVariables",
+ "description": "Returns the values of the default UA-defined environment variables used in env()",
+ "experimental": true,
+ "returns": [
{
- "name": "name",
- "type": "string"
- },
- {
- "name": "value",
- "type": "string"
+ "name": "environmentVariables",
+ "type": "object"
}
]
},
{
- "id": "CachedResponse",
- "description": "Cached response",
- "type": "object",
- "properties": [
+ "name": "getMediaQueries",
+ "description": "Returns all media queries parsed by the rendering engine.",
+ "returns": [
{
- "name": "body",
- "description": "Entry content, base64-encoded. (Encoded as a base64 string when passed over JSON)",
- "type": "string"
+ "name": "medias",
+ "type": "array",
+ "items": {
+ "$ref": "CSSMedia"
+ }
}
]
- }
- ],
- "commands": [
+ },
{
- "name": "deleteCache",
- "description": "Deletes a cache.",
+ "name": "getPlatformFontsForNode",
+ "description": "Requests information about platform fonts which we used to render child TextNodes in the given\nnode.",
"parameters": [
{
- "name": "cacheId",
- "description": "Id of cache for deletion.",
- "$ref": "CacheId"
+ "name": "nodeId",
+ "$ref": "DOM.NodeId"
+ }
+ ],
+ "returns": [
+ {
+ "name": "fonts",
+ "description": "Usage statistics for every employed platform font.",
+ "type": "array",
+ "items": {
+ "$ref": "PlatformFontUsage"
+ }
}
]
},
{
- "name": "deleteEntry",
- "description": "Deletes a cache entry.",
+ "name": "getStyleSheetText",
+ "description": "Returns the current textual content for a stylesheet.",
"parameters": [
{
- "name": "cacheId",
- "description": "Id of cache where the entry will be deleted.",
- "$ref": "CacheId"
- },
+ "name": "styleSheetId",
+ "$ref": "DOM.StyleSheetId"
+ }
+ ],
+ "returns": [
{
- "name": "request",
- "description": "URL spec of the request.",
+ "name": "text",
+ "description": "The stylesheet text.",
"type": "string"
}
]
},
{
- "name": "requestCacheNames",
- "description": "Requests cache names.",
+ "name": "getLayersForNode",
+ "description": "Returns all layers parsed by the rendering engine for the tree scope of a node.\nGiven a DOM element identified by nodeId, getLayersForNode returns the root\nlayer for the nearest ancestor document or shadow root. The layer root contains\nthe full layer tree for the tree scope and their ordering.",
+ "experimental": true,
"parameters": [
{
- "name": "securityOrigin",
- "description": "At least and at most one of securityOrigin, storageKey, storageBucket must be specified.\nSecurity origin.",
- "optional": true,
- "type": "string"
- },
- {
- "name": "storageKey",
- "description": "Storage key.",
- "optional": true,
- "type": "string"
- },
- {
- "name": "storageBucket",
- "description": "Storage bucket. If not specified, it uses the default bucket.",
- "optional": true,
- "$ref": "Storage.StorageBucket"
+ "name": "nodeId",
+ "$ref": "DOM.NodeId"
}
],
"returns": [
{
- "name": "caches",
- "description": "Caches for the security origin.",
- "type": "array",
- "items": {
- "$ref": "Cache"
- }
+ "name": "rootLayer",
+ "$ref": "CSSLayerData"
}
]
},
{
- "name": "requestCachedResponse",
- "description": "Fetches cache entry.",
+ "name": "getLocationForSelector",
+ "description": "Given a CSS selector text and a style sheet ID, getLocationForSelector\nreturns an array of locations of the CSS selector in the style sheet.",
+ "experimental": true,
"parameters": [
{
- "name": "cacheId",
- "description": "Id of cache that contains the entry.",
- "$ref": "CacheId"
+ "name": "styleSheetId",
+ "$ref": "DOM.StyleSheetId"
},
{
- "name": "requestURL",
- "description": "URL spec of the request.",
+ "name": "selectorText",
"type": "string"
- },
- {
- "name": "requestHeaders",
- "description": "headers of the request.",
- "type": "array",
- "items": {
- "$ref": "Header"
- }
}
],
"returns": [
{
- "name": "response",
- "description": "Response read from the cache.",
- "$ref": "CachedResponse"
+ "name": "ranges",
+ "type": "array",
+ "items": {
+ "$ref": "SourceRange"
+ }
}
]
},
{
- "name": "requestEntries",
- "description": "Requests data from cache.",
+ "name": "trackComputedStyleUpdatesForNode",
+ "description": "Starts tracking the given node for the computed style updates\nand whenever the computed style is updated for node, it queues\na `computedStyleUpdated` event with throttling.\nThere can only be 1 node tracked for computed style updates\nso passing a new node id removes tracking from the previous node.\nPass `undefined` to disable tracking.",
+ "experimental": true,
"parameters": [
{
- "name": "cacheId",
- "description": "ID of cache to get entries from.",
- "$ref": "CacheId"
- },
- {
- "name": "skipCount",
- "description": "Number of records to skip.",
- "optional": true,
- "type": "integer"
- },
- {
- "name": "pageSize",
- "description": "Number of records to fetch.",
+ "name": "nodeId",
"optional": true,
- "type": "integer"
- },
+ "$ref": "DOM.NodeId"
+ }
+ ]
+ },
+ {
+ "name": "trackComputedStyleUpdates",
+ "description": "Starts tracking the given computed styles for updates. The specified array of properties\nreplaces the one previously specified. Pass empty array to disable tracking.\nUse takeComputedStyleUpdates to retrieve the list of nodes that had properties modified.\nThe changes to computed style properties are only tracked for nodes pushed to the front-end\nby the DOM agent. If no changes to the tracked properties occur after the node has been pushed\nto the front-end, no updates will be issued for the node.",
+ "experimental": true,
+ "parameters": [
{
- "name": "pathFilter",
- "description": "If present, only return the entries containing this substring in the path",
- "optional": true,
- "type": "string"
+ "name": "propertiesToTrack",
+ "type": "array",
+ "items": {
+ "$ref": "CSSComputedStyleProperty"
+ }
}
- ],
+ ]
+ },
+ {
+ "name": "takeComputedStyleUpdates",
+ "description": "Polls the next batch of computed style updates.",
+ "experimental": true,
"returns": [
{
- "name": "cacheDataEntries",
- "description": "Array of object store data entries.",
+ "name": "nodeIds",
+ "description": "The list of node Ids that have their tracked computed styles updated.",
"type": "array",
"items": {
- "$ref": "DataEntry"
+ "$ref": "DOM.NodeId"
}
- },
- {
- "name": "returnCount",
- "description": "Count of returned entries from this storage. If pathFilter is empty, it\nis the count of all entries from this storage.",
- "type": "number"
}
]
- }
- ]
- },
- {
- "domain": "Cast",
- "description": "A domain for interacting with Cast, Presentation API, and Remote Playback API\nfunctionalities.",
- "experimental": true,
- "types": [
+ },
{
- "id": "Sink",
- "type": "object",
- "properties": [
+ "name": "setEffectivePropertyValueForNode",
+ "description": "Find a rule with the given active property for the given node and set the new value for this\nproperty",
+ "parameters": [
{
- "name": "name",
- "type": "string"
+ "name": "nodeId",
+ "description": "The element id for which to set property.",
+ "$ref": "DOM.NodeId"
},
{
- "name": "id",
+ "name": "propertyName",
"type": "string"
},
{
- "name": "session",
- "description": "Text describing the current session. Present only if there is an active\nsession on the sink.",
- "optional": true,
+ "name": "value",
"type": "string"
}
]
- }
- ],
- "commands": [
+ },
{
- "name": "enable",
- "description": "Starts observing for sinks that can be used for tab mirroring, and if set,\nsinks compatible with |presentationUrl| as well. When sinks are found, a\n|sinksUpdated| event is fired.\nAlso starts observing for issue messages. When an issue is added or removed,\nan |issueUpdated| event is fired.",
+ "name": "setPropertyRulePropertyName",
+ "description": "Modifies the property rule property name.",
"parameters": [
{
- "name": "presentationUrl",
- "optional": true,
+ "name": "styleSheetId",
+ "$ref": "DOM.StyleSheetId"
+ },
+ {
+ "name": "range",
+ "$ref": "SourceRange"
+ },
+ {
+ "name": "propertyName",
"type": "string"
}
+ ],
+ "returns": [
+ {
+ "name": "propertyName",
+ "description": "The resulting key text after modification.",
+ "$ref": "Value"
+ }
]
},
{
- "name": "disable",
- "description": "Stops observing for sinks and issues."
- },
- {
- "name": "setSinkToUse",
- "description": "Sets a sink to be used when the web page requests the browser to choose a\nsink via Presentation API, Remote Playback API, or Cast SDK.",
+ "name": "setKeyframeKey",
+ "description": "Modifies the keyframe rule key text.",
"parameters": [
{
- "name": "sinkName",
+ "name": "styleSheetId",
+ "$ref": "DOM.StyleSheetId"
+ },
+ {
+ "name": "range",
+ "$ref": "SourceRange"
+ },
+ {
+ "name": "keyText",
"type": "string"
}
+ ],
+ "returns": [
+ {
+ "name": "keyText",
+ "description": "The resulting key text after modification.",
+ "$ref": "Value"
+ }
]
},
{
- "name": "startDesktopMirroring",
- "description": "Starts mirroring the desktop to the sink.",
+ "name": "setMediaText",
+ "description": "Modifies the rule selector.",
"parameters": [
{
- "name": "sinkName",
+ "name": "styleSheetId",
+ "$ref": "DOM.StyleSheetId"
+ },
+ {
+ "name": "range",
+ "$ref": "SourceRange"
+ },
+ {
+ "name": "text",
"type": "string"
}
+ ],
+ "returns": [
+ {
+ "name": "media",
+ "description": "The resulting CSS media rule after modification.",
+ "$ref": "CSSMedia"
+ }
]
},
{
- "name": "startTabMirroring",
- "description": "Starts mirroring the tab to the sink.",
+ "name": "setContainerQueryText",
+ "description": "Modifies the expression of a container query.",
+ "experimental": true,
"parameters": [
{
- "name": "sinkName",
+ "name": "styleSheetId",
+ "$ref": "DOM.StyleSheetId"
+ },
+ {
+ "name": "range",
+ "$ref": "SourceRange"
+ },
+ {
+ "name": "text",
"type": "string"
}
+ ],
+ "returns": [
+ {
+ "name": "containerQuery",
+ "description": "The resulting CSS container query rule after modification.",
+ "$ref": "CSSContainerQuery"
+ }
]
},
{
- "name": "stopCasting",
- "description": "Stops the active Cast session on the sink.",
+ "name": "setSupportsText",
+ "description": "Modifies the expression of a supports at-rule.",
+ "experimental": true,
"parameters": [
{
- "name": "sinkName",
+ "name": "styleSheetId",
+ "$ref": "DOM.StyleSheetId"
+ },
+ {
+ "name": "range",
+ "$ref": "SourceRange"
+ },
+ {
+ "name": "text",
"type": "string"
}
+ ],
+ "returns": [
+ {
+ "name": "supports",
+ "description": "The resulting CSS Supports rule after modification.",
+ "$ref": "CSSSupports"
+ }
]
- }
- ],
- "events": [
+ },
{
- "name": "sinksUpdated",
- "description": "This is fired whenever the list of available sinks changes. A sink is a\ndevice or a software surface that you can cast to.",
+ "name": "setNavigationText",
+ "description": "Modifies the expression of a navigation at-rule.",
+ "experimental": true,
"parameters": [
{
- "name": "sinks",
- "type": "array",
- "items": {
- "$ref": "Sink"
- }
+ "name": "styleSheetId",
+ "$ref": "DOM.StyleSheetId"
+ },
+ {
+ "name": "range",
+ "$ref": "SourceRange"
+ },
+ {
+ "name": "text",
+ "type": "string"
+ }
+ ],
+ "returns": [
+ {
+ "name": "navigation",
+ "description": "The resulting CSS Navigation rule after modification.",
+ "$ref": "CSSNavigation"
}
]
},
{
- "name": "issueUpdated",
- "description": "This is fired whenever the outstanding issue/error message changes.\n|issueMessage| is empty if there is no issue.",
+ "name": "setScopeText",
+ "description": "Modifies the expression of a scope at-rule.",
+ "experimental": true,
"parameters": [
{
- "name": "issueMessage",
+ "name": "styleSheetId",
+ "$ref": "DOM.StyleSheetId"
+ },
+ {
+ "name": "range",
+ "$ref": "SourceRange"
+ },
+ {
+ "name": "text",
"type": "string"
}
+ ],
+ "returns": [
+ {
+ "name": "scope",
+ "description": "The resulting CSS Scope rule after modification.",
+ "$ref": "CSSScope"
+ }
]
- }
- ]
- },
- {
- "domain": "DOM",
- "description": "This domain exposes DOM read/write operations. Each DOM Node is represented with its mirror object\nthat has an `id`. This `id` can be used to get additional information on the Node, resolve it into\nthe JavaScript object wrapper, etc. It is important that client receives DOM events only for the\nnodes that are known to the client. Backend keeps track of the nodes that were sent to the client\nand never sends the same node twice. It is client's responsibility to collect information about\nthe nodes that were sent to the client. Note that `iframe` owner elements will return\ncorresponding document elements as their child nodes.",
- "dependencies": [
- "Runtime"
- ],
- "types": [
- {
- "id": "NodeId",
- "description": "Unique DOM node identifier.",
- "type": "integer"
- },
- {
- "id": "BackendNodeId",
- "description": "Unique DOM node identifier used to reference a node that may not have been pushed to the\nfront-end.",
- "type": "integer"
},
{
- "id": "BackendNode",
- "description": "Backend node with a friendly name.",
- "type": "object",
- "properties": [
+ "name": "setRuleSelector",
+ "description": "Modifies the rule selector.",
+ "parameters": [
{
- "name": "nodeType",
- "description": "`Node`'s nodeType.",
- "type": "integer"
+ "name": "styleSheetId",
+ "$ref": "DOM.StyleSheetId"
},
{
- "name": "nodeName",
- "description": "`Node`'s nodeName.",
- "type": "string"
+ "name": "range",
+ "$ref": "SourceRange"
},
{
- "name": "backendNodeId",
- "$ref": "BackendNodeId"
+ "name": "selector",
+ "type": "string"
+ }
+ ],
+ "returns": [
+ {
+ "name": "selectorList",
+ "description": "The resulting selector list after modification.",
+ "$ref": "SelectorList"
}
]
},
{
- "id": "PseudoType",
- "description": "Pseudo element type.",
- "type": "string",
- "enum": [
- "first-line",
- "first-letter",
- "checkmark",
- "before",
- "after",
- "picker-icon",
- "marker",
- "backdrop",
- "column",
- "selection",
- "search-text",
- "target-text",
- "spelling-error",
- "grammar-error",
- "highlight",
- "first-line-inherited",
- "scroll-marker",
- "scroll-marker-group",
- "scroll-button",
- "scrollbar",
- "scrollbar-thumb",
- "scrollbar-button",
- "scrollbar-track",
- "scrollbar-track-piece",
- "scrollbar-corner",
- "resizer",
- "input-list-button",
- "view-transition",
- "view-transition-group",
- "view-transition-image-pair",
- "view-transition-old",
- "view-transition-new",
- "placeholder",
- "file-selector-button",
- "details-content",
- "picker"
+ "name": "setStyleSheetText",
+ "description": "Sets the new stylesheet text.",
+ "parameters": [
+ {
+ "name": "styleSheetId",
+ "$ref": "DOM.StyleSheetId"
+ },
+ {
+ "name": "text",
+ "type": "string"
+ }
+ ],
+ "returns": [
+ {
+ "name": "sourceMapURL",
+ "description": "URL of source map associated with script (if any).",
+ "optional": true,
+ "type": "string"
+ }
]
},
{
- "id": "ShadowRootType",
- "description": "Shadow root type.",
- "type": "string",
- "enum": [
- "user-agent",
- "open",
- "closed"
+ "name": "setStyleTexts",
+ "description": "Applies specified style edits one after another in the given order.",
+ "parameters": [
+ {
+ "name": "edits",
+ "type": "array",
+ "items": {
+ "$ref": "StyleDeclarationEdit"
+ }
+ },
+ {
+ "name": "nodeForPropertySyntaxValidation",
+ "description": "NodeId for the DOM node in whose context custom property declarations for registered properties should be\nvalidated. If omitted, declarations in the new rule text can only be validated statically, which may produce\nincorrect results if the declaration contains a var() for example.",
+ "experimental": true,
+ "optional": true,
+ "$ref": "DOM.NodeId"
+ }
+ ],
+ "returns": [
+ {
+ "name": "styles",
+ "description": "The resulting styles after modification.",
+ "type": "array",
+ "items": {
+ "$ref": "CSSStyle"
+ }
+ }
]
},
{
- "id": "CompatibilityMode",
- "description": "Document compatibility mode.",
- "type": "string",
- "enum": [
- "QuirksMode",
- "LimitedQuirksMode",
- "NoQuirksMode"
- ]
+ "name": "startRuleUsageTracking",
+ "description": "Enables the selector recording."
},
{
- "id": "PhysicalAxes",
- "description": "ContainerSelector physical axes",
- "type": "string",
- "enum": [
- "Horizontal",
- "Vertical",
- "Both"
+ "name": "stopRuleUsageTracking",
+ "description": "Stop tracking rule usage and return the list of rules that were used since last call to\n`takeCoverageDelta` (or since start of coverage instrumentation).",
+ "returns": [
+ {
+ "name": "ruleUsage",
+ "type": "array",
+ "items": {
+ "$ref": "RuleUsage"
+ }
+ }
]
},
{
- "id": "LogicalAxes",
- "description": "ContainerSelector logical axes",
- "type": "string",
- "enum": [
- "Inline",
- "Block",
- "Both"
+ "name": "takeCoverageDelta",
+ "description": "Obtain list of rules that became used since last call to this method (or since start of coverage\ninstrumentation).",
+ "returns": [
+ {
+ "name": "coverage",
+ "type": "array",
+ "items": {
+ "$ref": "RuleUsage"
+ }
+ },
+ {
+ "name": "timestamp",
+ "description": "Monotonically increasing time, in seconds.",
+ "type": "number"
+ }
]
},
{
- "id": "ScrollOrientation",
- "description": "Physical scroll orientation",
+ "name": "setLocalFontsEnabled",
+ "description": "Enables/disables rendering of local CSS fonts (enabled by default).",
+ "experimental": true,
+ "parameters": [
+ {
+ "name": "enabled",
+ "description": "Whether rendering of local fonts is enabled.",
+ "type": "boolean"
+ }
+ ]
+ }
+ ],
+ "events": [
+ {
+ "name": "fontsUpdated",
+ "description": "Fires whenever a web font is updated. A non-empty font parameter indicates a successfully loaded\nweb font.",
+ "parameters": [
+ {
+ "name": "font",
+ "description": "The web font that has loaded.",
+ "optional": true,
+ "$ref": "FontFace"
+ }
+ ]
+ },
+ {
+ "name": "mediaQueryResultChanged",
+ "description": "Fires whenever a MediaQuery result changes (for example, after a browser window has been\nresized.) The current implementation considers only viewport-dependent media features."
+ },
+ {
+ "name": "styleSheetAdded",
+ "description": "Fired whenever an active document stylesheet is added.",
+ "parameters": [
+ {
+ "name": "header",
+ "description": "Added stylesheet metainfo.",
+ "$ref": "CSSStyleSheetHeader"
+ }
+ ]
+ },
+ {
+ "name": "styleSheetChanged",
+ "description": "Fired whenever a stylesheet is changed as a result of the client operation.",
+ "parameters": [
+ {
+ "name": "styleSheetId",
+ "$ref": "DOM.StyleSheetId"
+ }
+ ]
+ },
+ {
+ "name": "styleSheetRemoved",
+ "description": "Fired whenever an active document stylesheet is removed.",
+ "parameters": [
+ {
+ "name": "styleSheetId",
+ "description": "Identifier of the removed stylesheet.",
+ "$ref": "DOM.StyleSheetId"
+ }
+ ]
+ },
+ {
+ "name": "computedStyleUpdated",
+ "experimental": true,
+ "parameters": [
+ {
+ "name": "nodeId",
+ "description": "The node id that has updated computed styles.",
+ "$ref": "DOM.NodeId"
+ }
+ ]
+ }
+ ]
+ },
+ {
+ "domain": "CacheStorage",
+ "experimental": true,
+ "dependencies": [
+ "Storage"
+ ],
+ "types": [
+ {
+ "id": "CacheId",
+ "description": "Unique identifier of the Cache object.",
+ "type": "string"
+ },
+ {
+ "id": "CachedResponseType",
+ "description": "type of HTTP response cached",
"type": "string",
"enum": [
- "horizontal",
- "vertical"
+ "basic",
+ "cors",
+ "default",
+ "error",
+ "opaqueResponse",
+ "opaqueRedirect"
]
},
{
- "id": "Node",
- "description": "DOM interaction is implemented in terms of mirror objects that represent the actual DOM nodes.\nDOMNode is a base node mirror type.",
+ "id": "DataEntry",
+ "description": "Data entry.",
"type": "object",
"properties": [
{
- "name": "nodeId",
- "description": "Node identifier that is passed into the rest of the DOM messages as the `nodeId`. Backend\nwill only push node with given `id` once. It is aware of all requested nodes and will only\nfire DOM events for nodes known to the client.",
- "$ref": "NodeId"
- },
- {
- "name": "parentId",
- "description": "The id of the parent node if any.",
- "optional": true,
- "$ref": "NodeId"
+ "name": "requestURL",
+ "description": "Request URL.",
+ "type": "string"
},
{
- "name": "backendNodeId",
- "description": "The BackendNodeId for this node.",
- "$ref": "BackendNodeId"
+ "name": "requestMethod",
+ "description": "Request method.",
+ "type": "string"
},
{
- "name": "nodeType",
- "description": "`Node`'s nodeType.",
- "type": "integer"
+ "name": "requestHeaders",
+ "description": "Request headers",
+ "type": "array",
+ "items": {
+ "$ref": "Header"
+ }
},
{
- "name": "nodeName",
- "description": "`Node`'s nodeName.",
- "type": "string"
+ "name": "responseTime",
+ "description": "Number of seconds since epoch.",
+ "type": "number"
},
{
- "name": "localName",
- "description": "`Node`'s localName.",
- "type": "string"
+ "name": "responseStatus",
+ "description": "HTTP response status code.",
+ "type": "integer"
},
{
- "name": "nodeValue",
- "description": "`Node`'s nodeValue.",
+ "name": "responseStatusText",
+ "description": "HTTP response status text.",
"type": "string"
},
{
- "name": "childNodeCount",
- "description": "Child count for `Container` nodes.",
- "optional": true,
- "type": "integer"
- },
- {
- "name": "children",
- "description": "Child nodes of this node when requested with children.",
- "optional": true,
- "type": "array",
- "items": {
- "$ref": "Node"
- }
+ "name": "responseType",
+ "description": "HTTP response type",
+ "$ref": "CachedResponseType"
},
{
- "name": "attributes",
- "description": "Attributes of the `Element` node in the form of flat array `[name1, value1, name2, value2]`.",
- "optional": true,
+ "name": "responseHeaders",
+ "description": "Response headers",
"type": "array",
"items": {
- "type": "string"
+ "$ref": "Header"
}
- },
- {
- "name": "documentURL",
- "description": "Document URL that `Document` or `FrameOwner` node points to.",
- "optional": true,
- "type": "string"
- },
+ }
+ ]
+ },
+ {
+ "id": "Cache",
+ "description": "Cache identifier.",
+ "type": "object",
+ "properties": [
{
- "name": "baseURL",
- "description": "Base URL that `Document` or `FrameOwner` node uses for URL completion.",
- "optional": true,
- "type": "string"
+ "name": "cacheId",
+ "description": "An opaque unique id of the cache.",
+ "$ref": "CacheId"
},
{
- "name": "publicId",
- "description": "`DocumentType`'s publicId.",
- "optional": true,
+ "name": "securityOrigin",
+ "description": "Security origin of the cache.",
"type": "string"
},
{
- "name": "systemId",
- "description": "`DocumentType`'s systemId.",
- "optional": true,
+ "name": "storageKey",
+ "description": "Storage key of the cache.",
"type": "string"
},
{
- "name": "internalSubset",
- "description": "`DocumentType`'s internalSubset.",
+ "name": "storageBucket",
+ "description": "Storage bucket of the cache.",
"optional": true,
- "type": "string"
+ "$ref": "Storage.StorageBucket"
},
{
- "name": "xmlVersion",
- "description": "`Document`'s XML version in case of XML documents.",
- "optional": true,
+ "name": "cacheName",
+ "description": "The name of the cache.",
"type": "string"
- },
+ }
+ ]
+ },
+ {
+ "id": "Header",
+ "type": "object",
+ "properties": [
{
"name": "name",
- "description": "`Attr`'s name.",
- "optional": true,
"type": "string"
},
{
"name": "value",
- "description": "`Attr`'s value.",
- "optional": true,
"type": "string"
- },
- {
- "name": "pseudoType",
- "description": "Pseudo element type for this node.",
- "optional": true,
- "$ref": "PseudoType"
- },
+ }
+ ]
+ },
+ {
+ "id": "CachedResponse",
+ "description": "Cached response",
+ "type": "object",
+ "properties": [
{
- "name": "pseudoIdentifier",
- "description": "Pseudo element identifier for this node. Only present if there is a\nvalid pseudoType.",
- "optional": true,
+ "name": "body",
+ "description": "Entry content, base64-encoded. (Encoded as a base64 string when passed over JSON)",
"type": "string"
- },
+ }
+ ]
+ }
+ ],
+ "commands": [
+ {
+ "name": "deleteCache",
+ "description": "Deletes a cache.",
+ "parameters": [
{
- "name": "shadowRootType",
- "description": "Shadow root type.",
- "optional": true,
- "$ref": "ShadowRootType"
- },
+ "name": "cacheId",
+ "description": "Id of cache for deletion.",
+ "$ref": "CacheId"
+ }
+ ]
+ },
+ {
+ "name": "deleteEntry",
+ "description": "Deletes a cache entry.",
+ "parameters": [
{
- "name": "frameId",
- "description": "Frame ID for frame owner elements.",
- "optional": true,
- "$ref": "Page.FrameId"
+ "name": "cacheId",
+ "description": "Id of cache where the entry will be deleted.",
+ "$ref": "CacheId"
},
{
- "name": "contentDocument",
- "description": "Content document for frame owner elements.",
- "optional": true,
- "$ref": "Node"
- },
+ "name": "request",
+ "description": "URL spec of the request.",
+ "type": "string"
+ }
+ ]
+ },
+ {
+ "name": "requestCacheNames",
+ "description": "Requests cache names.",
+ "parameters": [
{
- "name": "shadowRoots",
- "description": "Shadow root list for given element host.",
+ "name": "securityOrigin",
+ "description": "At least and at most one of securityOrigin, storageKey, storageBucket must be specified.\nSecurity origin.",
"optional": true,
- "type": "array",
- "items": {
- "$ref": "Node"
- }
+ "type": "string"
},
{
- "name": "templateContent",
- "description": "Content document fragment for template elements.",
+ "name": "storageKey",
+ "description": "Storage key.",
"optional": true,
- "$ref": "Node"
+ "type": "string"
},
{
- "name": "pseudoElements",
- "description": "Pseudo elements associated with this node.",
+ "name": "storageBucket",
+ "description": "Storage bucket. If not specified, it uses the default bucket.",
"optional": true,
+ "$ref": "Storage.StorageBucket"
+ }
+ ],
+ "returns": [
+ {
+ "name": "caches",
+ "description": "Caches for the security origin.",
"type": "array",
"items": {
- "$ref": "Node"
+ "$ref": "Cache"
}
+ }
+ ]
+ },
+ {
+ "name": "requestCachedResponse",
+ "description": "Fetches cache entry.",
+ "parameters": [
+ {
+ "name": "cacheId",
+ "description": "Id of cache that contains the entry.",
+ "$ref": "CacheId"
},
{
- "name": "importedDocument",
- "description": "Deprecated, as the HTML Imports API has been removed (crbug.com/937746).\nThis property used to return the imported document for the HTMLImport links.\nThe property is always undefined now.",
- "deprecated": true,
- "optional": true,
- "$ref": "Node"
+ "name": "requestURL",
+ "description": "URL spec of the request.",
+ "type": "string"
},
{
- "name": "distributedNodes",
- "description": "Distributed nodes for given insertion point.",
- "optional": true,
+ "name": "requestHeaders",
+ "description": "headers of the request.",
"type": "array",
"items": {
- "$ref": "BackendNode"
+ "$ref": "Header"
}
- },
+ }
+ ],
+ "returns": [
{
- "name": "isSVG",
- "description": "Whether the node is SVG.",
- "optional": true,
- "type": "boolean"
+ "name": "response",
+ "description": "Response read from the cache.",
+ "$ref": "CachedResponse"
+ }
+ ]
+ },
+ {
+ "name": "requestEntries",
+ "description": "Requests data from cache.",
+ "parameters": [
+ {
+ "name": "cacheId",
+ "description": "ID of cache to get entries from.",
+ "$ref": "CacheId"
},
{
- "name": "compatibilityMode",
+ "name": "skipCount",
+ "description": "Number of records to skip.",
"optional": true,
- "$ref": "CompatibilityMode"
+ "type": "integer"
},
{
- "name": "assignedSlot",
+ "name": "pageSize",
+ "description": "Number of records to fetch.",
"optional": true,
- "$ref": "BackendNode"
+ "type": "integer"
},
{
- "name": "isScrollable",
- "experimental": true,
+ "name": "pathFilter",
+ "description": "If present, only return the entries containing this substring in the path",
"optional": true,
- "type": "boolean"
+ "type": "string"
}
- ]
- },
- {
- "id": "DetachedElementInfo",
- "description": "A structure to hold the top-level node of a detached tree and an array of its retained descendants.",
- "type": "object",
- "properties": [
- {
- "name": "treeNode",
- "$ref": "Node"
- },
+ ],
+ "returns": [
{
- "name": "retainedNodeIds",
+ "name": "cacheDataEntries",
+ "description": "Array of object store data entries.",
"type": "array",
"items": {
- "$ref": "NodeId"
+ "$ref": "DataEntry"
}
+ },
+ {
+ "name": "returnCount",
+ "description": "Count of returned entries from this storage. If pathFilter is empty, it\nis the count of all entries from this storage.",
+ "type": "number"
}
]
- },
+ }
+ ]
+ },
+ {
+ "domain": "Cast",
+ "description": "A domain for interacting with Cast, Presentation API, and Remote Playback API\nfunctionalities.",
+ "experimental": true,
+ "types": [
{
- "id": "RGBA",
- "description": "A structure holding an RGBA color.",
+ "id": "Sink",
"type": "object",
"properties": [
{
- "name": "r",
- "description": "The red component, in the [0-255] range.",
- "type": "integer"
+ "name": "name",
+ "type": "string"
},
{
- "name": "g",
- "description": "The green component, in the [0-255] range.",
- "type": "integer"
+ "name": "id",
+ "type": "string"
},
{
- "name": "b",
- "description": "The blue component, in the [0-255] range.",
- "type": "integer"
- },
+ "name": "session",
+ "description": "Text describing the current session. Present only if there is an active\nsession on the sink.",
+ "optional": true,
+ "type": "string"
+ }
+ ]
+ }
+ ],
+ "commands": [
+ {
+ "name": "enable",
+ "description": "Starts observing for sinks that can be used for tab mirroring, and if set,\nsinks compatible with |presentationUrl| as well. When sinks are found, a\n|sinksUpdated| event is fired.\nAlso starts observing for issue messages. When an issue is added or removed,\nan |issueUpdated| event is fired.",
+ "parameters": [
{
- "name": "a",
- "description": "The alpha component, in the [0-1] range (default: 1).",
+ "name": "presentationUrl",
"optional": true,
- "type": "number"
+ "type": "string"
}
]
},
{
- "id": "Quad",
- "description": "An array of quad vertices, x immediately followed by y for each point, points clock-wise.",
- "type": "array",
- "items": {
- "type": "number"
- }
+ "name": "disable",
+ "description": "Stops observing for sinks and issues."
},
{
- "id": "BoxModel",
- "description": "Box model.",
- "type": "object",
- "properties": [
+ "name": "setSinkToUse",
+ "description": "Sets a sink to be used when the web page requests the browser to choose a\nsink via Presentation API, Remote Playback API, or Cast SDK.",
+ "parameters": [
{
- "name": "content",
- "description": "Content box",
- "$ref": "Quad"
- },
+ "name": "sinkName",
+ "type": "string"
+ }
+ ]
+ },
+ {
+ "name": "startDesktopMirroring",
+ "description": "Starts mirroring the desktop to the sink.",
+ "parameters": [
{
- "name": "padding",
- "description": "Padding box",
- "$ref": "Quad"
- },
- {
- "name": "border",
- "description": "Border box",
- "$ref": "Quad"
- },
- {
- "name": "margin",
- "description": "Margin box",
- "$ref": "Quad"
- },
- {
- "name": "width",
- "description": "Node width",
- "type": "integer"
- },
- {
- "name": "height",
- "description": "Node height",
- "type": "integer"
- },
- {
- "name": "shapeOutside",
- "description": "Shape outside coordinates",
- "optional": true,
- "$ref": "ShapeOutsideInfo"
- }
- ]
- },
- {
- "id": "ShapeOutsideInfo",
- "description": "CSS Shape Outside details.",
- "type": "object",
- "properties": [
- {
- "name": "bounds",
- "description": "Shape bounds",
- "$ref": "Quad"
- },
- {
- "name": "shape",
- "description": "Shape coordinate details",
- "type": "array",
- "items": {
- "type": "any"
- }
- },
- {
- "name": "marginShape",
- "description": "Margin shape bounds",
- "type": "array",
- "items": {
- "type": "any"
- }
+ "name": "sinkName",
+ "type": "string"
}
]
},
{
- "id": "Rect",
- "description": "Rectangle.",
- "type": "object",
- "properties": [
- {
- "name": "x",
- "description": "X coordinate",
- "type": "number"
- },
- {
- "name": "y",
- "description": "Y coordinate",
- "type": "number"
- },
- {
- "name": "width",
- "description": "Rectangle width",
- "type": "number"
- },
+ "name": "startTabMirroring",
+ "description": "Starts mirroring the tab to the sink.",
+ "parameters": [
{
- "name": "height",
- "description": "Rectangle height",
- "type": "number"
+ "name": "sinkName",
+ "type": "string"
}
]
},
{
- "id": "CSSComputedStyleProperty",
- "type": "object",
- "properties": [
- {
- "name": "name",
- "description": "Computed style property name.",
- "type": "string"
- },
+ "name": "stopCasting",
+ "description": "Stops the active Cast session on the sink.",
+ "parameters": [
{
- "name": "value",
- "description": "Computed style property value.",
+ "name": "sinkName",
"type": "string"
}
]
}
],
- "commands": [
+ "events": [
{
- "name": "collectClassNamesFromSubtree",
- "description": "Collects class names for the node with given id and all of it's child nodes.",
- "experimental": true,
+ "name": "sinksUpdated",
+ "description": "This is fired whenever the list of available sinks changes. A sink is a\ndevice or a software surface that you can cast to.",
"parameters": [
{
- "name": "nodeId",
- "description": "Id of the node to collect class names.",
- "$ref": "NodeId"
- }
- ],
- "returns": [
- {
- "name": "classNames",
- "description": "Class name list.",
+ "name": "sinks",
"type": "array",
"items": {
- "type": "string"
+ "$ref": "Sink"
}
}
]
},
{
- "name": "copyTo",
- "description": "Creates a deep copy of the specified node and places it into the target container before the\ngiven anchor.",
- "experimental": true,
+ "name": "issueUpdated",
+ "description": "This is fired whenever the outstanding issue/error message changes.\n|issueMessage| is empty if there is no issue.",
"parameters": [
{
- "name": "nodeId",
- "description": "Id of the node to copy.",
- "$ref": "NodeId"
- },
- {
- "name": "targetNodeId",
- "description": "Id of the element to drop the copy into.",
- "$ref": "NodeId"
- },
- {
- "name": "insertBeforeNodeId",
- "description": "Drop the copy before this node (if absent, the copy becomes the last child of\n`targetNodeId`).",
- "optional": true,
- "$ref": "NodeId"
- }
- ],
- "returns": [
- {
- "name": "nodeId",
- "description": "Id of the node clone.",
- "$ref": "NodeId"
+ "name": "issueMessage",
+ "type": "string"
}
]
+ }
+ ]
+ },
+ {
+ "domain": "DOM",
+ "description": "This domain exposes DOM read/write operations. Each DOM Node is represented with its mirror object\nthat has an `id`. This `id` can be used to get additional information on the Node, resolve it into\nthe JavaScript object wrapper, etc. It is important that client receives DOM events only for the\nnodes that are known to the client. Backend keeps track of the nodes that were sent to the client\nand never sends the same node twice. It is client's responsibility to collect information about\nthe nodes that were sent to the client. Note that `iframe` owner elements will return\ncorresponding document elements as their child nodes.",
+ "dependencies": [
+ "Runtime",
+ "Network"
+ ],
+ "types": [
+ {
+ "id": "NodeId",
+ "description": "Unique DOM node identifier.",
+ "type": "integer"
},
{
- "name": "describeNode",
- "description": "Describes node given its id, does not require domain to be enabled. Does not start tracking any\nobjects, can be used for automation.",
- "parameters": [
- {
- "name": "nodeId",
- "description": "Identifier of the node.",
- "optional": true,
- "$ref": "NodeId"
- },
- {
- "name": "backendNodeId",
- "description": "Identifier of the backend node.",
- "optional": true,
- "$ref": "BackendNodeId"
- },
- {
- "name": "objectId",
- "description": "JavaScript object id of the node wrapper.",
- "optional": true,
- "$ref": "Runtime.RemoteObjectId"
- },
+ "id": "BackendNodeId",
+ "description": "Unique DOM node identifier used to reference a node that may not have been pushed to the\nfront-end.",
+ "type": "integer"
+ },
+ {
+ "id": "StyleSheetId",
+ "description": "Unique identifier for a CSS stylesheet.",
+ "type": "string"
+ },
+ {
+ "id": "BackendNode",
+ "description": "Backend node with a friendly name.",
+ "type": "object",
+ "properties": [
{
- "name": "depth",
- "description": "The maximum depth at which children should be retrieved, defaults to 1. Use -1 for the\nentire subtree or provide an integer larger than 0.",
- "optional": true,
+ "name": "nodeType",
+ "description": "`Node`'s nodeType.",
"type": "integer"
},
{
- "name": "pierce",
- "description": "Whether or not iframes and shadow roots should be traversed when returning the subtree\n(default is false).",
- "optional": true,
- "type": "boolean"
- }
- ],
- "returns": [
- {
- "name": "node",
- "description": "Node description.",
- "$ref": "Node"
- }
- ]
- },
- {
- "name": "scrollIntoViewIfNeeded",
- "description": "Scrolls the specified rect of the given node into view if not already visible.\nNote: exactly one between nodeId, backendNodeId and objectId should be passed\nto identify the node.",
- "parameters": [
- {
- "name": "nodeId",
- "description": "Identifier of the node.",
- "optional": true,
- "$ref": "NodeId"
+ "name": "nodeName",
+ "description": "`Node`'s nodeName.",
+ "type": "string"
},
{
"name": "backendNodeId",
- "description": "Identifier of the backend node.",
- "optional": true,
"$ref": "BackendNodeId"
- },
- {
- "name": "objectId",
- "description": "JavaScript object id of the node wrapper.",
- "optional": true,
- "$ref": "Runtime.RemoteObjectId"
- },
- {
- "name": "rect",
- "description": "The rect to be scrolled into view, relative to the node's border box, in CSS pixels.\nWhen omitted, center of the node will be used, similar to Element.scrollIntoView.",
- "optional": true,
- "$ref": "Rect"
- }
- ]
- },
- {
- "name": "disable",
- "description": "Disables DOM agent for the given page."
- },
- {
- "name": "discardSearchResults",
- "description": "Discards search results from the session with the given id. `getSearchResults` should no longer\nbe called for that search.",
- "experimental": true,
- "parameters": [
- {
- "name": "searchId",
- "description": "Unique search session identifier.",
- "type": "string"
}
]
},
{
- "name": "enable",
- "description": "Enables DOM agent for the given page.",
- "parameters": [
- {
- "name": "includeWhitespace",
- "description": "Whether to include whitespaces in the children array of returned Nodes.",
- "experimental": true,
- "optional": true,
- "type": "string",
- "enum": [
- "none",
- "all"
- ]
- }
+ "id": "PseudoType",
+ "description": "Pseudo element type.",
+ "type": "string",
+ "enum": [
+ "first-line",
+ "first-letter",
+ "checkmark",
+ "before",
+ "after",
+ "expand-icon",
+ "picker-icon",
+ "interest-hint",
+ "marker",
+ "backdrop",
+ "column",
+ "selection",
+ "search-text",
+ "target-text",
+ "spelling-error",
+ "grammar-error",
+ "highlight",
+ "first-line-inherited",
+ "scroll-marker",
+ "scroll-marker-group",
+ "scroll-button",
+ "scrollbar",
+ "scrollbar-thumb",
+ "scrollbar-button",
+ "scrollbar-track",
+ "scrollbar-track-piece",
+ "scrollbar-corner",
+ "resizer",
+ "input-list-button",
+ "view-transition",
+ "view-transition-group",
+ "view-transition-image-pair",
+ "view-transition-group-children",
+ "view-transition-old",
+ "view-transition-new",
+ "placeholder",
+ "file-selector-button",
+ "details-content",
+ "picker",
+ "permission-icon",
+ "overscroll-area-parent"
]
},
{
- "name": "focus",
- "description": "Focuses the given element.",
- "parameters": [
+ "id": "ShadowRootType",
+ "description": "Shadow root type.",
+ "type": "string",
+ "enum": [
+ "user-agent",
+ "open",
+ "closed"
+ ]
+ },
+ {
+ "id": "CompatibilityMode",
+ "description": "Document compatibility mode.",
+ "type": "string",
+ "enum": [
+ "QuirksMode",
+ "LimitedQuirksMode",
+ "NoQuirksMode"
+ ]
+ },
+ {
+ "id": "PhysicalAxes",
+ "description": "ContainerSelector physical axes",
+ "type": "string",
+ "enum": [
+ "Horizontal",
+ "Vertical",
+ "Both"
+ ]
+ },
+ {
+ "id": "LogicalAxes",
+ "description": "ContainerSelector logical axes",
+ "type": "string",
+ "enum": [
+ "Inline",
+ "Block",
+ "Both"
+ ]
+ },
+ {
+ "id": "ScrollOrientation",
+ "description": "Physical scroll orientation",
+ "type": "string",
+ "enum": [
+ "horizontal",
+ "vertical"
+ ]
+ },
+ {
+ "id": "Node",
+ "description": "DOM interaction is implemented in terms of mirror objects that represent the actual DOM nodes.\nDOMNode is a base node mirror type.",
+ "type": "object",
+ "properties": [
{
"name": "nodeId",
- "description": "Identifier of the node.",
+ "description": "Node identifier that is passed into the rest of the DOM messages as the `nodeId`. Backend\nwill only push node with given `id` once. It is aware of all requested nodes and will only\nfire DOM events for nodes known to the client.",
+ "$ref": "NodeId"
+ },
+ {
+ "name": "parentId",
+ "description": "The id of the parent node if any.",
"optional": true,
"$ref": "NodeId"
},
{
"name": "backendNodeId",
- "description": "Identifier of the backend node.",
- "optional": true,
+ "description": "The BackendNodeId for this node.",
"$ref": "BackendNodeId"
},
{
- "name": "objectId",
- "description": "JavaScript object id of the node wrapper.",
+ "name": "nodeType",
+ "description": "`Node`'s nodeType.",
+ "type": "integer"
+ },
+ {
+ "name": "nodeName",
+ "description": "`Node`'s nodeName.",
+ "type": "string"
+ },
+ {
+ "name": "localName",
+ "description": "`Node`'s localName.",
+ "type": "string"
+ },
+ {
+ "name": "nodeValue",
+ "description": "`Node`'s nodeValue.",
+ "type": "string"
+ },
+ {
+ "name": "childNodeCount",
+ "description": "Child count for `Container` nodes.",
"optional": true,
- "$ref": "Runtime.RemoteObjectId"
- }
- ]
- },
- {
- "name": "getAttributes",
- "description": "Returns attributes for the specified node.",
- "parameters": [
+ "type": "integer"
+ },
{
- "name": "nodeId",
- "description": "Id of the node to retrieve attributes for.",
- "$ref": "NodeId"
- }
- ],
- "returns": [
+ "name": "children",
+ "description": "Child nodes of this node when requested with children.",
+ "optional": true,
+ "type": "array",
+ "items": {
+ "$ref": "Node"
+ }
+ },
{
"name": "attributes",
- "description": "An interleaved array of node attribute names and values.",
+ "description": "Attributes of the `Element` node in the form of flat array `[name1, value1, name2, value2]`.",
+ "optional": true,
"type": "array",
"items": {
"type": "string"
}
- }
- ]
- },
- {
- "name": "getBoxModel",
- "description": "Returns boxes for the given node.",
- "parameters": [
+ },
{
- "name": "nodeId",
- "description": "Identifier of the node.",
+ "name": "documentURL",
+ "description": "Document URL that `Document` or `FrameOwner` node points to.",
"optional": true,
- "$ref": "NodeId"
+ "type": "string"
},
{
- "name": "backendNodeId",
- "description": "Identifier of the backend node.",
+ "name": "baseURL",
+ "description": "Base URL that `Document` or `FrameOwner` node uses for URL completion.",
"optional": true,
- "$ref": "BackendNodeId"
+ "type": "string"
},
{
- "name": "objectId",
- "description": "JavaScript object id of the node wrapper.",
+ "name": "publicId",
+ "description": "`DocumentType`'s publicId.",
"optional": true,
- "$ref": "Runtime.RemoteObjectId"
- }
- ],
- "returns": [
- {
- "name": "model",
- "description": "Box model for the node.",
- "$ref": "BoxModel"
- }
- ]
- },
- {
- "name": "getContentQuads",
- "description": "Returns quads that describe node position on the page. This method\nmight return multiple quads for inline nodes.",
- "experimental": true,
- "parameters": [
+ "type": "string"
+ },
{
- "name": "nodeId",
- "description": "Identifier of the node.",
+ "name": "systemId",
+ "description": "`DocumentType`'s systemId.",
"optional": true,
- "$ref": "NodeId"
+ "type": "string"
},
{
- "name": "backendNodeId",
- "description": "Identifier of the backend node.",
+ "name": "internalSubset",
+ "description": "`DocumentType`'s internalSubset.",
"optional": true,
- "$ref": "BackendNodeId"
+ "type": "string"
},
{
- "name": "objectId",
- "description": "JavaScript object id of the node wrapper.",
+ "name": "xmlVersion",
+ "description": "`Document`'s XML version in case of XML documents.",
"optional": true,
- "$ref": "Runtime.RemoteObjectId"
- }
- ],
- "returns": [
- {
- "name": "quads",
- "description": "Quads that describe node layout relative to viewport.",
- "type": "array",
- "items": {
- "$ref": "Quad"
- }
- }
- ]
- },
- {
- "name": "getDocument",
- "description": "Returns the root DOM node (and optionally the subtree) to the caller.\nImplicitly enables the DOM domain events for the current target.",
- "parameters": [
+ "type": "string"
+ },
{
- "name": "depth",
- "description": "The maximum depth at which children should be retrieved, defaults to 1. Use -1 for the\nentire subtree or provide an integer larger than 0.",
+ "name": "name",
+ "description": "`Attr`'s name.",
"optional": true,
- "type": "integer"
+ "type": "string"
},
{
- "name": "pierce",
- "description": "Whether or not iframes and shadow roots should be traversed when returning the subtree\n(default is false).",
+ "name": "value",
+ "description": "`Attr`'s value.",
"optional": true,
- "type": "boolean"
- }
- ],
- "returns": [
+ "type": "string"
+ },
{
- "name": "root",
- "description": "Resulting node.",
- "$ref": "Node"
- }
- ]
- },
- {
- "name": "getFlattenedDocument",
- "description": "Returns the root DOM node (and optionally the subtree) to the caller.\nDeprecated, as it is not designed to work well with the rest of the DOM agent.\nUse DOMSnapshot.captureSnapshot instead.",
- "deprecated": true,
- "parameters": [
+ "name": "pseudoType",
+ "description": "Pseudo element type for this node.",
+ "optional": true,
+ "$ref": "PseudoType"
+ },
{
- "name": "depth",
- "description": "The maximum depth at which children should be retrieved, defaults to 1. Use -1 for the\nentire subtree or provide an integer larger than 0.",
+ "name": "pseudoIdentifier",
+ "description": "Pseudo element identifier for this node. Only present if there is a\nvalid pseudoType.",
"optional": true,
- "type": "integer"
+ "type": "string"
},
{
- "name": "pierce",
- "description": "Whether or not iframes and shadow roots should be traversed when returning the subtree\n(default is false).",
+ "name": "shadowRootType",
+ "description": "Shadow root type.",
"optional": true,
- "type": "boolean"
- }
- ],
- "returns": [
+ "$ref": "ShadowRootType"
+ },
{
- "name": "nodes",
- "description": "Resulting node.",
+ "name": "frameId",
+ "description": "Frame ID for frame owner elements.",
+ "optional": true,
+ "$ref": "Page.FrameId"
+ },
+ {
+ "name": "contentDocument",
+ "description": "Content document for frame owner elements.",
+ "optional": true,
+ "$ref": "Node"
+ },
+ {
+ "name": "shadowRoots",
+ "description": "Shadow root list for given element host.",
+ "optional": true,
"type": "array",
"items": {
"$ref": "Node"
}
- }
- ]
- },
- {
- "name": "getNodesForSubtreeByStyle",
- "description": "Finds nodes with a given computed style in a subtree.",
- "experimental": true,
- "parameters": [
+ },
{
- "name": "nodeId",
- "description": "Node ID pointing to the root of a subtree.",
- "$ref": "NodeId"
+ "name": "templateContent",
+ "description": "Content document fragment for template elements.",
+ "optional": true,
+ "$ref": "Node"
},
{
- "name": "computedStyles",
- "description": "The style to filter nodes by (includes nodes if any of properties matches).",
+ "name": "pseudoElements",
+ "description": "Pseudo elements associated with this node.",
+ "optional": true,
"type": "array",
"items": {
- "$ref": "CSSComputedStyleProperty"
+ "$ref": "Node"
}
},
{
- "name": "pierce",
- "description": "Whether or not iframes and shadow roots in the same target should be traversed when returning the\nresults (default is false).",
+ "name": "importedDocument",
+ "description": "Deprecated, as the HTML Imports API has been removed (crbug.com/937746).\nThis property used to return the imported document for the HTMLImport links.\nThe property is always undefined now.",
+ "deprecated": true,
"optional": true,
- "type": "boolean"
- }
- ],
- "returns": [
+ "$ref": "Node"
+ },
{
- "name": "nodeIds",
- "description": "Resulting nodes.",
+ "name": "distributedNodes",
+ "description": "Distributed nodes for given insertion point.",
+ "optional": true,
"type": "array",
"items": {
- "$ref": "NodeId"
+ "$ref": "BackendNode"
}
- }
- ]
- },
- {
- "name": "getNodeForLocation",
- "description": "Returns node id at given location. Depending on whether DOM domain is enabled, nodeId is\neither returned or not.",
- "parameters": [
- {
- "name": "x",
- "description": "X coordinate.",
- "type": "integer"
- },
- {
- "name": "y",
- "description": "Y coordinate.",
- "type": "integer"
},
{
- "name": "includeUserAgentShadowDOM",
- "description": "False to skip to the nearest non-UA shadow root ancestor (default: false).",
+ "name": "isSVG",
+ "description": "Whether the node is SVG.",
"optional": true,
"type": "boolean"
},
{
- "name": "ignorePointerEventsNone",
- "description": "Whether to ignore pointer-events: none on elements and hit test them.",
+ "name": "compatibilityMode",
"optional": true,
- "type": "boolean"
- }
- ],
- "returns": [
- {
- "name": "backendNodeId",
- "description": "Resulting node.",
- "$ref": "BackendNodeId"
+ "$ref": "CompatibilityMode"
},
{
- "name": "frameId",
- "description": "Frame this node belongs to.",
- "$ref": "Page.FrameId"
+ "name": "assignedSlot",
+ "optional": true,
+ "$ref": "BackendNode"
},
{
- "name": "nodeId",
- "description": "Id of the node at given coordinates, only when enabled and requested document.",
+ "name": "isScrollable",
+ "experimental": true,
"optional": true,
- "$ref": "NodeId"
- }
- ]
- },
- {
- "name": "getOuterHTML",
- "description": "Returns node's HTML markup.",
- "parameters": [
+ "type": "boolean"
+ },
{
- "name": "nodeId",
- "description": "Identifier of the node.",
+ "name": "affectedByStartingStyles",
+ "experimental": true,
"optional": true,
- "$ref": "NodeId"
+ "type": "boolean"
},
{
- "name": "backendNodeId",
- "description": "Identifier of the backend node.",
+ "name": "adoptedStyleSheets",
+ "experimental": true,
"optional": true,
- "$ref": "BackendNodeId"
+ "type": "array",
+ "items": {
+ "$ref": "StyleSheetId"
+ }
},
{
- "name": "objectId",
- "description": "JavaScript object id of the node wrapper.",
+ "name": "adProvenance",
+ "experimental": true,
"optional": true,
- "$ref": "Runtime.RemoteObjectId"
- }
- ],
- "returns": [
- {
- "name": "outerHTML",
- "description": "Outer HTML markup.",
- "type": "string"
+ "$ref": "Network.AdProvenance"
}
]
},
{
- "name": "getRelayoutBoundary",
- "description": "Returns the id of the nearest ancestor that is a relayout boundary.",
- "experimental": true,
- "parameters": [
+ "id": "DetachedElementInfo",
+ "description": "A structure to hold the top-level node of a detached tree and an array of its retained descendants.",
+ "type": "object",
+ "properties": [
{
- "name": "nodeId",
- "description": "Id of the node.",
- "$ref": "NodeId"
- }
- ],
- "returns": [
+ "name": "treeNode",
+ "$ref": "Node"
+ },
{
- "name": "nodeId",
- "description": "Relayout boundary node id for the given node.",
- "$ref": "NodeId"
+ "name": "retainedNodeIds",
+ "type": "array",
+ "items": {
+ "$ref": "NodeId"
+ }
}
]
},
{
- "name": "getSearchResults",
- "description": "Returns search results from given `fromIndex` to given `toIndex` from the search with the given\nidentifier.",
- "experimental": true,
- "parameters": [
+ "id": "RGBA",
+ "description": "A structure holding an RGBA color.",
+ "type": "object",
+ "properties": [
{
- "name": "searchId",
- "description": "Unique search session identifier.",
- "type": "string"
+ "name": "r",
+ "description": "The red component, in the [0-255] range.",
+ "type": "integer"
},
{
- "name": "fromIndex",
- "description": "Start index of the search result to be returned.",
+ "name": "g",
+ "description": "The green component, in the [0-255] range.",
"type": "integer"
},
{
- "name": "toIndex",
- "description": "End index of the search result to be returned.",
+ "name": "b",
+ "description": "The blue component, in the [0-255] range.",
"type": "integer"
- }
- ],
- "returns": [
+ },
{
- "name": "nodeIds",
- "description": "Ids of the search result nodes.",
- "type": "array",
- "items": {
- "$ref": "NodeId"
- }
+ "name": "a",
+ "description": "The alpha component, in the [0-1] range (default: 1).",
+ "optional": true,
+ "type": "number"
}
]
},
{
- "name": "hideHighlight",
- "description": "Hides any highlight.",
- "redirect": "Overlay"
- },
- {
- "name": "highlightNode",
- "description": "Highlights DOM node.",
- "redirect": "Overlay"
- },
- {
- "name": "highlightRect",
- "description": "Highlights given rectangle.",
- "redirect": "Overlay"
- },
- {
- "name": "markUndoableState",
- "description": "Marks last undoable state.",
- "experimental": true
+ "id": "Quad",
+ "description": "An array of quad vertices, x immediately followed by y for each point, points clock-wise.",
+ "type": "array",
+ "items": {
+ "type": "number"
+ }
},
{
- "name": "moveTo",
- "description": "Moves node into the new container, places it before the given anchor.",
- "parameters": [
+ "id": "BoxModel",
+ "description": "Box model.",
+ "type": "object",
+ "properties": [
{
- "name": "nodeId",
- "description": "Id of the node to move.",
- "$ref": "NodeId"
+ "name": "content",
+ "description": "Content box",
+ "$ref": "Quad"
},
{
- "name": "targetNodeId",
- "description": "Id of the element to drop the moved node into.",
- "$ref": "NodeId"
+ "name": "padding",
+ "description": "Padding box",
+ "$ref": "Quad"
},
{
- "name": "insertBeforeNodeId",
- "description": "Drop node before this one (if absent, the moved node becomes the last child of\n`targetNodeId`).",
+ "name": "border",
+ "description": "Border box",
+ "$ref": "Quad"
+ },
+ {
+ "name": "margin",
+ "description": "Margin box",
+ "$ref": "Quad"
+ },
+ {
+ "name": "width",
+ "description": "Node width",
+ "type": "integer"
+ },
+ {
+ "name": "height",
+ "description": "Node height",
+ "type": "integer"
+ },
+ {
+ "name": "shapeOutside",
+ "description": "Shape outside coordinates",
"optional": true,
- "$ref": "NodeId"
+ "$ref": "ShapeOutsideInfo"
}
- ],
- "returns": [
+ ]
+ },
+ {
+ "id": "ShapeOutsideInfo",
+ "description": "CSS Shape Outside details.",
+ "type": "object",
+ "properties": [
{
- "name": "nodeId",
- "description": "New id of the moved node.",
- "$ref": "NodeId"
+ "name": "bounds",
+ "description": "Shape bounds",
+ "$ref": "Quad"
+ },
+ {
+ "name": "shape",
+ "description": "Shape coordinate details",
+ "type": "array",
+ "items": {
+ "type": "any"
+ }
+ },
+ {
+ "name": "marginShape",
+ "description": "Margin shape bounds",
+ "type": "array",
+ "items": {
+ "type": "any"
+ }
}
]
},
{
- "name": "performSearch",
- "description": "Searches for a given string in the DOM tree. Use `getSearchResults` to access search results or\n`cancelSearch` to end this search session.",
- "experimental": true,
- "parameters": [
+ "id": "Rect",
+ "description": "Rectangle.",
+ "type": "object",
+ "properties": [
{
- "name": "query",
- "description": "Plain text or query selector or XPath search query.",
- "type": "string"
+ "name": "x",
+ "description": "X coordinate",
+ "type": "number"
},
{
- "name": "includeUserAgentShadowDOM",
- "description": "True to search in user agent shadow DOM.",
- "optional": true,
- "type": "boolean"
- }
- ],
- "returns": [
+ "name": "y",
+ "description": "Y coordinate",
+ "type": "number"
+ },
{
- "name": "searchId",
- "description": "Unique search session identifier.",
- "type": "string"
+ "name": "width",
+ "description": "Rectangle width",
+ "type": "number"
},
{
- "name": "resultCount",
- "description": "Number of search results.",
- "type": "integer"
+ "name": "height",
+ "description": "Rectangle height",
+ "type": "number"
}
]
},
{
- "name": "pushNodeByPathToFrontend",
- "description": "Requests that the node is sent to the caller given its path. // FIXME, use XPath",
- "experimental": true,
- "parameters": [
+ "id": "CSSComputedStyleProperty",
+ "type": "object",
+ "properties": [
{
- "name": "path",
- "description": "Path to node in the proprietary format.",
+ "name": "name",
+ "description": "Computed style property name.",
"type": "string"
- }
- ],
- "returns": [
+ },
{
- "name": "nodeId",
- "description": "Id of the node for given path.",
- "$ref": "NodeId"
+ "name": "value",
+ "description": "Computed style property value.",
+ "type": "string"
}
]
- },
+ }
+ ],
+ "commands": [
{
- "name": "pushNodesByBackendIdsToFrontend",
- "description": "Requests that a batch of nodes is sent to the caller given their backend node ids.",
+ "name": "collectClassNamesFromSubtree",
+ "description": "Collects class names for the node with given id and all of it's child nodes.",
"experimental": true,
"parameters": [
{
- "name": "backendNodeIds",
- "description": "The array of backend node ids.",
- "type": "array",
- "items": {
- "$ref": "BackendNodeId"
- }
+ "name": "nodeId",
+ "description": "Id of the node to collect class names.",
+ "$ref": "NodeId"
}
],
"returns": [
{
- "name": "nodeIds",
- "description": "The array of ids of pushed nodes that correspond to the backend ids specified in\nbackendNodeIds.",
+ "name": "classNames",
+ "description": "Class name list.",
"type": "array",
"items": {
- "$ref": "NodeId"
+ "type": "string"
}
}
]
},
{
- "name": "querySelector",
- "description": "Executes `querySelector` on a given node.",
+ "name": "copyTo",
+ "description": "Creates a deep copy of the specified node and places it into the target container before the\ngiven anchor.",
+ "experimental": true,
"parameters": [
{
"name": "nodeId",
- "description": "Id of the node to query upon.",
+ "description": "Id of the node to copy.",
"$ref": "NodeId"
},
{
- "name": "selector",
- "description": "Selector string.",
- "type": "string"
+ "name": "targetNodeId",
+ "description": "Id of the element to drop the copy into.",
+ "$ref": "NodeId"
+ },
+ {
+ "name": "insertBeforeNodeId",
+ "description": "Drop the copy before this node (if absent, the copy becomes the last child of\n`targetNodeId`).",
+ "optional": true,
+ "$ref": "NodeId"
}
],
"returns": [
{
"name": "nodeId",
- "description": "Query selector result.",
+ "description": "Id of the node clone.",
"$ref": "NodeId"
}
]
},
{
- "name": "querySelectorAll",
- "description": "Executes `querySelectorAll` on a given node.",
+ "name": "describeNode",
+ "description": "Describes node given its id, does not require domain to be enabled. Does not start tracking any\nobjects, can be used for automation.",
"parameters": [
{
"name": "nodeId",
- "description": "Id of the node to query upon.",
+ "description": "Identifier of the node.",
+ "optional": true,
"$ref": "NodeId"
},
{
- "name": "selector",
- "description": "Selector string.",
- "type": "string"
- }
- ],
- "returns": [
+ "name": "backendNodeId",
+ "description": "Identifier of the backend node.",
+ "optional": true,
+ "$ref": "BackendNodeId"
+ },
{
- "name": "nodeIds",
- "description": "Query selector result.",
- "type": "array",
- "items": {
- "$ref": "NodeId"
- }
+ "name": "objectId",
+ "description": "JavaScript object id of the node wrapper.",
+ "optional": true,
+ "$ref": "Runtime.RemoteObjectId"
+ },
+ {
+ "name": "depth",
+ "description": "The maximum depth at which children should be retrieved, defaults to 1. Use -1 for the\nentire subtree or provide an integer larger than 0.",
+ "optional": true,
+ "type": "integer"
+ },
+ {
+ "name": "pierce",
+ "description": "Whether or not iframes and shadow roots should be traversed when returning the subtree\n(default is false).",
+ "optional": true,
+ "type": "boolean"
}
- ]
- },
- {
- "name": "getTopLayerElements",
- "description": "Returns NodeIds of current top layer elements.\nTop layer is rendered closest to the user within a viewport, therefore its elements always\nappear on top of all other content.",
- "experimental": true,
+ ],
"returns": [
{
- "name": "nodeIds",
- "description": "NodeIds of top layer elements",
- "type": "array",
- "items": {
- "$ref": "NodeId"
- }
+ "name": "node",
+ "description": "Node description.",
+ "$ref": "Node"
}
]
},
{
- "name": "getElementByRelation",
- "description": "Returns the NodeId of the matched element according to certain relations.",
- "experimental": true,
+ "name": "scrollIntoViewIfNeeded",
+ "description": "Scrolls the specified rect of the given node into view if not already visible.\nNote: exactly one between nodeId, backendNodeId and objectId should be passed\nto identify the node.",
"parameters": [
{
"name": "nodeId",
- "description": "Id of the node from which to query the relation.",
+ "description": "Identifier of the node.",
+ "optional": true,
"$ref": "NodeId"
},
{
- "name": "relation",
- "description": "Type of relation to get.",
- "type": "string",
- "enum": [
- "PopoverTarget",
- "InterestTarget"
- ]
- }
- ],
- "returns": [
+ "name": "backendNodeId",
+ "description": "Identifier of the backend node.",
+ "optional": true,
+ "$ref": "BackendNodeId"
+ },
{
- "name": "nodeId",
- "description": "NodeId of the element matching the queried relation.",
- "$ref": "NodeId"
+ "name": "objectId",
+ "description": "JavaScript object id of the node wrapper.",
+ "optional": true,
+ "$ref": "Runtime.RemoteObjectId"
+ },
+ {
+ "name": "rect",
+ "description": "The rect to be scrolled into view, relative to the node's border box, in CSS pixels.\nWhen omitted, center of the node will be used, similar to Element.scrollIntoView.",
+ "optional": true,
+ "$ref": "Rect"
}
]
},
{
- "name": "redo",
- "description": "Re-does the last undone action.",
- "experimental": true
+ "name": "disable",
+ "description": "Disables DOM agent for the given page."
},
{
- "name": "removeAttribute",
- "description": "Removes attribute with given name from an element with given id.",
+ "name": "discardSearchResults",
+ "description": "Discards search results from the session with the given id. `getSearchResults` should no longer\nbe called for that search.",
+ "experimental": true,
"parameters": [
{
- "name": "nodeId",
- "description": "Id of the element to remove attribute from.",
- "$ref": "NodeId"
- },
- {
- "name": "name",
- "description": "Name of the attribute to remove.",
+ "name": "searchId",
+ "description": "Unique search session identifier.",
"type": "string"
}
]
},
{
- "name": "removeNode",
- "description": "Removes node with given id.",
+ "name": "enable",
+ "description": "Enables DOM agent for the given page.",
"parameters": [
{
- "name": "nodeId",
- "description": "Id of the node to remove.",
- "$ref": "NodeId"
+ "name": "includeWhitespace",
+ "description": "Whether to include whitespaces in the children array of returned Nodes.",
+ "experimental": true,
+ "optional": true,
+ "type": "string",
+ "enum": [
+ "none",
+ "all"
+ ]
}
]
},
{
- "name": "requestChildNodes",
- "description": "Requests that children of the node with given id are returned to the caller in form of\n`setChildNodes` events where not only immediate children are retrieved, but all children down to\nthe specified depth.",
+ "name": "focus",
+ "description": "Focuses the given element.",
"parameters": [
{
"name": "nodeId",
- "description": "Id of the node to get children for.",
+ "description": "Identifier of the node.",
+ "optional": true,
"$ref": "NodeId"
},
{
- "name": "depth",
- "description": "The maximum depth at which children should be retrieved, defaults to 1. Use -1 for the\nentire subtree or provide an integer larger than 0.",
+ "name": "backendNodeId",
+ "description": "Identifier of the backend node.",
"optional": true,
- "type": "integer"
+ "$ref": "BackendNodeId"
},
{
- "name": "pierce",
- "description": "Whether or not iframes and shadow roots should be traversed when returning the sub-tree\n(default is false).",
+ "name": "objectId",
+ "description": "JavaScript object id of the node wrapper.",
"optional": true,
- "type": "boolean"
+ "$ref": "Runtime.RemoteObjectId"
}
]
},
{
- "name": "requestNode",
- "description": "Requests that the node is sent to the caller given the JavaScript node object reference. All\nnodes that form the path from the node to the root are also sent to the client as a series of\n`setChildNodes` notifications.",
+ "name": "getAttributes",
+ "description": "Returns attributes for the specified node.",
"parameters": [
{
- "name": "objectId",
- "description": "JavaScript object id to convert into node.",
- "$ref": "Runtime.RemoteObjectId"
+ "name": "nodeId",
+ "description": "Id of the node to retrieve attributes for.",
+ "$ref": "NodeId"
}
],
"returns": [
{
- "name": "nodeId",
- "description": "Node id for given object.",
- "$ref": "NodeId"
+ "name": "attributes",
+ "description": "An interleaved array of node attribute names and values.",
+ "type": "array",
+ "items": {
+ "type": "string"
+ }
}
]
},
{
- "name": "resolveNode",
- "description": "Resolves the JavaScript node object for a given NodeId or BackendNodeId.",
+ "name": "getBoxModel",
+ "description": "Returns boxes for the given node.",
"parameters": [
{
"name": "nodeId",
- "description": "Id of the node to resolve.",
+ "description": "Identifier of the node.",
"optional": true,
"$ref": "NodeId"
},
{
"name": "backendNodeId",
- "description": "Backend identifier of the node to resolve.",
- "optional": true,
- "$ref": "DOM.BackendNodeId"
- },
- {
- "name": "objectGroup",
- "description": "Symbolic group name that can be used to release multiple objects.",
+ "description": "Identifier of the backend node.",
"optional": true,
- "type": "string"
+ "$ref": "BackendNodeId"
},
{
- "name": "executionContextId",
- "description": "Execution context in which to resolve the node.",
+ "name": "objectId",
+ "description": "JavaScript object id of the node wrapper.",
"optional": true,
- "$ref": "Runtime.ExecutionContextId"
+ "$ref": "Runtime.RemoteObjectId"
}
],
"returns": [
{
- "name": "object",
- "description": "JavaScript object wrapper for given node.",
- "$ref": "Runtime.RemoteObject"
- }
- ]
- },
- {
- "name": "setAttributeValue",
- "description": "Sets attribute for an element with given id.",
- "parameters": [
- {
- "name": "nodeId",
- "description": "Id of the element to set attribute for.",
- "$ref": "NodeId"
- },
- {
- "name": "name",
- "description": "Attribute name.",
- "type": "string"
- },
- {
- "name": "value",
- "description": "Attribute value.",
- "type": "string"
- }
- ]
- },
- {
- "name": "setAttributesAsText",
- "description": "Sets attributes on element with given id. This method is useful when user edits some existing\nattribute value and types in several attribute name/value pairs.",
- "parameters": [
- {
- "name": "nodeId",
- "description": "Id of the element to set attributes for.",
- "$ref": "NodeId"
- },
- {
- "name": "text",
- "description": "Text with a number of attributes. Will parse this text using HTML parser.",
- "type": "string"
- },
- {
- "name": "name",
- "description": "Attribute name to replace with new attributes derived from text in case text parsed\nsuccessfully.",
- "optional": true,
- "type": "string"
+ "name": "model",
+ "description": "Box model for the node.",
+ "$ref": "BoxModel"
}
]
},
{
- "name": "setFileInputFiles",
- "description": "Sets files for the given file input element.",
+ "name": "getContentQuads",
+ "description": "Returns quads that describe node position on the page. This method\nmight return multiple quads for inline nodes.",
+ "experimental": true,
"parameters": [
- {
- "name": "files",
- "description": "Array of file paths to set.",
- "type": "array",
- "items": {
- "type": "string"
- }
- },
{
"name": "nodeId",
"description": "Identifier of the node.",
@@ -7524,153 +7720,133 @@
"optional": true,
"$ref": "Runtime.RemoteObjectId"
}
- ]
- },
- {
- "name": "setNodeStackTracesEnabled",
- "description": "Sets if stack traces should be captured for Nodes. See `Node.getNodeStackTraces`. Default is disabled.",
- "experimental": true,
- "parameters": [
+ ],
+ "returns": [
{
- "name": "enable",
- "description": "Enable or disable.",
- "type": "boolean"
+ "name": "quads",
+ "description": "Quads that describe node layout relative to viewport.",
+ "type": "array",
+ "items": {
+ "$ref": "Quad"
+ }
}
]
},
{
- "name": "getNodeStackTraces",
- "description": "Gets stack traces associated with a Node. As of now, only provides stack trace for Node creation.",
- "experimental": true,
+ "name": "getDocument",
+ "description": "Returns the root DOM node (and optionally the subtree) to the caller.\nImplicitly enables the DOM domain events for the current target.",
"parameters": [
{
- "name": "nodeId",
- "description": "Id of the node to get stack traces for.",
- "$ref": "NodeId"
+ "name": "depth",
+ "description": "The maximum depth at which children should be retrieved, defaults to 1. Use -1 for the\nentire subtree or provide an integer larger than 0.",
+ "optional": true,
+ "type": "integer"
+ },
+ {
+ "name": "pierce",
+ "description": "Whether or not iframes and shadow roots should be traversed when returning the subtree\n(default is false).",
+ "optional": true,
+ "type": "boolean"
}
],
"returns": [
{
- "name": "creation",
- "description": "Creation stack trace, if available.",
- "optional": true,
- "$ref": "Runtime.StackTrace"
+ "name": "root",
+ "description": "Resulting node.",
+ "$ref": "Node"
}
]
},
{
- "name": "getFileInfo",
- "description": "Returns file information for the given\nFile wrapper.",
- "experimental": true,
+ "name": "getFlattenedDocument",
+ "description": "Returns the root DOM node (and optionally the subtree) to the caller.\nDeprecated, as it is not designed to work well with the rest of the DOM agent.\nUse DOMSnapshot.captureSnapshot instead.",
+ "deprecated": true,
"parameters": [
{
- "name": "objectId",
- "description": "JavaScript object id of the node wrapper.",
- "$ref": "Runtime.RemoteObjectId"
- }
- ],
- "returns": [
+ "name": "depth",
+ "description": "The maximum depth at which children should be retrieved, defaults to 1. Use -1 for the\nentire subtree or provide an integer larger than 0.",
+ "optional": true,
+ "type": "integer"
+ },
{
- "name": "path",
- "type": "string"
+ "name": "pierce",
+ "description": "Whether or not iframes and shadow roots should be traversed when returning the subtree\n(default is false).",
+ "optional": true,
+ "type": "boolean"
}
- ]
- },
- {
- "name": "getDetachedDomNodes",
- "description": "Returns list of detached nodes",
- "experimental": true,
+ ],
"returns": [
{
- "name": "detachedNodes",
- "description": "The list of detached nodes",
+ "name": "nodes",
+ "description": "Resulting node.",
"type": "array",
"items": {
- "$ref": "DetachedElementInfo"
+ "$ref": "Node"
}
}
]
},
{
- "name": "setInspectedNode",
- "description": "Enables console to refer to the node with given id via $x (see Command Line API for more details\n$x functions).",
+ "name": "getNodesForSubtreeByStyle",
+ "description": "Finds nodes with a given computed style in a subtree.",
"experimental": true,
"parameters": [
{
"name": "nodeId",
- "description": "DOM node id to be accessible by means of $x command line API.",
+ "description": "Node ID pointing to the root of a subtree.",
"$ref": "NodeId"
- }
- ]
- },
- {
- "name": "setNodeName",
- "description": "Sets node name for a node with given id.",
- "parameters": [
+ },
{
- "name": "nodeId",
- "description": "Id of the node to set name for.",
- "$ref": "NodeId"
+ "name": "computedStyles",
+ "description": "The style to filter nodes by (includes nodes if any of properties matches).",
+ "type": "array",
+ "items": {
+ "$ref": "CSSComputedStyleProperty"
+ }
},
{
- "name": "name",
- "description": "New node's name.",
- "type": "string"
+ "name": "pierce",
+ "description": "Whether or not iframes and shadow roots in the same target should be traversed when returning the\nresults (default is false).",
+ "optional": true,
+ "type": "boolean"
}
],
"returns": [
{
- "name": "nodeId",
- "description": "New node's id.",
- "$ref": "NodeId"
+ "name": "nodeIds",
+ "description": "Resulting nodes.",
+ "type": "array",
+ "items": {
+ "$ref": "NodeId"
+ }
}
]
},
{
- "name": "setNodeValue",
- "description": "Sets node value for a node with given id.",
+ "name": "getNodeForLocation",
+ "description": "Returns node id at given location. Depending on whether DOM domain is enabled, nodeId is\neither returned or not.",
"parameters": [
{
- "name": "nodeId",
- "description": "Id of the node to set value for.",
- "$ref": "NodeId"
+ "name": "x",
+ "description": "X coordinate.",
+ "type": "integer"
},
{
- "name": "value",
- "description": "New node's value.",
- "type": "string"
- }
- ]
- },
- {
- "name": "setOuterHTML",
- "description": "Sets node HTML markup, returns new node id.",
- "parameters": [
- {
- "name": "nodeId",
- "description": "Id of the node to set markup for.",
- "$ref": "NodeId"
+ "name": "y",
+ "description": "Y coordinate.",
+ "type": "integer"
},
{
- "name": "outerHTML",
- "description": "Outer HTML markup to set.",
- "type": "string"
- }
- ]
- },
- {
- "name": "undo",
- "description": "Undoes the last performed action.",
- "experimental": true
- },
- {
- "name": "getFrameOwner",
- "description": "Returns iframe node that owns iframe with the given domain.",
- "experimental": true,
- "parameters": [
+ "name": "includeUserAgentShadowDOM",
+ "description": "False to skip to the nearest non-UA shadow root ancestor (default: false).",
+ "optional": true,
+ "type": "boolean"
+ },
{
- "name": "frameId",
- "$ref": "Page.FrameId"
+ "name": "ignorePointerEventsNone",
+ "description": "Whether to ignore pointer-events: none on elements and hit test them.",
+ "optional": true,
+ "type": "boolean"
}
],
"returns": [
@@ -7679,6 +7855,11 @@
"description": "Resulting node.",
"$ref": "BackendNodeId"
},
+ {
+ "name": "frameId",
+ "description": "Frame this node belongs to.",
+ "$ref": "Page.FrameId"
+ },
{
"name": "nodeId",
"description": "Id of the node at given coordinates, only when enabled and requested document.",
@@ -7688,59 +7869,87 @@
]
},
{
- "name": "getContainerForNode",
- "description": "Returns the query container of the given node based on container query\nconditions: containerName, physical and logical axes, and whether it queries\nscroll-state. If no axes are provided and queriesScrollState is false, the\nstyle container is returned, which is the direct parent or the closest\nelement with a matching container-name.",
- "experimental": true,
+ "name": "getOuterHTML",
+ "description": "Returns node's HTML markup.",
"parameters": [
{
"name": "nodeId",
- "$ref": "NodeId"
- },
- {
- "name": "containerName",
+ "description": "Identifier of the node.",
"optional": true,
- "type": "string"
+ "$ref": "NodeId"
},
{
- "name": "physicalAxes",
+ "name": "backendNodeId",
+ "description": "Identifier of the backend node.",
"optional": true,
- "$ref": "PhysicalAxes"
+ "$ref": "BackendNodeId"
},
{
- "name": "logicalAxes",
+ "name": "objectId",
+ "description": "JavaScript object id of the node wrapper.",
"optional": true,
- "$ref": "LogicalAxes"
+ "$ref": "Runtime.RemoteObjectId"
},
{
- "name": "queriesScrollState",
+ "name": "includeShadowDOM",
+ "description": "Include all shadow roots. Equals to false if not specified.",
+ "experimental": true,
"optional": true,
"type": "boolean"
}
],
"returns": [
{
- "name": "nodeId",
- "description": "The container node for the given node, or null if not found.",
- "optional": true,
- "$ref": "NodeId"
+ "name": "outerHTML",
+ "description": "Outer HTML markup.",
+ "type": "string"
}
]
},
{
- "name": "getQueryingDescendantsForContainer",
- "description": "Returns the descendants of a container query container that have\ncontainer queries against this container.",
+ "name": "getRelayoutBoundary",
+ "description": "Returns the id of the nearest ancestor that is a relayout boundary.",
"experimental": true,
"parameters": [
{
"name": "nodeId",
- "description": "Id of the container node to find querying descendants from.",
+ "description": "Id of the node.",
+ "$ref": "NodeId"
+ }
+ ],
+ "returns": [
+ {
+ "name": "nodeId",
+ "description": "Relayout boundary node id for the given node.",
"$ref": "NodeId"
}
+ ]
+ },
+ {
+ "name": "getSearchResults",
+ "description": "Returns search results from given `fromIndex` to given `toIndex` from the search with the given\nidentifier.",
+ "experimental": true,
+ "parameters": [
+ {
+ "name": "searchId",
+ "description": "Unique search session identifier.",
+ "type": "string"
+ },
+ {
+ "name": "fromIndex",
+ "description": "Start index of the search result to be returned.",
+ "type": "integer"
+ },
+ {
+ "name": "toIndex",
+ "description": "End index of the search result to be returned.",
+ "type": "integer"
+ }
],
"returns": [
{
"name": "nodeIds",
- "description": "Descendant nodes with container queries against the given container.",
+ "description": "Ids of the search result nodes.",
"type": "array",
"items": {
"$ref": "NodeId"
@@ -7749,170 +7958,185 @@
]
},
{
- "name": "getAnchorElement",
- "description": "Returns the target anchor element of the given anchor query according to\nhttps://www.w3.org/TR/css-anchor-position-1/#target.",
- "experimental": true,
+ "name": "hideHighlight",
+ "description": "Hides any highlight.",
+ "redirect": "Overlay"
+ },
+ {
+ "name": "highlightNode",
+ "description": "Highlights DOM node.",
+ "redirect": "Overlay"
+ },
+ {
+ "name": "highlightRect",
+ "description": "Highlights given rectangle.",
+ "redirect": "Overlay"
+ },
+ {
+ "name": "markUndoableState",
+ "description": "Marks last undoable state.",
+ "experimental": true
+ },
+ {
+ "name": "moveTo",
+ "description": "Moves node into the new container, places it before the given anchor.",
"parameters": [
{
"name": "nodeId",
- "description": "Id of the positioned element from which to find the anchor.",
+ "description": "Id of the node to move.",
"$ref": "NodeId"
},
{
- "name": "anchorSpecifier",
- "description": "An optional anchor specifier, as defined in\nhttps://www.w3.org/TR/css-anchor-position-1/#anchor-specifier.\nIf not provided, it will return the implicit anchor element for\nthe given positioned element.",
+ "name": "targetNodeId",
+ "description": "Id of the element to drop the moved node into.",
+ "$ref": "NodeId"
+ },
+ {
+ "name": "insertBeforeNodeId",
+ "description": "Drop node before this one (if absent, the moved node becomes the last child of\n`targetNodeId`).",
"optional": true,
- "type": "string"
+ "$ref": "NodeId"
}
],
"returns": [
{
"name": "nodeId",
- "description": "The anchor element of the given anchor query.",
+ "description": "New id of the moved node.",
"$ref": "NodeId"
}
]
- }
- ],
- "events": [
+ },
{
- "name": "attributeModified",
- "description": "Fired when `Element`'s attribute is modified.",
+ "name": "performSearch",
+ "description": "Searches for a given string in the DOM tree. Use `getSearchResults` to access search results or\n`cancelSearch` to end this search session.",
+ "experimental": true,
"parameters": [
{
- "name": "nodeId",
- "description": "Id of the node that has changed.",
- "$ref": "NodeId"
+ "name": "query",
+ "description": "Plain text or query selector or XPath search query.",
+ "type": "string"
},
{
- "name": "name",
- "description": "Attribute name.",
+ "name": "includeUserAgentShadowDOM",
+ "description": "True to search in user agent shadow DOM.",
+ "optional": true,
+ "type": "boolean"
+ }
+ ],
+ "returns": [
+ {
+ "name": "searchId",
+ "description": "Unique search session identifier.",
"type": "string"
},
{
- "name": "value",
- "description": "Attribute value.",
- "type": "string"
+ "name": "resultCount",
+ "description": "Number of search results.",
+ "type": "integer"
}
]
},
{
- "name": "attributeRemoved",
- "description": "Fired when `Element`'s attribute is removed.",
+ "name": "pushNodeByPathToFrontend",
+ "description": "Requests that the node is sent to the caller given its path. // FIXME, use XPath",
+ "experimental": true,
"parameters": [
+ {
+ "name": "path",
+ "description": "Path to node in the proprietary format.",
+ "type": "string"
+ }
+ ],
+ "returns": [
{
"name": "nodeId",
- "description": "Id of the node that has changed.",
+ "description": "Id of the node for given path.",
"$ref": "NodeId"
- },
- {
- "name": "name",
- "description": "A ttribute name.",
- "type": "string"
}
]
},
{
- "name": "characterDataModified",
- "description": "Mirrors `DOMCharacterDataModified` event.",
+ "name": "pushNodesByBackendIdsToFrontend",
+ "description": "Requests that a batch of nodes is sent to the caller given their backend node ids.",
+ "experimental": true,
"parameters": [
{
- "name": "nodeId",
- "description": "Id of the node that has changed.",
- "$ref": "NodeId"
- },
+ "name": "backendNodeIds",
+ "description": "The array of backend node ids.",
+ "type": "array",
+ "items": {
+ "$ref": "BackendNodeId"
+ }
+ }
+ ],
+ "returns": [
{
- "name": "characterData",
- "description": "New text value.",
- "type": "string"
+ "name": "nodeIds",
+ "description": "The array of ids of pushed nodes that correspond to the backend ids specified in\nbackendNodeIds.",
+ "type": "array",
+ "items": {
+ "$ref": "NodeId"
+ }
}
]
},
{
- "name": "childNodeCountUpdated",
- "description": "Fired when `Container`'s child node count has changed.",
+ "name": "querySelector",
+ "description": "Executes `querySelector` on a given node.",
"parameters": [
{
"name": "nodeId",
- "description": "Id of the node that has changed.",
+ "description": "Id of the node to query upon.",
"$ref": "NodeId"
},
{
- "name": "childNodeCount",
- "description": "New node count.",
- "type": "integer"
+ "name": "selector",
+ "description": "Selector string.",
+ "type": "string"
}
- ]
- },
- {
- "name": "childNodeInserted",
- "description": "Mirrors `DOMNodeInserted` event.",
- "parameters": [
- {
- "name": "parentNodeId",
- "description": "Id of the node that has changed.",
- "$ref": "NodeId"
- },
+ ],
+ "returns": [
{
- "name": "previousNodeId",
- "description": "Id of the previous sibling.",
+ "name": "nodeId",
+ "description": "Query selector result.",
"$ref": "NodeId"
- },
- {
- "name": "node",
- "description": "Inserted node data.",
- "$ref": "Node"
}
]
},
{
- "name": "childNodeRemoved",
- "description": "Mirrors `DOMNodeRemoved` event.",
+ "name": "querySelectorAll",
+ "description": "Executes `querySelectorAll` on a given node.",
"parameters": [
{
- "name": "parentNodeId",
- "description": "Parent id.",
+ "name": "nodeId",
+ "description": "Id of the node to query upon.",
"$ref": "NodeId"
},
{
- "name": "nodeId",
- "description": "Id of the node that has been removed.",
- "$ref": "NodeId"
+ "name": "selector",
+ "description": "Selector string.",
+ "type": "string"
}
- ]
- },
- {
- "name": "distributedNodesUpdated",
- "description": "Called when distribution is changed.",
- "experimental": true,
- "parameters": [
- {
- "name": "insertionPointId",
- "description": "Insertion point where distributed nodes were updated.",
- "$ref": "NodeId"
- },
+ ],
+ "returns": [
{
- "name": "distributedNodes",
- "description": "Distributed nodes for given insertion point.",
+ "name": "nodeIds",
+ "description": "Query selector result.",
"type": "array",
"items": {
- "$ref": "BackendNode"
+ "$ref": "NodeId"
}
}
]
},
{
- "name": "documentUpdated",
- "description": "Fired when `Document` has been totally updated. Node ids are no longer valid."
- },
- {
- "name": "inlineStyleInvalidated",
- "description": "Fired when `Element`'s inline style is modified via a CSS property modification.",
+ "name": "getTopLayerElements",
+ "description": "Returns NodeIds of current top layer elements.\nTop layer is rendered closest to the user within a viewport, therefore its elements always\nappear on top of all other content.",
"experimental": true,
- "parameters": [
+ "returns": [
{
"name": "nodeIds",
- "description": "Ids of the nodes for which the inline styles have been invalidated.",
+ "description": "NodeIds of top layer elements",
"type": "array",
"items": {
"$ref": "NodeId"
@@ -7921,4871 +8145,7208 @@
]
},
{
- "name": "pseudoElementAdded",
- "description": "Called when a pseudo element is added to an element.",
+ "name": "getElementByRelation",
+ "description": "Returns the NodeId of the matched element according to certain relations.",
"experimental": true,
"parameters": [
{
- "name": "parentId",
- "description": "Pseudo element's parent element id.",
+ "name": "nodeId",
+ "description": "Id of the node from which to query the relation.",
"$ref": "NodeId"
},
{
- "name": "pseudoElement",
- "description": "The added pseudo element.",
- "$ref": "Node"
+ "name": "relation",
+ "description": "Type of relation to get.",
+ "type": "string",
+ "enum": [
+ "PopoverTarget",
+ "InterestTarget",
+ "CommandFor"
+ ]
+ }
+ ],
+ "returns": [
+ {
+ "name": "nodeId",
+ "description": "NodeId of the element matching the queried relation.",
+ "$ref": "NodeId"
}
]
},
{
- "name": "topLayerElementsUpdated",
- "description": "Called when top layer elements are changed.",
+ "name": "redo",
+ "description": "Re-does the last undone action.",
"experimental": true
},
{
- "name": "scrollableFlagUpdated",
- "description": "Fired when a node's scrollability state changes.",
- "experimental": true,
+ "name": "removeAttribute",
+ "description": "Removes attribute with given name from an element with given id.",
"parameters": [
{
"name": "nodeId",
- "description": "The id of the node.",
- "$ref": "DOM.NodeId"
+ "description": "Id of the element to remove attribute from.",
+ "$ref": "NodeId"
},
{
- "name": "isScrollable",
- "description": "If the node is scrollable.",
- "type": "boolean"
+ "name": "name",
+ "description": "Name of the attribute to remove.",
+ "type": "string"
}
]
},
{
- "name": "pseudoElementRemoved",
- "description": "Called when a pseudo element is removed from an element.",
- "experimental": true,
+ "name": "removeNode",
+ "description": "Removes node with given id.",
"parameters": [
{
- "name": "parentId",
- "description": "Pseudo element's parent element id.",
- "$ref": "NodeId"
- },
- {
- "name": "pseudoElementId",
- "description": "The removed pseudo element id.",
+ "name": "nodeId",
+ "description": "Id of the node to remove.",
"$ref": "NodeId"
}
]
},
{
- "name": "setChildNodes",
- "description": "Fired when backend wants to provide client with the missing DOM structure. This happens upon\nmost of the calls requesting node ids.",
+ "name": "requestChildNodes",
+ "description": "Requests that children of the node with given id are returned to the caller in form of\n`setChildNodes` events where not only immediate children are retrieved, but all children down to\nthe specified depth.",
"parameters": [
{
- "name": "parentId",
- "description": "Parent node id to populate with children.",
+ "name": "nodeId",
+ "description": "Id of the node to get children for.",
"$ref": "NodeId"
},
{
- "name": "nodes",
- "description": "Child nodes array.",
- "type": "array",
- "items": {
- "$ref": "Node"
- }
+ "name": "depth",
+ "description": "The maximum depth at which children should be retrieved, defaults to 1. Use -1 for the\nentire subtree or provide an integer larger than 0.",
+ "optional": true,
+ "type": "integer"
+ },
+ {
+ "name": "pierce",
+ "description": "Whether or not iframes and shadow roots should be traversed when returning the sub-tree\n(default is false).",
+ "optional": true,
+ "type": "boolean"
}
]
},
{
- "name": "shadowRootPopped",
- "description": "Called when shadow root is popped from the element.",
- "experimental": true,
+ "name": "requestNode",
+ "description": "Requests that the node is sent to the caller given the JavaScript node object reference. All\nnodes that form the path from the node to the root are also sent to the client as a series of\n`setChildNodes` notifications.",
"parameters": [
{
- "name": "hostId",
- "description": "Host element id.",
- "$ref": "NodeId"
- },
+ "name": "objectId",
+ "description": "JavaScript object id to convert into node.",
+ "$ref": "Runtime.RemoteObjectId"
+ }
+ ],
+ "returns": [
{
- "name": "rootId",
- "description": "Shadow root id.",
+ "name": "nodeId",
+ "description": "Node id for given object.",
"$ref": "NodeId"
}
]
},
{
- "name": "shadowRootPushed",
- "description": "Called when shadow root is pushed into the element.",
- "experimental": true,
+ "name": "resolveNode",
+ "description": "Resolves the JavaScript node object for a given NodeId or BackendNodeId.",
"parameters": [
{
- "name": "hostId",
- "description": "Host element id.",
+ "name": "nodeId",
+ "description": "Id of the node to resolve.",
+ "optional": true,
"$ref": "NodeId"
},
{
- "name": "root",
- "description": "Shadow root.",
- "$ref": "Node"
+ "name": "backendNodeId",
+ "description": "Backend identifier of the node to resolve.",
+ "optional": true,
+ "$ref": "DOM.BackendNodeId"
+ },
+ {
+ "name": "objectGroup",
+ "description": "Symbolic group name that can be used to release multiple objects.",
+ "optional": true,
+ "type": "string"
+ },
+ {
+ "name": "executionContextId",
+ "description": "Execution context in which to resolve the node.",
+ "optional": true,
+ "$ref": "Runtime.ExecutionContextId"
+ }
+ ],
+ "returns": [
+ {
+ "name": "object",
+ "description": "JavaScript object wrapper for given node.",
+ "$ref": "Runtime.RemoteObject"
}
]
- }
- ]
- },
- {
- "domain": "DOMDebugger",
- "description": "DOM debugging allows setting breakpoints on particular DOM operations and events. JavaScript\nexecution will stop on these operations as if there was a regular breakpoint set.",
- "dependencies": [
- "DOM",
- "Runtime"
- ],
- "types": [
+ },
{
- "id": "DOMBreakpointType",
- "description": "DOM breakpoint type.",
- "type": "string",
- "enum": [
- "subtree-modified",
- "attribute-modified",
- "node-removed"
- ]
- },
- {
- "id": "CSPViolationType",
- "description": "CSP Violation type.",
- "experimental": true,
- "type": "string",
- "enum": [
- "trustedtype-sink-violation",
- "trustedtype-policy-violation"
- ]
- },
- {
- "id": "EventListener",
- "description": "Object event listener.",
- "type": "object",
- "properties": [
- {
- "name": "type",
- "description": "`EventListener`'s type.",
- "type": "string"
- },
- {
- "name": "useCapture",
- "description": "`EventListener`'s useCapture.",
- "type": "boolean"
- },
- {
- "name": "passive",
- "description": "`EventListener`'s passive flag.",
- "type": "boolean"
- },
- {
- "name": "once",
- "description": "`EventListener`'s once flag.",
- "type": "boolean"
- },
+ "name": "setAttributeValue",
+ "description": "Sets attribute for an element with given id.",
+ "parameters": [
{
- "name": "scriptId",
- "description": "Script id of the handler code.",
- "$ref": "Runtime.ScriptId"
+ "name": "nodeId",
+ "description": "Id of the element to set attribute for.",
+ "$ref": "NodeId"
},
{
- "name": "lineNumber",
- "description": "Line number in the script (0-based).",
- "type": "integer"
+ "name": "name",
+ "description": "Attribute name.",
+ "type": "string"
},
{
- "name": "columnNumber",
- "description": "Column number in the script (0-based).",
- "type": "integer"
- },
+ "name": "value",
+ "description": "Attribute value.",
+ "type": "string"
+ }
+ ]
+ },
+ {
+ "name": "setAttributesAsText",
+ "description": "Sets attributes on element with given id. This method is useful when user edits some existing\nattribute value and types in several attribute name/value pairs.",
+ "parameters": [
{
- "name": "handler",
- "description": "Event handler function value.",
- "optional": true,
- "$ref": "Runtime.RemoteObject"
+ "name": "nodeId",
+ "description": "Id of the element to set attributes for.",
+ "$ref": "NodeId"
},
{
- "name": "originalHandler",
- "description": "Event original handler function value.",
- "optional": true,
- "$ref": "Runtime.RemoteObject"
+ "name": "text",
+ "description": "Text with a number of attributes. Will parse this text using HTML parser.",
+ "type": "string"
},
{
- "name": "backendNodeId",
- "description": "Node the listener is added to (if any).",
+ "name": "name",
+ "description": "Attribute name to replace with new attributes derived from text in case text parsed\nsuccessfully.",
"optional": true,
- "$ref": "DOM.BackendNodeId"
+ "type": "string"
}
]
- }
- ],
- "commands": [
+ },
{
- "name": "getEventListeners",
- "description": "Returns event listeners of the given object.",
+ "name": "setFileInputFiles",
+ "description": "Sets files for the given file input element.",
"parameters": [
{
- "name": "objectId",
- "description": "Identifier of the object to return listeners for.",
- "$ref": "Runtime.RemoteObjectId"
+ "name": "files",
+ "description": "Array of file paths to set.",
+ "type": "array",
+ "items": {
+ "type": "string"
+ }
},
{
- "name": "depth",
- "description": "The maximum depth at which Node children should be retrieved, defaults to 1. Use -1 for the\nentire subtree or provide an integer larger than 0.",
+ "name": "nodeId",
+ "description": "Identifier of the node.",
"optional": true,
- "type": "integer"
+ "$ref": "NodeId"
},
{
- "name": "pierce",
- "description": "Whether or not iframes and shadow roots should be traversed when returning the subtree\n(default is false). Reports listeners for all contexts if pierce is enabled.",
+ "name": "backendNodeId",
+ "description": "Identifier of the backend node.",
"optional": true,
- "type": "boolean"
- }
- ],
- "returns": [
+ "$ref": "BackendNodeId"
+ },
{
- "name": "listeners",
- "description": "Array of relevant listeners.",
- "type": "array",
- "items": {
- "$ref": "EventListener"
- }
+ "name": "objectId",
+ "description": "JavaScript object id of the node wrapper.",
+ "optional": true,
+ "$ref": "Runtime.RemoteObjectId"
}
]
},
{
- "name": "removeDOMBreakpoint",
- "description": "Removes DOM breakpoint that was set using `setDOMBreakpoint`.",
+ "name": "setNodeStackTracesEnabled",
+ "description": "Sets if stack traces should be captured for Nodes. See `Node.getNodeStackTraces`. Default is disabled.",
+ "experimental": true,
"parameters": [
{
- "name": "nodeId",
- "description": "Identifier of the node to remove breakpoint from.",
- "$ref": "DOM.NodeId"
- },
- {
- "name": "type",
- "description": "Type of the breakpoint to remove.",
- "$ref": "DOMBreakpointType"
+ "name": "enable",
+ "description": "Enable or disable.",
+ "type": "boolean"
}
]
},
{
- "name": "removeEventListenerBreakpoint",
- "description": "Removes breakpoint on particular DOM event.",
+ "name": "getNodeStackTraces",
+ "description": "Gets stack traces associated with a Node. As of now, only provides stack trace for Node creation.",
+ "experimental": true,
"parameters": [
{
- "name": "eventName",
- "description": "Event name.",
- "type": "string"
- },
+ "name": "nodeId",
+ "description": "Id of the node to get stack traces for.",
+ "$ref": "NodeId"
+ }
+ ],
+ "returns": [
{
- "name": "targetName",
- "description": "EventTarget interface name.",
- "experimental": true,
+ "name": "creation",
+ "description": "Creation stack trace, if available.",
"optional": true,
- "type": "string"
+ "$ref": "Runtime.StackTrace"
}
]
},
{
- "name": "removeInstrumentationBreakpoint",
- "description": "Removes breakpoint on particular native event.",
+ "name": "getFileInfo",
+ "description": "Returns file information for the given\nFile wrapper.",
"experimental": true,
- "deprecated": true,
- "redirect": "EventBreakpoints",
"parameters": [
{
- "name": "eventName",
- "description": "Instrumentation name to stop on.",
- "type": "string"
+ "name": "objectId",
+ "description": "JavaScript object id of the node wrapper.",
+ "$ref": "Runtime.RemoteObjectId"
}
- ]
- },
- {
- "name": "removeXHRBreakpoint",
- "description": "Removes breakpoint from XMLHttpRequest.",
- "parameters": [
+ ],
+ "returns": [
{
- "name": "url",
- "description": "Resource URL substring.",
+ "name": "path",
"type": "string"
}
]
},
{
- "name": "setBreakOnCSPViolation",
- "description": "Sets breakpoint on particular CSP violations.",
+ "name": "getDetachedDomNodes",
+ "description": "Returns list of detached nodes",
"experimental": true,
- "parameters": [
+ "returns": [
{
- "name": "violationTypes",
- "description": "CSP Violations to stop upon.",
+ "name": "detachedNodes",
+ "description": "The list of detached nodes",
"type": "array",
"items": {
- "$ref": "CSPViolationType"
+ "$ref": "DetachedElementInfo"
}
}
]
},
{
- "name": "setDOMBreakpoint",
- "description": "Sets breakpoint on particular operation with DOM.",
+ "name": "setInspectedNode",
+ "description": "Enables console to refer to the node with given id via $x (see Command Line API for more details\n$x functions).",
+ "experimental": true,
"parameters": [
{
"name": "nodeId",
- "description": "Identifier of the node to set breakpoint on.",
- "$ref": "DOM.NodeId"
- },
- {
- "name": "type",
- "description": "Type of the operation to stop upon.",
- "$ref": "DOMBreakpointType"
+ "description": "DOM node id to be accessible by means of $x command line API.",
+ "$ref": "NodeId"
}
]
},
{
- "name": "setEventListenerBreakpoint",
- "description": "Sets breakpoint on particular DOM event.",
+ "name": "setNodeName",
+ "description": "Sets node name for a node with given id.",
"parameters": [
{
- "name": "eventName",
- "description": "DOM Event name to stop on (any DOM event will do).",
- "type": "string"
+ "name": "nodeId",
+ "description": "Id of the node to set name for.",
+ "$ref": "NodeId"
},
{
- "name": "targetName",
- "description": "EventTarget interface name to stop on. If equal to `\"*\"` or not provided, will stop on any\nEventTarget.",
- "experimental": true,
- "optional": true,
+ "name": "name",
+ "description": "New node's name.",
"type": "string"
}
+ ],
+ "returns": [
+ {
+ "name": "nodeId",
+ "description": "New node's id.",
+ "$ref": "NodeId"
+ }
]
},
{
- "name": "setInstrumentationBreakpoint",
- "description": "Sets breakpoint on particular native event.",
- "experimental": true,
- "deprecated": true,
- "redirect": "EventBreakpoints",
+ "name": "setNodeValue",
+ "description": "Sets node value for a node with given id.",
"parameters": [
{
- "name": "eventName",
- "description": "Instrumentation name to stop on.",
+ "name": "nodeId",
+ "description": "Id of the node to set value for.",
+ "$ref": "NodeId"
+ },
+ {
+ "name": "value",
+ "description": "New node's value.",
"type": "string"
}
]
},
{
- "name": "setXHRBreakpoint",
- "description": "Sets breakpoint on XMLHttpRequest.",
+ "name": "setOuterHTML",
+ "description": "Sets node HTML markup, returns new node id.",
"parameters": [
{
- "name": "url",
- "description": "Resource URL substring. All XHRs having this substring in the URL will get stopped upon.",
- "type": "string"
- }
- ]
- }
- ]
- },
- {
- "domain": "EventBreakpoints",
- "description": "EventBreakpoints permits setting JavaScript breakpoints on operations and events\noccurring in native code invoked from JavaScript. Once breakpoint is hit, it is\nreported through Debugger domain, similarly to regular breakpoints being hit.",
- "experimental": true,
- "commands": [
- {
- "name": "setInstrumentationBreakpoint",
- "description": "Sets breakpoint on particular native event.",
- "parameters": [
+ "name": "nodeId",
+ "description": "Id of the node to set markup for.",
+ "$ref": "NodeId"
+ },
{
- "name": "eventName",
- "description": "Instrumentation name to stop on.",
+ "name": "outerHTML",
+ "description": "Outer HTML markup to set.",
"type": "string"
}
]
},
{
- "name": "removeInstrumentationBreakpoint",
- "description": "Removes breakpoint on particular native event.",
+ "name": "undo",
+ "description": "Undoes the last performed action.",
+ "experimental": true
+ },
+ {
+ "name": "getFrameOwner",
+ "description": "Returns iframe node that owns iframe with the given domain.",
+ "experimental": true,
"parameters": [
{
- "name": "eventName",
- "description": "Instrumentation name to stop on.",
- "type": "string"
+ "name": "frameId",
+ "$ref": "Page.FrameId"
+ }
+ ],
+ "returns": [
+ {
+ "name": "backendNodeId",
+ "description": "Resulting node.",
+ "$ref": "BackendNodeId"
+ },
+ {
+ "name": "nodeId",
+ "description": "Id of the node at given coordinates, only when enabled and requested document.",
+ "optional": true,
+ "$ref": "NodeId"
}
]
},
{
- "name": "disable",
- "description": "Removes all breakpoints"
- }
- ]
- },
- {
- "domain": "DOMSnapshot",
- "description": "This domain facilitates obtaining document snapshots with DOM, layout, and style information.",
- "experimental": true,
- "dependencies": [
- "CSS",
- "DOM",
- "DOMDebugger",
- "Page"
- ],
- "types": [
- {
- "id": "DOMNode",
- "description": "A Node in the DOM tree.",
- "type": "object",
- "properties": [
- {
- "name": "nodeType",
- "description": "`Node`'s nodeType.",
- "type": "integer"
- },
+ "name": "getContainerForNode",
+ "description": "Returns the query container of the given node based on container query\nconditions: containerName, physical and logical axes, and whether it queries\nscroll-state or anchored elements. If no axes are provided and\nqueriesScrollState is false, the style container is returned, which is the\ndirect parent or the closest element with a matching container-name.",
+ "experimental": true,
+ "parameters": [
{
- "name": "nodeName",
- "description": "`Node`'s nodeName.",
- "type": "string"
+ "name": "nodeId",
+ "$ref": "NodeId"
},
{
- "name": "nodeValue",
- "description": "`Node`'s nodeValue.",
+ "name": "containerName",
+ "optional": true,
"type": "string"
},
{
- "name": "textValue",
- "description": "Only set for textarea elements, contains the text value.",
+ "name": "physicalAxes",
"optional": true,
- "type": "string"
+ "$ref": "PhysicalAxes"
},
{
- "name": "inputValue",
- "description": "Only set for input elements, contains the input's associated text value.",
+ "name": "logicalAxes",
"optional": true,
- "type": "string"
+ "$ref": "LogicalAxes"
},
{
- "name": "inputChecked",
- "description": "Only set for radio and checkbox input elements, indicates if the element has been checked",
+ "name": "queriesScrollState",
"optional": true,
"type": "boolean"
},
{
- "name": "optionSelected",
- "description": "Only set for option elements, indicates if the element has been selected",
+ "name": "queriesAnchored",
"optional": true,
"type": "boolean"
- },
- {
- "name": "backendNodeId",
- "description": "`Node`'s id, corresponds to DOM.Node.backendNodeId.",
- "$ref": "DOM.BackendNodeId"
- },
+ }
+ ],
+ "returns": [
{
- "name": "childNodeIndexes",
- "description": "The indexes of the node's child nodes in the `domNodes` array returned by `getSnapshot`, if\nany.",
+ "name": "nodeId",
+ "description": "The container node for the given node, or null if not found.",
"optional": true,
+ "$ref": "NodeId"
+ }
+ ]
+ },
+ {
+ "name": "getQueryingDescendantsForContainer",
+ "description": "Returns the descendants of a container query container that have\ncontainer queries against this container.",
+ "experimental": true,
+ "parameters": [
+ {
+ "name": "nodeId",
+ "description": "Id of the container node to find querying descendants from.",
+ "$ref": "NodeId"
+ }
+ ],
+ "returns": [
+ {
+ "name": "nodeIds",
+ "description": "Descendant nodes with container queries against the given container.",
"type": "array",
"items": {
- "type": "integer"
+ "$ref": "NodeId"
}
+ }
+ ]
+ },
+ {
+ "name": "getAnchorElement",
+ "description": "Returns the target anchor element of the given anchor query according to\nhttps://www.w3.org/TR/css-anchor-position-1/#target.",
+ "experimental": true,
+ "parameters": [
+ {
+ "name": "nodeId",
+ "description": "Id of the positioned element from which to find the anchor.",
+ "$ref": "NodeId"
},
{
- "name": "attributes",
- "description": "Attributes of an `Element` node.",
+ "name": "anchorSpecifier",
+ "description": "An optional anchor specifier, as defined in\nhttps://www.w3.org/TR/css-anchor-position-1/#anchor-specifier.\nIf not provided, it will return the implicit anchor element for\nthe given positioned element.",
"optional": true,
- "type": "array",
- "items": {
- "$ref": "NameValue"
- }
+ "type": "string"
+ }
+ ],
+ "returns": [
+ {
+ "name": "nodeId",
+ "description": "The anchor element of the given anchor query.",
+ "$ref": "NodeId"
+ }
+ ]
+ },
+ {
+ "name": "forceShowPopover",
+ "description": "When enabling, this API force-opens the popover identified by nodeId\nand keeps it open until disabled.",
+ "experimental": true,
+ "parameters": [
+ {
+ "name": "nodeId",
+ "description": "Id of the popover HTMLElement",
+ "$ref": "NodeId"
},
{
- "name": "pseudoElementIndexes",
- "description": "Indexes of pseudo elements associated with this node in the `domNodes` array returned by\n`getSnapshot`, if any.",
- "optional": true,
+ "name": "enable",
+ "description": "If true, opens the popover and keeps it open. If false, closes the\npopover if it was previously force-opened.",
+ "type": "boolean"
+ }
+ ],
+ "returns": [
+ {
+ "name": "nodeIds",
+ "description": "List of popovers that were closed in order to respect popover stacking order.",
"type": "array",
"items": {
- "type": "integer"
+ "$ref": "NodeId"
}
- },
+ }
+ ]
+ }
+ ],
+ "events": [
+ {
+ "name": "attributeModified",
+ "description": "Fired when `Element`'s attribute is modified.",
+ "parameters": [
{
- "name": "layoutNodeIndex",
- "description": "The index of the node's related layout tree node in the `layoutTreeNodes` array returned by\n`getSnapshot`, if any.",
- "optional": true,
- "type": "integer"
+ "name": "nodeId",
+ "description": "Id of the node that has changed.",
+ "$ref": "NodeId"
},
{
- "name": "documentURL",
- "description": "Document URL that `Document` or `FrameOwner` node points to.",
- "optional": true,
+ "name": "name",
+ "description": "Attribute name.",
"type": "string"
},
{
- "name": "baseURL",
- "description": "Base URL that `Document` or `FrameOwner` node uses for URL completion.",
- "optional": true,
+ "name": "value",
+ "description": "Attribute value.",
"type": "string"
- },
+ }
+ ]
+ },
+ {
+ "name": "adoptedStyleSheetsModified",
+ "description": "Fired when `Element`'s adoptedStyleSheets are modified.",
+ "experimental": true,
+ "parameters": [
{
- "name": "contentLanguage",
- "description": "Only set for documents, contains the document's content language.",
- "optional": true,
- "type": "string"
+ "name": "nodeId",
+ "description": "Id of the node that has changed.",
+ "$ref": "NodeId"
},
{
- "name": "documentEncoding",
- "description": "Only set for documents, contains the document's character set encoding.",
- "optional": true,
- "type": "string"
- },
+ "name": "adoptedStyleSheets",
+ "description": "New adoptedStyleSheets array.",
+ "experimental": true,
+ "type": "array",
+ "items": {
+ "$ref": "StyleSheetId"
+ }
+ }
+ ]
+ },
+ {
+ "name": "attributeRemoved",
+ "description": "Fired when `Element`'s attribute is removed.",
+ "parameters": [
{
- "name": "publicId",
- "description": "`DocumentType` node's publicId.",
- "optional": true,
- "type": "string"
+ "name": "nodeId",
+ "description": "Id of the node that has changed.",
+ "$ref": "NodeId"
},
{
- "name": "systemId",
- "description": "`DocumentType` node's systemId.",
- "optional": true,
+ "name": "name",
+ "description": "A ttribute name.",
"type": "string"
- },
- {
- "name": "frameId",
- "description": "Frame ID for frame owner elements and also for the document node.",
- "optional": true,
- "$ref": "Page.FrameId"
- },
- {
- "name": "contentDocumentIndex",
- "description": "The index of a frame owner element's content document in the `domNodes` array returned by\n`getSnapshot`, if any.",
- "optional": true,
- "type": "integer"
- },
- {
- "name": "pseudoType",
- "description": "Type of a pseudo element node.",
- "optional": true,
- "$ref": "DOM.PseudoType"
- },
- {
- "name": "shadowRootType",
- "description": "Shadow root type.",
- "optional": true,
- "$ref": "DOM.ShadowRootType"
- },
- {
- "name": "isClickable",
- "description": "Whether this DOM node responds to mouse clicks. This includes nodes that have had click\nevent listeners attached via JavaScript as well as anchor tags that naturally navigate when\nclicked.",
- "optional": true,
- "type": "boolean"
- },
- {
- "name": "eventListeners",
- "description": "Details of the node's event listeners, if any.",
- "optional": true,
- "type": "array",
- "items": {
- "$ref": "DOMDebugger.EventListener"
- }
- },
+ }
+ ]
+ },
+ {
+ "name": "characterDataModified",
+ "description": "Mirrors `DOMCharacterDataModified` event.",
+ "parameters": [
{
- "name": "currentSourceURL",
- "description": "The selected url for nodes with a srcset attribute.",
- "optional": true,
- "type": "string"
+ "name": "nodeId",
+ "description": "Id of the node that has changed.",
+ "$ref": "NodeId"
},
{
- "name": "originURL",
- "description": "The url of the script (if any) that generates this node.",
- "optional": true,
+ "name": "characterData",
+ "description": "New text value.",
"type": "string"
- },
+ }
+ ]
+ },
+ {
+ "name": "childNodeCountUpdated",
+ "description": "Fired when `Container`'s child node count has changed.",
+ "parameters": [
{
- "name": "scrollOffsetX",
- "description": "Scroll offsets, set when this node is a Document.",
- "optional": true,
- "type": "number"
+ "name": "nodeId",
+ "description": "Id of the node that has changed.",
+ "$ref": "NodeId"
},
{
- "name": "scrollOffsetY",
- "optional": true,
- "type": "number"
+ "name": "childNodeCount",
+ "description": "New node count.",
+ "type": "integer"
}
]
},
{
- "id": "InlineTextBox",
- "description": "Details of post layout rendered text positions. The exact layout should not be regarded as\nstable and may change between versions.",
- "type": "object",
- "properties": [
+ "name": "childNodeInserted",
+ "description": "Mirrors `DOMNodeInserted` event.",
+ "parameters": [
{
- "name": "boundingBox",
- "description": "The bounding box in document coordinates. Note that scroll offset of the document is ignored.",
- "$ref": "DOM.Rect"
+ "name": "parentNodeId",
+ "description": "Id of the node that has changed.",
+ "$ref": "NodeId"
},
{
- "name": "startCharacterIndex",
- "description": "The starting index in characters, for this post layout textbox substring. Characters that\nwould be represented as a surrogate pair in UTF-16 have length 2.",
- "type": "integer"
+ "name": "previousNodeId",
+ "description": "Id of the previous sibling.",
+ "$ref": "NodeId"
},
{
- "name": "numCharacters",
- "description": "The number of characters in this post layout textbox substring. Characters that would be\nrepresented as a surrogate pair in UTF-16 have length 2.",
- "type": "integer"
+ "name": "node",
+ "description": "Inserted node data.",
+ "$ref": "Node"
}
]
},
{
- "id": "LayoutTreeNode",
- "description": "Details of an element in the DOM tree with a LayoutObject.",
- "type": "object",
- "properties": [
+ "name": "childNodeRemoved",
+ "description": "Mirrors `DOMNodeRemoved` event.",
+ "parameters": [
{
- "name": "domNodeIndex",
- "description": "The index of the related DOM node in the `domNodes` array returned by `getSnapshot`.",
- "type": "integer"
+ "name": "parentNodeId",
+ "description": "Parent id.",
+ "$ref": "NodeId"
},
{
- "name": "boundingBox",
- "description": "The bounding box in document coordinates. Note that scroll offset of the document is ignored.",
- "$ref": "DOM.Rect"
- },
+ "name": "nodeId",
+ "description": "Id of the node that has been removed.",
+ "$ref": "NodeId"
+ }
+ ]
+ },
+ {
+ "name": "distributedNodesUpdated",
+ "description": "Called when distribution is changed.",
+ "experimental": true,
+ "parameters": [
{
- "name": "layoutText",
- "description": "Contents of the LayoutText, if any.",
- "optional": true,
- "type": "string"
+ "name": "insertionPointId",
+ "description": "Insertion point where distributed nodes were updated.",
+ "$ref": "NodeId"
},
{
- "name": "inlineTextNodes",
- "description": "The post-layout inline text nodes, if any.",
- "optional": true,
+ "name": "distributedNodes",
+ "description": "Distributed nodes for given insertion point.",
"type": "array",
"items": {
- "$ref": "InlineTextBox"
+ "$ref": "BackendNode"
}
- },
- {
- "name": "styleIndex",
- "description": "Index into the `computedStyles` array returned by `getSnapshot`.",
- "optional": true,
- "type": "integer"
- },
- {
- "name": "paintOrder",
- "description": "Global paint order index, which is determined by the stacking order of the nodes. Nodes\nthat are painted together will have the same index. Only provided if includePaintOrder in\ngetSnapshot was true.",
- "optional": true,
- "type": "integer"
- },
- {
- "name": "isStackingContext",
- "description": "Set to true to indicate the element begins a new stacking context.",
- "optional": true,
- "type": "boolean"
}
]
},
{
- "id": "ComputedStyle",
- "description": "A subset of the full ComputedStyle as defined by the request whitelist.",
- "type": "object",
- "properties": [
+ "name": "documentUpdated",
+ "description": "Fired when `Document` has been totally updated. Node ids are no longer valid."
+ },
+ {
+ "name": "inlineStyleInvalidated",
+ "description": "Fired when `Element`'s inline style is modified via a CSS property modification.",
+ "experimental": true,
+ "parameters": [
{
- "name": "properties",
- "description": "Name/value pairs of computed style properties.",
+ "name": "nodeIds",
+ "description": "Ids of the nodes for which the inline styles have been invalidated.",
"type": "array",
"items": {
- "$ref": "NameValue"
+ "$ref": "NodeId"
}
}
]
},
{
- "id": "NameValue",
- "description": "A name/value pair.",
- "type": "object",
- "properties": [
+ "name": "pseudoElementAdded",
+ "description": "Called when a pseudo element is added to an element.",
+ "experimental": true,
+ "parameters": [
{
- "name": "name",
- "description": "Attribute/property name.",
- "type": "string"
+ "name": "parentId",
+ "description": "Pseudo element's parent element id.",
+ "$ref": "NodeId"
},
{
- "name": "value",
- "description": "Attribute/property value.",
- "type": "string"
+ "name": "pseudoElement",
+ "description": "The added pseudo element.",
+ "$ref": "Node"
}
]
},
{
- "id": "StringIndex",
- "description": "Index of the string in the strings table.",
- "type": "integer"
+ "name": "topLayerElementsUpdated",
+ "description": "Called when top layer elements are changed.",
+ "experimental": true
},
{
- "id": "ArrayOfStrings",
- "description": "Index of the string in the strings table.",
- "type": "array",
- "items": {
- "$ref": "StringIndex"
- }
+ "name": "scrollableFlagUpdated",
+ "description": "Fired when a node's scrollability state changes.",
+ "experimental": true,
+ "parameters": [
+ {
+ "name": "nodeId",
+ "description": "The id of the node.",
+ "$ref": "DOM.NodeId"
+ },
+ {
+ "name": "isScrollable",
+ "description": "If the node is scrollable.",
+ "type": "boolean"
+ }
+ ]
},
{
- "id": "RareStringData",
- "description": "Data that is only present on rare nodes.",
- "type": "object",
- "properties": [
+ "name": "adRelatedStateUpdated",
+ "description": "Fired when a node's ad related state changes.",
+ "experimental": true,
+ "parameters": [
{
- "name": "index",
- "type": "array",
- "items": {
- "type": "integer"
- }
+ "name": "nodeId",
+ "description": "The id of the node.",
+ "$ref": "DOM.NodeId"
},
{
- "name": "value",
- "type": "array",
- "items": {
- "$ref": "StringIndex"
- }
+ "name": "adProvenance",
+ "description": "The provenance of the ad related node, if it is ad related.",
+ "optional": true,
+ "$ref": "Network.AdProvenance"
}
]
},
{
- "id": "RareBooleanData",
- "type": "object",
- "properties": [
+ "name": "affectedByStartingStylesFlagUpdated",
+ "description": "Fired when a node's starting styles changes.",
+ "experimental": true,
+ "parameters": [
{
- "name": "index",
- "type": "array",
- "items": {
- "type": "integer"
- }
+ "name": "nodeId",
+ "description": "The id of the node.",
+ "$ref": "DOM.NodeId"
+ },
+ {
+ "name": "affectedByStartingStyles",
+ "description": "If the node has starting styles.",
+ "type": "boolean"
}
]
},
{
- "id": "RareIntegerData",
- "type": "object",
- "properties": [
+ "name": "pseudoElementRemoved",
+ "description": "Called when a pseudo element is removed from an element.",
+ "experimental": true,
+ "parameters": [
{
- "name": "index",
- "type": "array",
- "items": {
- "type": "integer"
- }
+ "name": "parentId",
+ "description": "Pseudo element's parent element id.",
+ "$ref": "NodeId"
},
{
- "name": "value",
+ "name": "pseudoElementId",
+ "description": "The removed pseudo element id.",
+ "$ref": "NodeId"
+ }
+ ]
+ },
+ {
+ "name": "setChildNodes",
+ "description": "Fired when backend wants to provide client with the missing DOM structure. This happens upon\nmost of the calls requesting node ids.",
+ "parameters": [
+ {
+ "name": "parentId",
+ "description": "Parent node id to populate with children.",
+ "$ref": "NodeId"
+ },
+ {
+ "name": "nodes",
+ "description": "Child nodes array.",
"type": "array",
"items": {
- "type": "integer"
+ "$ref": "Node"
}
}
]
},
{
- "id": "Rectangle",
- "type": "array",
- "items": {
- "type": "number"
- }
- },
- {
- "id": "DocumentSnapshot",
- "description": "Document snapshot.",
- "type": "object",
- "properties": [
- {
- "name": "documentURL",
- "description": "Document URL that `Document` or `FrameOwner` node points to.",
- "$ref": "StringIndex"
- },
+ "name": "shadowRootPopped",
+ "description": "Called when shadow root is popped from the element.",
+ "experimental": true,
+ "parameters": [
{
- "name": "title",
- "description": "Document title.",
- "$ref": "StringIndex"
+ "name": "hostId",
+ "description": "Host element id.",
+ "$ref": "NodeId"
},
{
- "name": "baseURL",
- "description": "Base URL that `Document` or `FrameOwner` node uses for URL completion.",
- "$ref": "StringIndex"
- },
+ "name": "rootId",
+ "description": "Shadow root id.",
+ "$ref": "NodeId"
+ }
+ ]
+ },
+ {
+ "name": "shadowRootPushed",
+ "description": "Called when shadow root is pushed into the element.",
+ "experimental": true,
+ "parameters": [
{
- "name": "contentLanguage",
- "description": "Contains the document's content language.",
- "$ref": "StringIndex"
+ "name": "hostId",
+ "description": "Host element id.",
+ "$ref": "NodeId"
},
{
- "name": "encodingName",
- "description": "Contains the document's character set encoding.",
- "$ref": "StringIndex"
- },
+ "name": "root",
+ "description": "Shadow root.",
+ "$ref": "Node"
+ }
+ ]
+ }
+ ]
+ },
+ {
+ "domain": "DOMDebugger",
+ "description": "DOM debugging allows setting breakpoints on particular DOM operations and events. JavaScript\nexecution will stop on these operations as if there was a regular breakpoint set.",
+ "dependencies": [
+ "DOM",
+ "Runtime"
+ ],
+ "types": [
+ {
+ "id": "DOMBreakpointType",
+ "description": "DOM breakpoint type.",
+ "type": "string",
+ "enum": [
+ "subtree-modified",
+ "attribute-modified",
+ "node-removed"
+ ]
+ },
+ {
+ "id": "CSPViolationType",
+ "description": "CSP Violation type.",
+ "experimental": true,
+ "type": "string",
+ "enum": [
+ "trustedtype-sink-violation",
+ "trustedtype-policy-violation"
+ ]
+ },
+ {
+ "id": "EventListener",
+ "description": "Object event listener.",
+ "type": "object",
+ "properties": [
{
- "name": "publicId",
- "description": "`DocumentType` node's publicId.",
- "$ref": "StringIndex"
+ "name": "type",
+ "description": "`EventListener`'s type.",
+ "type": "string"
},
{
- "name": "systemId",
- "description": "`DocumentType` node's systemId.",
- "$ref": "StringIndex"
+ "name": "useCapture",
+ "description": "`EventListener`'s useCapture.",
+ "type": "boolean"
},
{
- "name": "frameId",
- "description": "Frame ID for frame owner elements and also for the document node.",
- "$ref": "StringIndex"
+ "name": "passive",
+ "description": "`EventListener`'s passive flag.",
+ "type": "boolean"
},
{
- "name": "nodes",
- "description": "A table with dom nodes.",
- "$ref": "NodeTreeSnapshot"
+ "name": "once",
+ "description": "`EventListener`'s once flag.",
+ "type": "boolean"
},
{
- "name": "layout",
- "description": "The nodes in the layout tree.",
- "$ref": "LayoutTreeSnapshot"
+ "name": "scriptId",
+ "description": "Script id of the handler code.",
+ "$ref": "Runtime.ScriptId"
},
{
- "name": "textBoxes",
- "description": "The post-layout inline text nodes.",
- "$ref": "TextBoxSnapshot"
+ "name": "lineNumber",
+ "description": "Line number in the script (0-based).",
+ "type": "integer"
},
{
- "name": "scrollOffsetX",
- "description": "Horizontal scroll offset.",
- "optional": true,
- "type": "number"
+ "name": "columnNumber",
+ "description": "Column number in the script (0-based).",
+ "type": "integer"
},
{
- "name": "scrollOffsetY",
- "description": "Vertical scroll offset.",
+ "name": "handler",
+ "description": "Event handler function value.",
"optional": true,
- "type": "number"
+ "$ref": "Runtime.RemoteObject"
},
{
- "name": "contentWidth",
- "description": "Document content width.",
+ "name": "originalHandler",
+ "description": "Event original handler function value.",
"optional": true,
- "type": "number"
+ "$ref": "Runtime.RemoteObject"
},
{
- "name": "contentHeight",
- "description": "Document content height.",
+ "name": "backendNodeId",
+ "description": "Node the listener is added to (if any).",
"optional": true,
- "type": "number"
+ "$ref": "DOM.BackendNodeId"
}
]
- },
+ }
+ ],
+ "commands": [
{
- "id": "NodeTreeSnapshot",
- "description": "Table containing nodes.",
- "type": "object",
- "properties": [
+ "name": "getEventListeners",
+ "description": "Returns event listeners of the given object.",
+ "parameters": [
{
- "name": "parentIndex",
- "description": "Parent node index.",
- "optional": true,
- "type": "array",
- "items": {
- "type": "integer"
- }
+ "name": "objectId",
+ "description": "Identifier of the object to return listeners for.",
+ "$ref": "Runtime.RemoteObjectId"
},
{
- "name": "nodeType",
- "description": "`Node`'s nodeType.",
+ "name": "depth",
+ "description": "The maximum depth at which Node children should be retrieved, defaults to 1. Use -1 for the\nentire subtree or provide an integer larger than 0.",
"optional": true,
- "type": "array",
- "items": {
- "type": "integer"
- }
+ "type": "integer"
},
{
- "name": "shadowRootType",
- "description": "Type of the shadow root the `Node` is in. String values are equal to the `ShadowRootType` enum.",
+ "name": "pierce",
+ "description": "Whether or not iframes and shadow roots should be traversed when returning the subtree\n(default is false). Reports listeners for all contexts if pierce is enabled.",
"optional": true,
- "$ref": "RareStringData"
- },
+ "type": "boolean"
+ }
+ ],
+ "returns": [
{
- "name": "nodeName",
- "description": "`Node`'s nodeName.",
- "optional": true,
+ "name": "listeners",
+ "description": "Array of relevant listeners.",
"type": "array",
"items": {
- "$ref": "StringIndex"
- }
- },
- {
- "name": "nodeValue",
- "description": "`Node`'s nodeValue.",
- "optional": true,
- "type": "array",
- "items": {
- "$ref": "StringIndex"
+ "$ref": "EventListener"
}
+ }
+ ]
+ },
+ {
+ "name": "removeDOMBreakpoint",
+ "description": "Removes DOM breakpoint that was set using `setDOMBreakpoint`.",
+ "parameters": [
+ {
+ "name": "nodeId",
+ "description": "Identifier of the node to remove breakpoint from.",
+ "$ref": "DOM.NodeId"
},
{
- "name": "backendNodeId",
- "description": "`Node`'s id, corresponds to DOM.Node.backendNodeId.",
- "optional": true,
- "type": "array",
- "items": {
- "$ref": "DOM.BackendNodeId"
- }
+ "name": "type",
+ "description": "Type of the breakpoint to remove.",
+ "$ref": "DOMBreakpointType"
+ }
+ ]
+ },
+ {
+ "name": "removeEventListenerBreakpoint",
+ "description": "Removes breakpoint on particular DOM event.",
+ "parameters": [
+ {
+ "name": "eventName",
+ "description": "Event name.",
+ "type": "string"
},
{
- "name": "attributes",
- "description": "Attributes of an `Element` node. Flatten name, value pairs.",
+ "name": "targetName",
+ "description": "EventTarget interface name.",
+ "experimental": true,
"optional": true,
+ "type": "string"
+ }
+ ]
+ },
+ {
+ "name": "removeInstrumentationBreakpoint",
+ "description": "Removes breakpoint on particular native event.",
+ "experimental": true,
+ "deprecated": true,
+ "redirect": "EventBreakpoints",
+ "parameters": [
+ {
+ "name": "eventName",
+ "description": "Instrumentation name to stop on.",
+ "type": "string"
+ }
+ ]
+ },
+ {
+ "name": "removeXHRBreakpoint",
+ "description": "Removes breakpoint from XMLHttpRequest.",
+ "parameters": [
+ {
+ "name": "url",
+ "description": "Resource URL substring.",
+ "type": "string"
+ }
+ ]
+ },
+ {
+ "name": "setBreakOnCSPViolation",
+ "description": "Sets breakpoint on particular CSP violations.",
+ "experimental": true,
+ "parameters": [
+ {
+ "name": "violationTypes",
+ "description": "CSP Violations to stop upon.",
"type": "array",
"items": {
- "$ref": "ArrayOfStrings"
+ "$ref": "CSPViolationType"
}
+ }
+ ]
+ },
+ {
+ "name": "setDOMBreakpoint",
+ "description": "Sets breakpoint on particular operation with DOM.",
+ "parameters": [
+ {
+ "name": "nodeId",
+ "description": "Identifier of the node to set breakpoint on.",
+ "$ref": "DOM.NodeId"
},
{
- "name": "textValue",
- "description": "Only set for textarea elements, contains the text value.",
- "optional": true,
- "$ref": "RareStringData"
+ "name": "type",
+ "description": "Type of the operation to stop upon.",
+ "$ref": "DOMBreakpointType"
+ }
+ ]
+ },
+ {
+ "name": "setEventListenerBreakpoint",
+ "description": "Sets breakpoint on particular DOM event.",
+ "parameters": [
+ {
+ "name": "eventName",
+ "description": "DOM Event name to stop on (any DOM event will do).",
+ "type": "string"
},
{
- "name": "inputValue",
- "description": "Only set for input elements, contains the input's associated text value.",
+ "name": "targetName",
+ "description": "EventTarget interface name to stop on. If equal to `\"*\"` or not provided, will stop on any\nEventTarget.",
+ "experimental": true,
"optional": true,
- "$ref": "RareStringData"
+ "type": "string"
+ }
+ ]
+ },
+ {
+ "name": "setInstrumentationBreakpoint",
+ "description": "Sets breakpoint on particular native event.",
+ "experimental": true,
+ "deprecated": true,
+ "redirect": "EventBreakpoints",
+ "parameters": [
+ {
+ "name": "eventName",
+ "description": "Instrumentation name to stop on.",
+ "type": "string"
+ }
+ ]
+ },
+ {
+ "name": "setXHRBreakpoint",
+ "description": "Sets breakpoint on XMLHttpRequest.",
+ "parameters": [
+ {
+ "name": "url",
+ "description": "Resource URL substring. All XHRs having this substring in the URL will get stopped upon.",
+ "type": "string"
+ }
+ ]
+ }
+ ]
+ },
+ {
+ "domain": "DOMSnapshot",
+ "description": "This domain facilitates obtaining document snapshots with DOM, layout, and style information.",
+ "experimental": true,
+ "dependencies": [
+ "CSS",
+ "DOM",
+ "DOMDebugger",
+ "Page"
+ ],
+ "types": [
+ {
+ "id": "DOMNode",
+ "description": "A Node in the DOM tree.",
+ "type": "object",
+ "properties": [
+ {
+ "name": "nodeType",
+ "description": "`Node`'s nodeType.",
+ "type": "integer"
},
{
- "name": "inputChecked",
- "description": "Only set for radio and checkbox input elements, indicates if the element has been checked",
- "optional": true,
- "$ref": "RareBooleanData"
+ "name": "nodeName",
+ "description": "`Node`'s nodeName.",
+ "type": "string"
},
{
- "name": "optionSelected",
- "description": "Only set for option elements, indicates if the element has been selected",
- "optional": true,
- "$ref": "RareBooleanData"
+ "name": "nodeValue",
+ "description": "`Node`'s nodeValue.",
+ "type": "string"
},
{
- "name": "contentDocumentIndex",
- "description": "The index of the document in the list of the snapshot documents.",
+ "name": "textValue",
+ "description": "Only set for textarea elements, contains the text value.",
"optional": true,
- "$ref": "RareIntegerData"
+ "type": "string"
},
{
- "name": "pseudoType",
- "description": "Type of a pseudo element node.",
+ "name": "inputValue",
+ "description": "Only set for input elements, contains the input's associated text value.",
"optional": true,
- "$ref": "RareStringData"
+ "type": "string"
},
{
- "name": "pseudoIdentifier",
- "description": "Pseudo element identifier for this node. Only present if there is a\nvalid pseudoType.",
+ "name": "inputChecked",
+ "description": "Only set for radio and checkbox input elements, indicates if the element has been checked",
"optional": true,
- "$ref": "RareStringData"
+ "type": "boolean"
},
{
- "name": "isClickable",
- "description": "Whether this DOM node responds to mouse clicks. This includes nodes that have had click\nevent listeners attached via JavaScript as well as anchor tags that naturally navigate when\nclicked.",
+ "name": "optionSelected",
+ "description": "Only set for option elements, indicates if the element has been selected",
"optional": true,
- "$ref": "RareBooleanData"
+ "type": "boolean"
},
{
- "name": "currentSourceURL",
- "description": "The selected url for nodes with a srcset attribute.",
- "optional": true,
- "$ref": "RareStringData"
+ "name": "backendNodeId",
+ "description": "`Node`'s id, corresponds to DOM.Node.backendNodeId.",
+ "$ref": "DOM.BackendNodeId"
},
{
- "name": "originURL",
- "description": "The url of the script (if any) that generates this node.",
+ "name": "childNodeIndexes",
+ "description": "The indexes of the node's child nodes in the `domNodes` array returned by `getSnapshot`, if\nany.",
"optional": true,
- "$ref": "RareStringData"
- }
- ]
- },
- {
- "id": "LayoutTreeSnapshot",
- "description": "Table of details of an element in the DOM tree with a LayoutObject.",
- "type": "object",
- "properties": [
- {
- "name": "nodeIndex",
- "description": "Index of the corresponding node in the `NodeTreeSnapshot` array returned by `captureSnapshot`.",
"type": "array",
"items": {
"type": "integer"
}
},
{
- "name": "styles",
- "description": "Array of indexes specifying computed style strings, filtered according to the `computedStyles` parameter passed to `captureSnapshot`.",
- "type": "array",
- "items": {
- "$ref": "ArrayOfStrings"
- }
- },
- {
- "name": "bounds",
- "description": "The absolute position bounding box.",
+ "name": "attributes",
+ "description": "Attributes of an `Element` node.",
+ "optional": true,
"type": "array",
"items": {
- "$ref": "Rectangle"
+ "$ref": "NameValue"
}
},
{
- "name": "text",
- "description": "Contents of the LayoutText, if any.",
+ "name": "pseudoElementIndexes",
+ "description": "Indexes of pseudo elements associated with this node in the `domNodes` array returned by\n`getSnapshot`, if any.",
+ "optional": true,
"type": "array",
"items": {
- "$ref": "StringIndex"
+ "type": "integer"
}
},
{
- "name": "stackingContexts",
- "description": "Stacking context information.",
- "$ref": "RareBooleanData"
+ "name": "layoutNodeIndex",
+ "description": "The index of the node's related layout tree node in the `layoutTreeNodes` array returned by\n`getSnapshot`, if any.",
+ "optional": true,
+ "type": "integer"
},
{
- "name": "paintOrders",
- "description": "Global paint order index, which is determined by the stacking order of the nodes. Nodes\nthat are painted together will have the same index. Only provided if includePaintOrder in\ncaptureSnapshot was true.",
+ "name": "documentURL",
+ "description": "Document URL that `Document` or `FrameOwner` node points to.",
"optional": true,
- "type": "array",
- "items": {
- "type": "integer"
- }
+ "type": "string"
},
{
- "name": "offsetRects",
- "description": "The offset rect of nodes. Only available when includeDOMRects is set to true",
+ "name": "baseURL",
+ "description": "Base URL that `Document` or `FrameOwner` node uses for URL completion.",
"optional": true,
- "type": "array",
- "items": {
- "$ref": "Rectangle"
- }
+ "type": "string"
},
{
- "name": "scrollRects",
- "description": "The scroll rect of nodes. Only available when includeDOMRects is set to true",
+ "name": "contentLanguage",
+ "description": "Only set for documents, contains the document's content language.",
"optional": true,
- "type": "array",
- "items": {
- "$ref": "Rectangle"
- }
+ "type": "string"
},
{
- "name": "clientRects",
- "description": "The client rect of nodes. Only available when includeDOMRects is set to true",
+ "name": "documentEncoding",
+ "description": "Only set for documents, contains the document's character set encoding.",
"optional": true,
- "type": "array",
- "items": {
- "$ref": "Rectangle"
- }
+ "type": "string"
},
{
- "name": "blendedBackgroundColors",
- "description": "The list of background colors that are blended with colors of overlapping elements.",
- "experimental": true,
+ "name": "publicId",
+ "description": "`DocumentType` node's publicId.",
"optional": true,
- "type": "array",
- "items": {
- "$ref": "StringIndex"
- }
+ "type": "string"
},
{
- "name": "textColorOpacities",
- "description": "The list of computed text opacities.",
- "experimental": true,
+ "name": "systemId",
+ "description": "`DocumentType` node's systemId.",
+ "optional": true,
+ "type": "string"
+ },
+ {
+ "name": "frameId",
+ "description": "Frame ID for frame owner elements and also for the document node.",
+ "optional": true,
+ "$ref": "Page.FrameId"
+ },
+ {
+ "name": "contentDocumentIndex",
+ "description": "The index of a frame owner element's content document in the `domNodes` array returned by\n`getSnapshot`, if any.",
+ "optional": true,
+ "type": "integer"
+ },
+ {
+ "name": "pseudoType",
+ "description": "Type of a pseudo element node.",
+ "optional": true,
+ "$ref": "DOM.PseudoType"
+ },
+ {
+ "name": "shadowRootType",
+ "description": "Shadow root type.",
+ "optional": true,
+ "$ref": "DOM.ShadowRootType"
+ },
+ {
+ "name": "isClickable",
+ "description": "Whether this DOM node responds to mouse clicks. This includes nodes that have had click\nevent listeners attached via JavaScript as well as anchor tags that naturally navigate when\nclicked.",
+ "optional": true,
+ "type": "boolean"
+ },
+ {
+ "name": "eventListeners",
+ "description": "Details of the node's event listeners, if any.",
"optional": true,
"type": "array",
"items": {
- "type": "number"
+ "$ref": "DOMDebugger.EventListener"
}
+ },
+ {
+ "name": "currentSourceURL",
+ "description": "The selected url for nodes with a srcset attribute.",
+ "optional": true,
+ "type": "string"
+ },
+ {
+ "name": "originURL",
+ "description": "The url of the script (if any) that generates this node.",
+ "optional": true,
+ "type": "string"
+ },
+ {
+ "name": "scrollOffsetX",
+ "description": "Scroll offsets, set when this node is a Document.",
+ "optional": true,
+ "type": "number"
+ },
+ {
+ "name": "scrollOffsetY",
+ "optional": true,
+ "type": "number"
}
]
},
{
- "id": "TextBoxSnapshot",
- "description": "Table of details of the post layout rendered text positions. The exact layout should not be regarded as\nstable and may change between versions.",
+ "id": "InlineTextBox",
+ "description": "Details of post layout rendered text positions. The exact layout should not be regarded as\nstable and may change between versions.",
"type": "object",
"properties": [
{
- "name": "layoutIndex",
- "description": "Index of the layout tree node that owns this box collection.",
- "type": "array",
- "items": {
- "type": "integer"
- }
- },
- {
- "name": "bounds",
- "description": "The absolute position bounding box.",
- "type": "array",
- "items": {
- "$ref": "Rectangle"
- }
+ "name": "boundingBox",
+ "description": "The bounding box in document coordinates. Note that scroll offset of the document is ignored.",
+ "$ref": "DOM.Rect"
},
{
- "name": "start",
+ "name": "startCharacterIndex",
"description": "The starting index in characters, for this post layout textbox substring. Characters that\nwould be represented as a surrogate pair in UTF-16 have length 2.",
- "type": "array",
- "items": {
- "type": "integer"
- }
+ "type": "integer"
},
{
- "name": "length",
+ "name": "numCharacters",
"description": "The number of characters in this post layout textbox substring. Characters that would be\nrepresented as a surrogate pair in UTF-16 have length 2.",
- "type": "array",
- "items": {
- "type": "integer"
- }
+ "type": "integer"
}
]
- }
- ],
- "commands": [
- {
- "name": "disable",
- "description": "Disables DOM snapshot agent for the given page."
- },
- {
- "name": "enable",
- "description": "Enables DOM snapshot agent for the given page."
},
{
- "name": "getSnapshot",
- "description": "Returns a document snapshot, including the full DOM tree of the root node (including iframes,\ntemplate contents, and imported documents) in a flattened array, as well as layout and\nwhite-listed computed style information for the nodes. Shadow DOM in the returned DOM tree is\nflattened.",
- "deprecated": true,
- "parameters": [
+ "id": "LayoutTreeNode",
+ "description": "Details of an element in the DOM tree with a LayoutObject.",
+ "type": "object",
+ "properties": [
{
- "name": "computedStyleWhitelist",
- "description": "Whitelist of computed styles to return.",
- "type": "array",
- "items": {
- "type": "string"
- }
+ "name": "domNodeIndex",
+ "description": "The index of the related DOM node in the `domNodes` array returned by `getSnapshot`.",
+ "type": "integer"
},
{
- "name": "includeEventListeners",
- "description": "Whether or not to retrieve details of DOM listeners (default false).",
- "optional": true,
- "type": "boolean"
+ "name": "boundingBox",
+ "description": "The bounding box in document coordinates. Note that scroll offset of the document is ignored.",
+ "$ref": "DOM.Rect"
},
{
- "name": "includePaintOrder",
- "description": "Whether to determine and include the paint order index of LayoutTreeNodes (default false).",
+ "name": "layoutText",
+ "description": "Contents of the LayoutText, if any.",
"optional": true,
- "type": "boolean"
+ "type": "string"
},
{
- "name": "includeUserAgentShadowTree",
- "description": "Whether to include UA shadow tree in the snapshot (default false).",
+ "name": "inlineTextNodes",
+ "description": "The post-layout inline text nodes, if any.",
"optional": true,
- "type": "boolean"
- }
- ],
- "returns": [
- {
- "name": "domNodes",
- "description": "The nodes in the DOM tree. The DOMNode at index 0 corresponds to the root document.",
"type": "array",
"items": {
- "$ref": "DOMNode"
+ "$ref": "InlineTextBox"
}
},
{
- "name": "layoutTreeNodes",
- "description": "The nodes in the layout tree.",
- "type": "array",
- "items": {
- "$ref": "LayoutTreeNode"
- }
+ "name": "styleIndex",
+ "description": "Index into the `computedStyles` array returned by `getSnapshot`.",
+ "optional": true,
+ "type": "integer"
},
{
- "name": "computedStyles",
- "description": "Whitelisted ComputedStyle properties for each node in the layout tree.",
- "type": "array",
- "items": {
- "$ref": "ComputedStyle"
- }
+ "name": "paintOrder",
+ "description": "Global paint order index, which is determined by the stacking order of the nodes. Nodes\nthat are painted together will have the same index. Only provided if includePaintOrder in\ngetSnapshot was true.",
+ "optional": true,
+ "type": "integer"
+ },
+ {
+ "name": "isStackingContext",
+ "description": "Set to true to indicate the element begins a new stacking context.",
+ "optional": true,
+ "type": "boolean"
}
]
},
{
- "name": "captureSnapshot",
- "description": "Returns a document snapshot, including the full DOM tree of the root node (including iframes,\ntemplate contents, and imported documents) in a flattened array, as well as layout and\nwhite-listed computed style information for the nodes. Shadow DOM in the returned DOM tree is\nflattened.",
- "parameters": [
+ "id": "ComputedStyle",
+ "description": "A subset of the full ComputedStyle as defined by the request whitelist.",
+ "type": "object",
+ "properties": [
{
- "name": "computedStyles",
- "description": "Whitelist of computed styles to return.",
+ "name": "properties",
+ "description": "Name/value pairs of computed style properties.",
"type": "array",
"items": {
- "type": "string"
+ "$ref": "NameValue"
}
- },
+ }
+ ]
+ },
+ {
+ "id": "NameValue",
+ "description": "A name/value pair.",
+ "type": "object",
+ "properties": [
{
- "name": "includePaintOrder",
- "description": "Whether to include layout object paint orders into the snapshot.",
- "optional": true,
- "type": "boolean"
+ "name": "name",
+ "description": "Attribute/property name.",
+ "type": "string"
},
{
- "name": "includeDOMRects",
- "description": "Whether to include DOM rectangles (offsetRects, clientRects, scrollRects) into the snapshot",
- "optional": true,
- "type": "boolean"
- },
- {
- "name": "includeBlendedBackgroundColors",
- "description": "Whether to include blended background colors in the snapshot (default: false).\nBlended background color is achieved by blending background colors of all elements\nthat overlap with the current element.",
- "experimental": true,
- "optional": true,
- "type": "boolean"
- },
- {
- "name": "includeTextColorOpacities",
- "description": "Whether to include text color opacity in the snapshot (default: false).\nAn element might have the opacity property set that affects the text color of the element.\nThe final text color opacity is computed based on the opacity of all overlapping elements.",
- "experimental": true,
- "optional": true,
- "type": "boolean"
+ "name": "value",
+ "description": "Attribute/property value.",
+ "type": "string"
}
- ],
- "returns": [
+ ]
+ },
+ {
+ "id": "StringIndex",
+ "description": "Index of the string in the strings table.",
+ "type": "integer"
+ },
+ {
+ "id": "ArrayOfStrings",
+ "description": "Index of the string in the strings table.",
+ "type": "array",
+ "items": {
+ "$ref": "StringIndex"
+ }
+ },
+ {
+ "id": "RareStringData",
+ "description": "Data that is only present on rare nodes.",
+ "type": "object",
+ "properties": [
{
- "name": "documents",
- "description": "The nodes in the DOM tree. The DOMNode at index 0 corresponds to the root document.",
+ "name": "index",
"type": "array",
"items": {
- "$ref": "DocumentSnapshot"
+ "type": "integer"
}
},
{
- "name": "strings",
- "description": "Shared string table that all string properties refer to with indexes.",
+ "name": "value",
"type": "array",
"items": {
- "type": "string"
+ "$ref": "StringIndex"
}
}
]
- }
- ]
- },
- {
- "domain": "DOMStorage",
- "description": "Query and modify DOM storage.",
- "experimental": true,
- "types": [
- {
- "id": "SerializedStorageKey",
- "type": "string"
},
{
- "id": "StorageId",
- "description": "DOM Storage identifier.",
+ "id": "RareBooleanData",
"type": "object",
"properties": [
{
- "name": "securityOrigin",
- "description": "Security origin for the storage.",
- "optional": true,
- "type": "string"
- },
- {
- "name": "storageKey",
- "description": "Represents a key by which DOM Storage keys its CachedStorageAreas",
- "optional": true,
- "$ref": "SerializedStorageKey"
- },
- {
- "name": "isLocalStorage",
- "description": "Whether the storage is local storage (not session storage).",
- "type": "boolean"
- }
- ]
- },
- {
- "id": "Item",
- "description": "DOM Storage item.",
- "type": "array",
- "items": {
- "type": "string"
- }
- }
- ],
- "commands": [
- {
- "name": "clear",
- "parameters": [
- {
- "name": "storageId",
- "$ref": "StorageId"
+ "name": "index",
+ "type": "array",
+ "items": {
+ "type": "integer"
+ }
}
]
},
{
- "name": "disable",
- "description": "Disables storage tracking, prevents storage events from being sent to the client."
- },
- {
- "name": "enable",
- "description": "Enables storage tracking, storage events will now be delivered to the client."
- },
- {
- "name": "getDOMStorageItems",
- "parameters": [
+ "id": "RareIntegerData",
+ "type": "object",
+ "properties": [
{
- "name": "storageId",
- "$ref": "StorageId"
- }
- ],
- "returns": [
+ "name": "index",
+ "type": "array",
+ "items": {
+ "type": "integer"
+ }
+ },
{
- "name": "entries",
+ "name": "value",
"type": "array",
"items": {
- "$ref": "Item"
+ "type": "integer"
}
}
]
},
{
- "name": "removeDOMStorageItem",
- "parameters": [
+ "id": "Rectangle",
+ "type": "array",
+ "items": {
+ "type": "number"
+ }
+ },
+ {
+ "id": "DocumentSnapshot",
+ "description": "Document snapshot.",
+ "type": "object",
+ "properties": [
{
- "name": "storageId",
- "$ref": "StorageId"
+ "name": "documentURL",
+ "description": "Document URL that `Document` or `FrameOwner` node points to.",
+ "$ref": "StringIndex"
},
{
- "name": "key",
- "type": "string"
- }
- ]
- },
- {
- "name": "setDOMStorageItem",
- "parameters": [
+ "name": "title",
+ "description": "Document title.",
+ "$ref": "StringIndex"
+ },
{
- "name": "storageId",
- "$ref": "StorageId"
+ "name": "baseURL",
+ "description": "Base URL that `Document` or `FrameOwner` node uses for URL completion.",
+ "$ref": "StringIndex"
},
{
- "name": "key",
- "type": "string"
+ "name": "contentLanguage",
+ "description": "Contains the document's content language.",
+ "$ref": "StringIndex"
},
{
- "name": "value",
- "type": "string"
- }
- ]
- }
- ],
- "events": [
- {
- "name": "domStorageItemAdded",
- "parameters": [
+ "name": "encodingName",
+ "description": "Contains the document's character set encoding.",
+ "$ref": "StringIndex"
+ },
{
- "name": "storageId",
- "$ref": "StorageId"
+ "name": "publicId",
+ "description": "`DocumentType` node's publicId.",
+ "$ref": "StringIndex"
},
{
- "name": "key",
- "type": "string"
+ "name": "systemId",
+ "description": "`DocumentType` node's systemId.",
+ "$ref": "StringIndex"
},
{
- "name": "newValue",
- "type": "string"
- }
- ]
- },
- {
- "name": "domStorageItemRemoved",
- "parameters": [
+ "name": "frameId",
+ "description": "Frame ID for frame owner elements and also for the document node.",
+ "$ref": "StringIndex"
+ },
{
- "name": "storageId",
- "$ref": "StorageId"
+ "name": "nodes",
+ "description": "A table with dom nodes.",
+ "$ref": "NodeTreeSnapshot"
},
{
- "name": "key",
- "type": "string"
- }
- ]
- },
- {
- "name": "domStorageItemUpdated",
- "parameters": [
+ "name": "layout",
+ "description": "The nodes in the layout tree.",
+ "$ref": "LayoutTreeSnapshot"
+ },
{
- "name": "storageId",
- "$ref": "StorageId"
+ "name": "textBoxes",
+ "description": "The post-layout inline text nodes.",
+ "$ref": "TextBoxSnapshot"
},
{
- "name": "key",
- "type": "string"
+ "name": "scrollOffsetX",
+ "description": "Horizontal scroll offset.",
+ "optional": true,
+ "type": "number"
},
{
- "name": "oldValue",
- "type": "string"
+ "name": "scrollOffsetY",
+ "description": "Vertical scroll offset.",
+ "optional": true,
+ "type": "number"
},
{
- "name": "newValue",
- "type": "string"
+ "name": "contentWidth",
+ "description": "Document content width.",
+ "optional": true,
+ "type": "number"
+ },
+ {
+ "name": "contentHeight",
+ "description": "Document content height.",
+ "optional": true,
+ "type": "number"
}
]
},
{
- "name": "domStorageItemsCleared",
- "parameters": [
- {
- "name": "storageId",
- "$ref": "StorageId"
- }
- ]
- }
- ]
- },
- {
- "domain": "DeviceOrientation",
- "experimental": true,
- "commands": [
- {
- "name": "clearDeviceOrientationOverride",
- "description": "Clears the overridden Device Orientation."
- },
- {
- "name": "setDeviceOrientationOverride",
- "description": "Overrides the Device Orientation.",
- "parameters": [
+ "id": "NodeTreeSnapshot",
+ "description": "Table containing nodes.",
+ "type": "object",
+ "properties": [
{
- "name": "alpha",
- "description": "Mock alpha",
- "type": "number"
+ "name": "parentIndex",
+ "description": "Parent node index.",
+ "optional": true,
+ "type": "array",
+ "items": {
+ "type": "integer"
+ }
},
{
- "name": "beta",
- "description": "Mock beta",
- "type": "number"
+ "name": "nodeType",
+ "description": "`Node`'s nodeType.",
+ "optional": true,
+ "type": "array",
+ "items": {
+ "type": "integer"
+ }
},
{
- "name": "gamma",
- "description": "Mock gamma",
- "type": "number"
- }
- ]
- }
- ]
- },
- {
- "domain": "Emulation",
- "description": "This domain emulates different environments for the page.",
- "dependencies": [
- "DOM",
- "Page",
- "Runtime"
- ],
- "types": [
- {
- "id": "SafeAreaInsets",
- "experimental": true,
- "type": "object",
- "properties": [
+ "name": "shadowRootType",
+ "description": "Type of the shadow root the `Node` is in. String values are equal to the `ShadowRootType` enum.",
+ "optional": true,
+ "$ref": "RareStringData"
+ },
{
- "name": "top",
- "description": "Overrides safe-area-inset-top.",
+ "name": "nodeName",
+ "description": "`Node`'s nodeName.",
"optional": true,
- "type": "integer"
+ "type": "array",
+ "items": {
+ "$ref": "StringIndex"
+ }
},
{
- "name": "topMax",
- "description": "Overrides safe-area-max-inset-top.",
+ "name": "nodeValue",
+ "description": "`Node`'s nodeValue.",
"optional": true,
- "type": "integer"
+ "type": "array",
+ "items": {
+ "$ref": "StringIndex"
+ }
},
{
- "name": "left",
- "description": "Overrides safe-area-inset-left.",
+ "name": "backendNodeId",
+ "description": "`Node`'s id, corresponds to DOM.Node.backendNodeId.",
"optional": true,
- "type": "integer"
+ "type": "array",
+ "items": {
+ "$ref": "DOM.BackendNodeId"
+ }
},
{
- "name": "leftMax",
- "description": "Overrides safe-area-max-inset-left.",
+ "name": "attributes",
+ "description": "Attributes of an `Element` node. Flatten name, value pairs.",
"optional": true,
- "type": "integer"
+ "type": "array",
+ "items": {
+ "$ref": "ArrayOfStrings"
+ }
},
{
- "name": "bottom",
- "description": "Overrides safe-area-inset-bottom.",
+ "name": "textValue",
+ "description": "Only set for textarea elements, contains the text value.",
"optional": true,
- "type": "integer"
+ "$ref": "RareStringData"
},
{
- "name": "bottomMax",
- "description": "Overrides safe-area-max-inset-bottom.",
+ "name": "inputValue",
+ "description": "Only set for input elements, contains the input's associated text value.",
"optional": true,
- "type": "integer"
+ "$ref": "RareStringData"
},
{
- "name": "right",
- "description": "Overrides safe-area-inset-right.",
+ "name": "inputChecked",
+ "description": "Only set for radio and checkbox input elements, indicates if the element has been checked",
"optional": true,
- "type": "integer"
+ "$ref": "RareBooleanData"
},
{
- "name": "rightMax",
- "description": "Overrides safe-area-max-inset-right.",
+ "name": "optionSelected",
+ "description": "Only set for option elements, indicates if the element has been selected",
"optional": true,
- "type": "integer"
- }
- ]
- },
- {
- "id": "ScreenOrientation",
- "description": "Screen orientation.",
- "type": "object",
- "properties": [
+ "$ref": "RareBooleanData"
+ },
{
- "name": "type",
- "description": "Orientation type.",
- "type": "string",
- "enum": [
- "portraitPrimary",
- "portraitSecondary",
- "landscapePrimary",
- "landscapeSecondary"
- ]
+ "name": "contentDocumentIndex",
+ "description": "The index of the document in the list of the snapshot documents.",
+ "optional": true,
+ "$ref": "RareIntegerData"
},
{
- "name": "angle",
- "description": "Orientation angle.",
- "type": "integer"
- }
- ]
- },
- {
- "id": "DisplayFeature",
- "type": "object",
- "properties": [
+ "name": "pseudoType",
+ "description": "Type of a pseudo element node.",
+ "optional": true,
+ "$ref": "RareStringData"
+ },
{
- "name": "orientation",
- "description": "Orientation of a display feature in relation to screen",
- "type": "string",
- "enum": [
- "vertical",
- "horizontal"
- ]
+ "name": "pseudoIdentifier",
+ "description": "Pseudo element identifier for this node. Only present if there is a\nvalid pseudoType.",
+ "optional": true,
+ "$ref": "RareStringData"
},
{
- "name": "offset",
- "description": "The offset from the screen origin in either the x (for vertical\norientation) or y (for horizontal orientation) direction.",
- "type": "integer"
+ "name": "isClickable",
+ "description": "Whether this DOM node responds to mouse clicks. This includes nodes that have had click\nevent listeners attached via JavaScript as well as anchor tags that naturally navigate when\nclicked.",
+ "optional": true,
+ "$ref": "RareBooleanData"
},
{
- "name": "maskLength",
- "description": "A display feature may mask content such that it is not physically\ndisplayed - this length along with the offset describes this area.\nA display feature that only splits content will have a 0 mask_length.",
- "type": "integer"
- }
- ]
- },
- {
- "id": "DevicePosture",
- "type": "object",
- "properties": [
+ "name": "currentSourceURL",
+ "description": "The selected url for nodes with a srcset attribute.",
+ "optional": true,
+ "$ref": "RareStringData"
+ },
{
- "name": "type",
- "description": "Current posture of the device",
- "type": "string",
- "enum": [
- "continuous",
- "folded"
- ]
+ "name": "originURL",
+ "description": "The url of the script (if any) that generates this node.",
+ "optional": true,
+ "$ref": "RareStringData"
}
]
},
{
- "id": "MediaFeature",
+ "id": "LayoutTreeSnapshot",
+ "description": "Table of details of an element in the DOM tree with a LayoutObject.",
"type": "object",
"properties": [
{
- "name": "name",
- "type": "string"
+ "name": "nodeIndex",
+ "description": "Index of the corresponding node in the `NodeTreeSnapshot` array returned by `captureSnapshot`.",
+ "type": "array",
+ "items": {
+ "type": "integer"
+ }
},
{
- "name": "value",
- "type": "string"
- }
- ]
- },
- {
- "id": "VirtualTimePolicy",
- "description": "advance: If the scheduler runs out of immediate work, the virtual time base may fast forward to\nallow the next delayed task (if any) to run; pause: The virtual time base may not advance;\npauseIfNetworkFetchesPending: The virtual time base may not advance if there are any pending\nresource fetches.",
- "experimental": true,
- "type": "string",
- "enum": [
- "advance",
- "pause",
- "pauseIfNetworkFetchesPending"
- ]
- },
- {
- "id": "UserAgentBrandVersion",
- "description": "Used to specify User Agent Client Hints to emulate. See https://wicg.github.io/ua-client-hints",
- "experimental": true,
- "type": "object",
- "properties": [
- {
- "name": "brand",
- "type": "string"
+ "name": "styles",
+ "description": "Array of indexes specifying computed style strings, filtered according to the `computedStyles` parameter passed to `captureSnapshot`.",
+ "type": "array",
+ "items": {
+ "$ref": "ArrayOfStrings"
+ }
},
{
- "name": "version",
- "type": "string"
- }
- ]
- },
- {
- "id": "UserAgentMetadata",
- "description": "Used to specify User Agent Client Hints to emulate. See https://wicg.github.io/ua-client-hints\nMissing optional values will be filled in by the target with what it would normally use.",
- "experimental": true,
- "type": "object",
- "properties": [
- {
- "name": "brands",
- "description": "Brands appearing in Sec-CH-UA.",
- "optional": true,
+ "name": "bounds",
+ "description": "The absolute position bounding box.",
"type": "array",
"items": {
- "$ref": "UserAgentBrandVersion"
+ "$ref": "Rectangle"
}
},
{
- "name": "fullVersionList",
- "description": "Brands appearing in Sec-CH-UA-Full-Version-List.",
- "optional": true,
+ "name": "text",
+ "description": "Contents of the LayoutText, if any.",
"type": "array",
"items": {
- "$ref": "UserAgentBrandVersion"
+ "$ref": "StringIndex"
}
},
{
- "name": "fullVersion",
- "deprecated": true,
- "optional": true,
- "type": "string"
- },
- {
- "name": "platform",
- "type": "string"
+ "name": "stackingContexts",
+ "description": "Stacking context information.",
+ "$ref": "RareBooleanData"
},
{
- "name": "platformVersion",
- "type": "string"
+ "name": "paintOrders",
+ "description": "Global paint order index, which is determined by the stacking order of the nodes. Nodes\nthat are painted together will have the same index. Only provided if includePaintOrder in\ncaptureSnapshot was true.",
+ "optional": true,
+ "type": "array",
+ "items": {
+ "type": "integer"
+ }
},
{
- "name": "architecture",
- "type": "string"
+ "name": "offsetRects",
+ "description": "The offset rect of nodes. Only available when includeDOMRects is set to true",
+ "optional": true,
+ "type": "array",
+ "items": {
+ "$ref": "Rectangle"
+ }
},
{
- "name": "model",
- "type": "string"
+ "name": "scrollRects",
+ "description": "The scroll rect of nodes. Only available when includeDOMRects is set to true",
+ "optional": true,
+ "type": "array",
+ "items": {
+ "$ref": "Rectangle"
+ }
},
{
- "name": "mobile",
- "type": "boolean"
+ "name": "clientRects",
+ "description": "The client rect of nodes. Only available when includeDOMRects is set to true",
+ "optional": true,
+ "type": "array",
+ "items": {
+ "$ref": "Rectangle"
+ }
},
{
- "name": "bitness",
+ "name": "blendedBackgroundColors",
+ "description": "The list of background colors that are blended with colors of overlapping elements.",
+ "experimental": true,
"optional": true,
- "type": "string"
+ "type": "array",
+ "items": {
+ "$ref": "StringIndex"
+ }
},
{
- "name": "wow64",
+ "name": "textColorOpacities",
+ "description": "The list of computed text opacities.",
+ "experimental": true,
"optional": true,
- "type": "boolean"
+ "type": "array",
+ "items": {
+ "type": "number"
+ }
}
]
},
{
- "id": "SensorType",
- "description": "Used to specify sensor types to emulate.\nSee https://w3c.github.io/sensors/#automation for more information.",
- "experimental": true,
- "type": "string",
- "enum": [
- "absolute-orientation",
- "accelerometer",
- "ambient-light",
- "gravity",
- "gyroscope",
- "linear-acceleration",
- "magnetometer",
- "relative-orientation"
- ]
- },
- {
- "id": "SensorMetadata",
- "experimental": true,
+ "id": "TextBoxSnapshot",
+ "description": "Table of details of the post layout rendered text positions. The exact layout should not be regarded as\nstable and may change between versions.",
"type": "object",
"properties": [
{
- "name": "available",
- "optional": true,
- "type": "boolean"
+ "name": "layoutIndex",
+ "description": "Index of the layout tree node that owns this box collection.",
+ "type": "array",
+ "items": {
+ "type": "integer"
+ }
},
{
- "name": "minimumFrequency",
- "optional": true,
- "type": "number"
+ "name": "bounds",
+ "description": "The absolute position bounding box.",
+ "type": "array",
+ "items": {
+ "$ref": "Rectangle"
+ }
},
{
- "name": "maximumFrequency",
- "optional": true,
- "type": "number"
+ "name": "start",
+ "description": "The starting index in characters, for this post layout textbox substring. Characters that\nwould be represented as a surrogate pair in UTF-16 have length 2.",
+ "type": "array",
+ "items": {
+ "type": "integer"
+ }
+ },
+ {
+ "name": "length",
+ "description": "The number of characters in this post layout textbox substring. Characters that would be\nrepresented as a surrogate pair in UTF-16 have length 2.",
+ "type": "array",
+ "items": {
+ "type": "integer"
+ }
}
]
+ }
+ ],
+ "commands": [
+ {
+ "name": "disable",
+ "description": "Disables DOM snapshot agent for the given page."
},
{
- "id": "SensorReadingSingle",
- "experimental": true,
- "type": "object",
- "properties": [
- {
- "name": "value",
- "type": "number"
- }
- ]
+ "name": "enable",
+ "description": "Enables DOM snapshot agent for the given page."
},
{
- "id": "SensorReadingXYZ",
- "experimental": true,
- "type": "object",
- "properties": [
+ "name": "getSnapshot",
+ "description": "Returns a document snapshot, including the full DOM tree of the root node (including iframes,\ntemplate contents, and imported documents) in a flattened array, as well as layout and\nwhite-listed computed style information for the nodes. Shadow DOM in the returned DOM tree is\nflattened.",
+ "deprecated": true,
+ "parameters": [
{
- "name": "x",
- "type": "number"
+ "name": "computedStyleWhitelist",
+ "description": "Whitelist of computed styles to return.",
+ "type": "array",
+ "items": {
+ "type": "string"
+ }
},
{
- "name": "y",
- "type": "number"
+ "name": "includeEventListeners",
+ "description": "Whether or not to retrieve details of DOM listeners (default false).",
+ "optional": true,
+ "type": "boolean"
},
{
- "name": "z",
- "type": "number"
- }
- ]
- },
- {
- "id": "SensorReadingQuaternion",
- "experimental": true,
- "type": "object",
- "properties": [
- {
- "name": "x",
- "type": "number"
+ "name": "includePaintOrder",
+ "description": "Whether to determine and include the paint order index of LayoutTreeNodes (default false).",
+ "optional": true,
+ "type": "boolean"
},
{
- "name": "y",
- "type": "number"
+ "name": "includeUserAgentShadowTree",
+ "description": "Whether to include UA shadow tree in the snapshot (default false).",
+ "optional": true,
+ "type": "boolean"
+ }
+ ],
+ "returns": [
+ {
+ "name": "domNodes",
+ "description": "The nodes in the DOM tree. The DOMNode at index 0 corresponds to the root document.",
+ "type": "array",
+ "items": {
+ "$ref": "DOMNode"
+ }
},
{
- "name": "z",
- "type": "number"
+ "name": "layoutTreeNodes",
+ "description": "The nodes in the layout tree.",
+ "type": "array",
+ "items": {
+ "$ref": "LayoutTreeNode"
+ }
},
{
- "name": "w",
- "type": "number"
+ "name": "computedStyles",
+ "description": "Whitelisted ComputedStyle properties for each node in the layout tree.",
+ "type": "array",
+ "items": {
+ "$ref": "ComputedStyle"
+ }
}
]
},
{
- "id": "SensorReading",
- "experimental": true,
- "type": "object",
- "properties": [
+ "name": "captureSnapshot",
+ "description": "Returns a document snapshot, including the full DOM tree of the root node (including iframes,\ntemplate contents, and imported documents) in a flattened array, as well as layout and\nwhite-listed computed style information for the nodes. Shadow DOM in the returned DOM tree is\nflattened.",
+ "parameters": [
{
- "name": "single",
- "optional": true,
- "$ref": "SensorReadingSingle"
+ "name": "computedStyles",
+ "description": "Whitelist of computed styles to return.",
+ "type": "array",
+ "items": {
+ "type": "string"
+ }
},
{
- "name": "xyz",
+ "name": "includePaintOrder",
+ "description": "Whether to include layout object paint orders into the snapshot.",
"optional": true,
- "$ref": "SensorReadingXYZ"
+ "type": "boolean"
},
{
- "name": "quaternion",
- "optional": true,
- "$ref": "SensorReadingQuaternion"
+ "name": "includeDOMRects",
+ "description": "Whether to include DOM rectangles (offsetRects, clientRects, scrollRects) into the snapshot",
+ "optional": true,
+ "type": "boolean"
+ },
+ {
+ "name": "includeBlendedBackgroundColors",
+ "description": "Whether to include blended background colors in the snapshot (default: false).\nBlended background color is achieved by blending background colors of all elements\nthat overlap with the current element.",
+ "experimental": true,
+ "optional": true,
+ "type": "boolean"
+ },
+ {
+ "name": "includeTextColorOpacities",
+ "description": "Whether to include text color opacity in the snapshot (default: false).\nAn element might have the opacity property set that affects the text color of the element.\nThe final text color opacity is computed based on the opacity of all overlapping elements.",
+ "experimental": true,
+ "optional": true,
+ "type": "boolean"
+ }
+ ],
+ "returns": [
+ {
+ "name": "documents",
+ "description": "The nodes in the DOM tree. The DOMNode at index 0 corresponds to the root document.",
+ "type": "array",
+ "items": {
+ "$ref": "DocumentSnapshot"
+ }
+ },
+ {
+ "name": "strings",
+ "description": "Shared string table that all string properties refer to with indexes.",
+ "type": "array",
+ "items": {
+ "type": "string"
+ }
}
]
- },
- {
- "id": "PressureSource",
- "experimental": true,
- "type": "string",
- "enum": [
- "cpu"
- ]
- },
+ }
+ ]
+ },
+ {
+ "domain": "DOMStorage",
+ "description": "Query and modify DOM storage.",
+ "experimental": true,
+ "types": [
{
- "id": "PressureState",
- "experimental": true,
- "type": "string",
- "enum": [
- "nominal",
- "fair",
- "serious",
- "critical"
- ]
+ "id": "SerializedStorageKey",
+ "type": "string"
},
{
- "id": "PressureMetadata",
- "experimental": true,
+ "id": "StorageId",
+ "description": "DOM Storage identifier.",
"type": "object",
"properties": [
{
- "name": "available",
+ "name": "securityOrigin",
+ "description": "Security origin for the storage.",
"optional": true,
+ "type": "string"
+ },
+ {
+ "name": "storageKey",
+ "description": "Represents a key by which DOM Storage keys its CachedStorageAreas",
+ "optional": true,
+ "$ref": "SerializedStorageKey"
+ },
+ {
+ "name": "isLocalStorage",
+ "description": "Whether the storage is local storage (not session storage).",
"type": "boolean"
}
]
},
{
- "id": "DisabledImageType",
- "description": "Enum of image types that can be disabled.",
- "experimental": true,
- "type": "string",
- "enum": [
- "avif",
- "webp"
- ]
+ "id": "Item",
+ "description": "DOM Storage item.",
+ "type": "array",
+ "items": {
+ "type": "string"
+ }
}
],
"commands": [
{
- "name": "canEmulate",
- "description": "Tells whether emulation is supported.",
- "deprecated": true,
- "returns": [
+ "name": "clear",
+ "parameters": [
{
- "name": "result",
- "description": "True if emulation is supported.",
- "type": "boolean"
+ "name": "storageId",
+ "$ref": "StorageId"
}
]
},
{
- "name": "clearDeviceMetricsOverride",
- "description": "Clears the overridden device metrics."
- },
- {
- "name": "clearGeolocationOverride",
- "description": "Clears the overridden Geolocation Position and Error."
+ "name": "disable",
+ "description": "Disables storage tracking, prevents storage events from being sent to the client."
},
{
- "name": "resetPageScaleFactor",
- "description": "Requests that page scale factor is reset to initial values.",
- "experimental": true
+ "name": "enable",
+ "description": "Enables storage tracking, storage events will now be delivered to the client."
},
{
- "name": "setFocusEmulationEnabled",
- "description": "Enables or disables simulating a focused and active page.",
- "experimental": true,
+ "name": "getDOMStorageItems",
"parameters": [
{
- "name": "enabled",
- "description": "Whether to enable to disable focus emulation.",
- "type": "boolean"
+ "name": "storageId",
+ "$ref": "StorageId"
+ }
+ ],
+ "returns": [
+ {
+ "name": "entries",
+ "type": "array",
+ "items": {
+ "$ref": "Item"
+ }
}
]
},
{
- "name": "setAutoDarkModeOverride",
- "description": "Automatically render all web contents using a dark theme.",
- "experimental": true,
+ "name": "removeDOMStorageItem",
"parameters": [
{
- "name": "enabled",
- "description": "Whether to enable or disable automatic dark mode.\nIf not specified, any existing override will be cleared.",
- "optional": true,
- "type": "boolean"
+ "name": "storageId",
+ "$ref": "StorageId"
+ },
+ {
+ "name": "key",
+ "type": "string"
}
]
},
{
- "name": "setCPUThrottlingRate",
- "description": "Enables CPU throttling to emulate slow CPUs.",
+ "name": "setDOMStorageItem",
"parameters": [
{
- "name": "rate",
- "description": "Throttling rate as a slowdown factor (1 is no throttle, 2 is 2x slowdown, etc).",
- "type": "number"
+ "name": "storageId",
+ "$ref": "StorageId"
+ },
+ {
+ "name": "key",
+ "type": "string"
+ },
+ {
+ "name": "value",
+ "type": "string"
}
]
- },
+ }
+ ],
+ "events": [
{
- "name": "setDefaultBackgroundColorOverride",
- "description": "Sets or clears an override of the default background color of the frame. This override is used\nif the content does not specify one.",
+ "name": "domStorageItemAdded",
"parameters": [
{
- "name": "color",
- "description": "RGBA of the default background color. If not specified, any existing override will be\ncleared.",
- "optional": true,
- "$ref": "DOM.RGBA"
+ "name": "storageId",
+ "$ref": "StorageId"
+ },
+ {
+ "name": "key",
+ "type": "string"
+ },
+ {
+ "name": "newValue",
+ "type": "string"
}
]
},
{
- "name": "setSafeAreaInsetsOverride",
- "description": "Overrides the values for env(safe-area-inset-*) and env(safe-area-max-inset-*). Unset values will cause the\nrespective variables to be undefined, even if previously overridden.",
- "experimental": true,
+ "name": "domStorageItemRemoved",
"parameters": [
{
- "name": "insets",
- "$ref": "SafeAreaInsets"
+ "name": "storageId",
+ "$ref": "StorageId"
+ },
+ {
+ "name": "key",
+ "type": "string"
}
]
},
{
- "name": "setDeviceMetricsOverride",
- "description": "Overrides the values of device screen dimensions (window.screen.width, window.screen.height,\nwindow.innerWidth, window.innerHeight, and \"device-width\"/\"device-height\"-related CSS media\nquery results).",
+ "name": "domStorageItemUpdated",
"parameters": [
{
- "name": "width",
- "description": "Overriding width value in pixels (minimum 0, maximum 10000000). 0 disables the override.",
- "type": "integer"
- },
- {
- "name": "height",
- "description": "Overriding height value in pixels (minimum 0, maximum 10000000). 0 disables the override.",
- "type": "integer"
- },
- {
- "name": "deviceScaleFactor",
- "description": "Overriding device scale factor value. 0 disables the override.",
- "type": "number"
- },
- {
- "name": "mobile",
- "description": "Whether to emulate mobile device. This includes viewport meta tag, overlay scrollbars, text\nautosizing and more.",
- "type": "boolean"
+ "name": "storageId",
+ "$ref": "StorageId"
},
{
- "name": "scale",
- "description": "Scale to apply to resulting view image.",
- "experimental": true,
- "optional": true,
- "type": "number"
+ "name": "key",
+ "type": "string"
},
{
- "name": "screenWidth",
- "description": "Overriding screen width value in pixels (minimum 0, maximum 10000000).",
- "experimental": true,
- "optional": true,
- "type": "integer"
+ "name": "oldValue",
+ "type": "string"
},
{
- "name": "screenHeight",
- "description": "Overriding screen height value in pixels (minimum 0, maximum 10000000).",
- "experimental": true,
- "optional": true,
- "type": "integer"
- },
+ "name": "newValue",
+ "type": "string"
+ }
+ ]
+ },
+ {
+ "name": "domStorageItemsCleared",
+ "parameters": [
{
- "name": "positionX",
- "description": "Overriding view X position on screen in pixels (minimum 0, maximum 10000000).",
- "experimental": true,
- "optional": true,
- "type": "integer"
- },
- {
- "name": "positionY",
- "description": "Overriding view Y position on screen in pixels (minimum 0, maximum 10000000).",
- "experimental": true,
- "optional": true,
- "type": "integer"
- },
- {
- "name": "dontSetVisibleSize",
- "description": "Do not set visible view size, rely upon explicit setVisibleSize call.",
- "experimental": true,
- "optional": true,
- "type": "boolean"
- },
- {
- "name": "screenOrientation",
- "description": "Screen orientation override.",
- "optional": true,
- "$ref": "ScreenOrientation"
- },
- {
- "name": "viewport",
- "description": "If set, the visible area of the page will be overridden to this viewport. This viewport\nchange is not observed by the page, e.g. viewport-relative elements do not change positions.",
- "experimental": true,
- "optional": true,
- "$ref": "Page.Viewport"
- },
- {
- "name": "displayFeature",
- "description": "If set, the display feature of a multi-segment screen. If not set, multi-segment support\nis turned-off.",
- "experimental": true,
- "optional": true,
- "$ref": "DisplayFeature"
- },
- {
- "name": "devicePosture",
- "description": "If set, the posture of a foldable device. If not set the posture is set\nto continuous.\nDeprecated, use Emulation.setDevicePostureOverride.",
- "experimental": true,
- "deprecated": true,
- "optional": true,
- "$ref": "DevicePosture"
+ "name": "storageId",
+ "$ref": "StorageId"
}
]
- },
+ }
+ ]
+ },
+ {
+ "domain": "DeviceAccess",
+ "experimental": true,
+ "types": [
{
- "name": "setDevicePostureOverride",
- "description": "Start reporting the given posture value to the Device Posture API.\nThis override can also be set in setDeviceMetricsOverride().",
- "experimental": true,
- "parameters": [
- {
- "name": "posture",
- "$ref": "DevicePosture"
- }
- ]
+ "id": "RequestId",
+ "description": "Device request id.",
+ "type": "string"
},
{
- "name": "clearDevicePostureOverride",
- "description": "Clears a device posture override set with either setDeviceMetricsOverride()\nor setDevicePostureOverride() and starts using posture information from the\nplatform again.\nDoes nothing if no override is set.",
- "experimental": true
+ "id": "DeviceId",
+ "description": "A device id.",
+ "type": "string"
},
{
- "name": "setScrollbarsHidden",
- "experimental": true,
- "parameters": [
+ "id": "PromptDevice",
+ "description": "Device information displayed in a user prompt to select a device.",
+ "type": "object",
+ "properties": [
{
- "name": "hidden",
- "description": "Whether scrollbars should be always hidden.",
- "type": "boolean"
+ "name": "id",
+ "$ref": "DeviceId"
+ },
+ {
+ "name": "name",
+ "description": "Display name as it appears in a device request user prompt.",
+ "type": "string"
}
]
+ }
+ ],
+ "commands": [
+ {
+ "name": "enable",
+ "description": "Enable events in this domain."
},
{
- "name": "setDocumentCookieDisabled",
- "experimental": true,
+ "name": "disable",
+ "description": "Disable events in this domain."
+ },
+ {
+ "name": "selectPrompt",
+ "description": "Select a device in response to a DeviceAccess.deviceRequestPrompted event.",
"parameters": [
{
- "name": "disabled",
- "description": "Whether document.coookie API should be disabled.",
- "type": "boolean"
+ "name": "id",
+ "$ref": "RequestId"
+ },
+ {
+ "name": "deviceId",
+ "$ref": "DeviceId"
}
]
},
{
- "name": "setEmitTouchEventsForMouse",
- "experimental": true,
+ "name": "cancelPrompt",
+ "description": "Cancel a prompt in response to a DeviceAccess.deviceRequestPrompted event.",
"parameters": [
{
- "name": "enabled",
- "description": "Whether touch emulation based on mouse input should be enabled.",
- "type": "boolean"
- },
- {
- "name": "configuration",
- "description": "Touch/gesture events configuration. Default: current platform.",
- "optional": true,
- "type": "string",
- "enum": [
- "mobile",
- "desktop"
- ]
+ "name": "id",
+ "$ref": "RequestId"
}
]
- },
+ }
+ ],
+ "events": [
{
- "name": "setEmulatedMedia",
- "description": "Emulates the given media type or media feature for CSS media queries.",
+ "name": "deviceRequestPrompted",
+ "description": "A device request opened a user prompt to select a device. Respond with the\nselectPrompt or cancelPrompt command.",
"parameters": [
{
- "name": "media",
- "description": "Media type to emulate. Empty string disables the override.",
- "optional": true,
- "type": "string"
+ "name": "id",
+ "$ref": "RequestId"
},
{
- "name": "features",
- "description": "Media features to emulate.",
- "optional": true,
+ "name": "devices",
"type": "array",
"items": {
- "$ref": "MediaFeature"
+ "$ref": "PromptDevice"
}
}
]
- },
+ }
+ ]
+ },
+ {
+ "domain": "DeviceOrientation",
+ "experimental": true,
+ "commands": [
{
- "name": "setEmulatedVisionDeficiency",
- "description": "Emulates the given vision deficiency.",
- "parameters": [
- {
- "name": "type",
- "description": "Vision deficiency to emulate. Order: best-effort emulations come first, followed by any\nphysiologically accurate emulations for medically recognized color vision deficiencies.",
- "type": "string",
- "enum": [
- "none",
- "blurredVision",
- "reducedContrast",
- "achromatopsia",
- "deuteranopia",
- "protanopia",
- "tritanopia"
- ]
- }
- ]
+ "name": "clearDeviceOrientationOverride",
+ "description": "Clears the overridden Device Orientation."
},
{
- "name": "setGeolocationOverride",
- "description": "Overrides the Geolocation Position or Error. Omitting any of the parameters emulates position\nunavailable.",
+ "name": "setDeviceOrientationOverride",
+ "description": "Overrides the Device Orientation.",
"parameters": [
{
- "name": "latitude",
- "description": "Mock latitude",
- "optional": true,
+ "name": "alpha",
+ "description": "Mock alpha",
"type": "number"
},
{
- "name": "longitude",
- "description": "Mock longitude",
- "optional": true,
+ "name": "beta",
+ "description": "Mock beta",
"type": "number"
},
{
- "name": "accuracy",
- "description": "Mock accuracy",
- "optional": true,
+ "name": "gamma",
+ "description": "Mock gamma",
"type": "number"
}
]
- },
+ }
+ ]
+ },
+ {
+ "domain": "Emulation",
+ "description": "This domain emulates different environments for the page.",
+ "dependencies": [
+ "DOM",
+ "Page",
+ "Runtime"
+ ],
+ "types": [
{
- "name": "getOverriddenSensorInformation",
+ "id": "SafeAreaInsets",
"experimental": true,
- "parameters": [
+ "type": "object",
+ "properties": [
{
- "name": "type",
- "$ref": "SensorType"
- }
- ],
- "returns": [
+ "name": "top",
+ "description": "Overrides safe-area-inset-top.",
+ "optional": true,
+ "type": "integer"
+ },
{
- "name": "requestedSamplingFrequency",
- "type": "number"
- }
- ]
- },
- {
- "name": "setSensorOverrideEnabled",
- "description": "Overrides a platform sensor of a given type. If |enabled| is true, calls to\nSensor.start() will use a virtual sensor as backend rather than fetching\ndata from a real hardware sensor. Otherwise, existing virtual\nsensor-backend Sensor objects will fire an error event and new calls to\nSensor.start() will attempt to use a real sensor instead.",
- "experimental": true,
- "parameters": [
+ "name": "topMax",
+ "description": "Overrides safe-area-max-inset-top.",
+ "optional": true,
+ "type": "integer"
+ },
{
- "name": "enabled",
- "type": "boolean"
+ "name": "left",
+ "description": "Overrides safe-area-inset-left.",
+ "optional": true,
+ "type": "integer"
},
{
- "name": "type",
- "$ref": "SensorType"
+ "name": "leftMax",
+ "description": "Overrides safe-area-max-inset-left.",
+ "optional": true,
+ "type": "integer"
},
{
- "name": "metadata",
+ "name": "bottom",
+ "description": "Overrides safe-area-inset-bottom.",
"optional": true,
- "$ref": "SensorMetadata"
+ "type": "integer"
+ },
+ {
+ "name": "bottomMax",
+ "description": "Overrides safe-area-max-inset-bottom.",
+ "optional": true,
+ "type": "integer"
+ },
+ {
+ "name": "right",
+ "description": "Overrides safe-area-inset-right.",
+ "optional": true,
+ "type": "integer"
+ },
+ {
+ "name": "rightMax",
+ "description": "Overrides safe-area-max-inset-right.",
+ "optional": true,
+ "type": "integer"
}
]
},
{
- "name": "setSensorOverrideReadings",
- "description": "Updates the sensor readings reported by a sensor type previously overridden\nby setSensorOverrideEnabled.",
- "experimental": true,
- "parameters": [
+ "id": "ScreenOrientation",
+ "description": "Screen orientation.",
+ "type": "object",
+ "properties": [
{
"name": "type",
- "$ref": "SensorType"
+ "description": "Orientation type.",
+ "type": "string",
+ "enum": [
+ "portraitPrimary",
+ "portraitSecondary",
+ "landscapePrimary",
+ "landscapeSecondary"
+ ]
},
{
- "name": "reading",
- "$ref": "SensorReading"
+ "name": "angle",
+ "description": "Orientation angle.",
+ "type": "integer"
}
]
},
{
- "name": "setPressureSourceOverrideEnabled",
- "description": "Overrides a pressure source of a given type, as used by the Compute\nPressure API, so that updates to PressureObserver.observe() are provided\nvia setPressureStateOverride instead of being retrieved from\nplatform-provided telemetry data.",
- "experimental": true,
- "parameters": [
+ "id": "DisplayFeature",
+ "type": "object",
+ "properties": [
{
- "name": "enabled",
- "type": "boolean"
+ "name": "orientation",
+ "description": "Orientation of a display feature in relation to screen",
+ "type": "string",
+ "enum": [
+ "vertical",
+ "horizontal"
+ ]
},
{
- "name": "source",
- "$ref": "PressureSource"
+ "name": "offset",
+ "description": "The offset from the screen origin in either the x (for vertical\norientation) or y (for horizontal orientation) direction.",
+ "type": "integer"
},
{
- "name": "metadata",
- "optional": true,
- "$ref": "PressureMetadata"
+ "name": "maskLength",
+ "description": "A display feature may mask content such that it is not physically\ndisplayed - this length along with the offset describes this area.\nA display feature that only splits content will have a 0 mask_length.",
+ "type": "integer"
}
]
},
{
- "name": "setPressureStateOverride",
- "description": "Provides a given pressure state that will be processed and eventually be\ndelivered to PressureObserver users. |source| must have been previously\noverridden by setPressureSourceOverrideEnabled.",
- "experimental": true,
- "parameters": [
- {
- "name": "source",
- "$ref": "PressureSource"
- },
+ "id": "DevicePosture",
+ "type": "object",
+ "properties": [
{
- "name": "state",
- "$ref": "PressureState"
+ "name": "type",
+ "description": "Current posture of the device",
+ "type": "string",
+ "enum": [
+ "continuous",
+ "folded"
+ ]
}
]
},
{
- "name": "setIdleOverride",
- "description": "Overrides the Idle state.",
- "parameters": [
+ "id": "MediaFeature",
+ "type": "object",
+ "properties": [
{
- "name": "isUserActive",
- "description": "Mock isUserActive",
- "type": "boolean"
+ "name": "name",
+ "type": "string"
},
{
- "name": "isScreenUnlocked",
- "description": "Mock isScreenUnlocked",
- "type": "boolean"
+ "name": "value",
+ "type": "string"
}
]
},
{
- "name": "clearIdleOverride",
- "description": "Clears Idle state overrides."
- },
- {
- "name": "setNavigatorOverrides",
- "description": "Overrides value returned by the javascript navigator object.",
+ "id": "VirtualTimePolicy",
+ "description": "advance: If the scheduler runs out of immediate work, the virtual time base may fast forward to\nallow the next delayed task (if any) to run; pause: The virtual time base may not advance;\npauseIfNetworkFetchesPending: The virtual time base may not advance if there are any pending\nresource fetches.",
"experimental": true,
- "deprecated": true,
- "parameters": [
- {
- "name": "platform",
- "description": "The platform navigator.platform should return.",
- "type": "string"
- }
+ "type": "string",
+ "enum": [
+ "advance",
+ "pause",
+ "pauseIfNetworkFetchesPending"
]
},
{
- "name": "setPageScaleFactor",
- "description": "Sets a specified page scale factor.",
+ "id": "UserAgentBrandVersion",
+ "description": "Used to specify User Agent Client Hints to emulate. See https://wicg.github.io/ua-client-hints",
"experimental": true,
- "parameters": [
+ "type": "object",
+ "properties": [
{
- "name": "pageScaleFactor",
- "description": "Page scale factor.",
- "type": "number"
- }
- ]
- },
- {
- "name": "setScriptExecutionDisabled",
- "description": "Switches script execution in the page.",
- "parameters": [
+ "name": "brand",
+ "type": "string"
+ },
{
- "name": "value",
- "description": "Whether script execution should be disabled in the page.",
- "type": "boolean"
+ "name": "version",
+ "type": "string"
}
]
},
{
- "name": "setTouchEmulationEnabled",
- "description": "Enables touch on platforms which do not support them.",
- "parameters": [
+ "id": "UserAgentMetadata",
+ "description": "Used to specify User Agent Client Hints to emulate. See https://wicg.github.io/ua-client-hints\nMissing optional values will be filled in by the target with what it would normally use.",
+ "experimental": true,
+ "type": "object",
+ "properties": [
{
- "name": "enabled",
- "description": "Whether the touch event emulation should be enabled.",
- "type": "boolean"
+ "name": "brands",
+ "description": "Brands appearing in Sec-CH-UA.",
+ "optional": true,
+ "type": "array",
+ "items": {
+ "$ref": "UserAgentBrandVersion"
+ }
},
{
- "name": "maxTouchPoints",
- "description": "Maximum touch points supported. Defaults to one.",
+ "name": "fullVersionList",
+ "description": "Brands appearing in Sec-CH-UA-Full-Version-List.",
"optional": true,
- "type": "integer"
- }
- ]
- },
- {
- "name": "setVirtualTimePolicy",
- "description": "Turns on virtual time for all frames (replacing real-time with a synthetic time source) and sets\nthe current virtual time policy. Note this supersedes any previous time budget.",
- "experimental": true,
- "parameters": [
- {
- "name": "policy",
- "$ref": "VirtualTimePolicy"
+ "type": "array",
+ "items": {
+ "$ref": "UserAgentBrandVersion"
+ }
},
{
- "name": "budget",
- "description": "If set, after this many virtual milliseconds have elapsed virtual time will be paused and a\nvirtualTimeBudgetExpired event is sent.",
+ "name": "fullVersion",
+ "deprecated": true,
"optional": true,
- "type": "number"
+ "type": "string"
},
{
- "name": "maxVirtualTimeTaskStarvationCount",
- "description": "If set this specifies the maximum number of tasks that can be run before virtual is forced\nforwards to prevent deadlock.",
+ "name": "platform",
+ "type": "string"
+ },
+ {
+ "name": "platformVersion",
+ "type": "string"
+ },
+ {
+ "name": "architecture",
+ "type": "string"
+ },
+ {
+ "name": "model",
+ "type": "string"
+ },
+ {
+ "name": "mobile",
+ "type": "boolean"
+ },
+ {
+ "name": "bitness",
"optional": true,
- "type": "integer"
+ "type": "string"
},
{
- "name": "initialVirtualTime",
- "description": "If set, base::Time::Now will be overridden to initially return this value.",
+ "name": "wow64",
"optional": true,
- "$ref": "Network.TimeSinceEpoch"
- }
- ],
- "returns": [
+ "type": "boolean"
+ },
{
- "name": "virtualTimeTicksBase",
- "description": "Absolute timestamp at which virtual time was first enabled (up time in milliseconds).",
- "type": "number"
+ "name": "formFactors",
+ "description": "Used to specify User Agent form-factor values.\nSee https://wicg.github.io/ua-client-hints/#sec-ch-ua-form-factors",
+ "optional": true,
+ "type": "array",
+ "items": {
+ "type": "string"
+ }
}
]
},
{
- "name": "setLocaleOverride",
- "description": "Overrides default host system locale with the specified one.",
+ "id": "SensorType",
+ "description": "Used to specify sensor types to emulate.\nSee https://w3c.github.io/sensors/#automation for more information.",
"experimental": true,
- "parameters": [
- {
- "name": "locale",
- "description": "ICU style C locale (e.g. \"en_US\"). If not specified or empty, disables the override and\nrestores default host system locale.",
- "optional": true,
- "type": "string"
- }
+ "type": "string",
+ "enum": [
+ "absolute-orientation",
+ "accelerometer",
+ "ambient-light",
+ "gravity",
+ "gyroscope",
+ "linear-acceleration",
+ "magnetometer",
+ "relative-orientation"
]
},
{
- "name": "setTimezoneOverride",
- "description": "Overrides default host system timezone with the specified one.",
- "parameters": [
+ "id": "SensorMetadata",
+ "experimental": true,
+ "type": "object",
+ "properties": [
{
- "name": "timezoneId",
- "description": "The timezone identifier. List of supported timezones:\nhttps://source.chromium.org/chromium/chromium/deps/icu.git/+/faee8bc70570192d82d2978a71e2a615788597d1:source/data/misc/metaZones.txt\nIf empty, disables the override and restores default host system timezone.",
- "type": "string"
+ "name": "available",
+ "optional": true,
+ "type": "boolean"
+ },
+ {
+ "name": "minimumFrequency",
+ "optional": true,
+ "type": "number"
+ },
+ {
+ "name": "maximumFrequency",
+ "optional": true,
+ "type": "number"
}
]
},
{
- "name": "setVisibleSize",
- "description": "Resizes the frame/viewport of the page. Note that this does not affect the frame's container\n(e.g. browser window). Can be used to produce screenshots of the specified size. Not supported\non Android.",
+ "id": "SensorReadingSingle",
"experimental": true,
- "deprecated": true,
- "parameters": [
- {
- "name": "width",
- "description": "Frame width (DIP).",
- "type": "integer"
- },
+ "type": "object",
+ "properties": [
{
- "name": "height",
- "description": "Frame height (DIP).",
- "type": "integer"
+ "name": "value",
+ "type": "number"
}
]
},
{
- "name": "setDisabledImageTypes",
+ "id": "SensorReadingXYZ",
"experimental": true,
- "parameters": [
+ "type": "object",
+ "properties": [
{
- "name": "imageTypes",
- "description": "Image types to disable.",
- "type": "array",
- "items": {
- "$ref": "DisabledImageType"
- }
+ "name": "x",
+ "type": "number"
+ },
+ {
+ "name": "y",
+ "type": "number"
+ },
+ {
+ "name": "z",
+ "type": "number"
}
]
},
{
- "name": "setHardwareConcurrencyOverride",
+ "id": "SensorReadingQuaternion",
"experimental": true,
- "parameters": [
+ "type": "object",
+ "properties": [
{
- "name": "hardwareConcurrency",
- "description": "Hardware concurrency to report",
- "type": "integer"
+ "name": "x",
+ "type": "number"
+ },
+ {
+ "name": "y",
+ "type": "number"
+ },
+ {
+ "name": "z",
+ "type": "number"
+ },
+ {
+ "name": "w",
+ "type": "number"
}
]
},
{
- "name": "setUserAgentOverride",
- "description": "Allows overriding user agent with the given string.\n`userAgentMetadata` must be set for Client Hint headers to be sent.",
- "parameters": [
- {
- "name": "userAgent",
- "description": "User agent to use.",
- "type": "string"
- },
+ "id": "SensorReading",
+ "experimental": true,
+ "type": "object",
+ "properties": [
{
- "name": "acceptLanguage",
- "description": "Browser language to emulate.",
+ "name": "single",
"optional": true,
- "type": "string"
+ "$ref": "SensorReadingSingle"
},
{
- "name": "platform",
- "description": "The platform navigator.platform should return.",
+ "name": "xyz",
"optional": true,
- "type": "string"
+ "$ref": "SensorReadingXYZ"
},
{
- "name": "userAgentMetadata",
- "description": "To be sent in Sec-CH-UA-* headers and returned in navigator.userAgentData",
- "experimental": true,
+ "name": "quaternion",
"optional": true,
- "$ref": "UserAgentMetadata"
+ "$ref": "SensorReadingQuaternion"
}
]
},
{
- "name": "setAutomationOverride",
- "description": "Allows overriding the automation flag.",
+ "id": "PressureSource",
"experimental": true,
- "parameters": [
+ "type": "string",
+ "enum": [
+ "cpu"
+ ]
+ },
+ {
+ "id": "PressureState",
+ "experimental": true,
+ "type": "string",
+ "enum": [
+ "nominal",
+ "fair",
+ "serious",
+ "critical"
+ ]
+ },
+ {
+ "id": "PressureMetadata",
+ "experimental": true,
+ "type": "object",
+ "properties": [
{
- "name": "enabled",
- "description": "Whether the override should be enabled.",
+ "name": "available",
+ "optional": true,
"type": "boolean"
}
]
- }
- ],
- "events": [
- {
- "name": "virtualTimeBudgetExpired",
- "description": "Notification sent after the virtual time budget for the current VirtualTimePolicy has run out.",
- "experimental": true
- }
- ]
- },
- {
- "domain": "HeadlessExperimental",
- "description": "This domain provides experimental commands only supported in headless mode.",
- "experimental": true,
- "dependencies": [
- "Page",
- "Runtime"
- ],
- "types": [
+ },
{
- "id": "ScreenshotParams",
- "description": "Encoding options for a screenshot.",
+ "id": "WorkAreaInsets",
+ "experimental": true,
"type": "object",
"properties": [
{
- "name": "format",
- "description": "Image compression format (defaults to png).",
+ "name": "top",
+ "description": "Work area top inset in pixels. Default is 0;",
"optional": true,
- "type": "string",
- "enum": [
- "jpeg",
- "png",
- "webp"
- ]
+ "type": "integer"
},
{
- "name": "quality",
- "description": "Compression quality from range [0..100] (jpeg and webp only).",
+ "name": "left",
+ "description": "Work area left inset in pixels. Default is 0;",
"optional": true,
"type": "integer"
},
{
- "name": "optimizeForSpeed",
- "description": "Optimize image encoding for speed, not for resulting size (defaults to false)",
+ "name": "bottom",
+ "description": "Work area bottom inset in pixels. Default is 0;",
"optional": true,
- "type": "boolean"
+ "type": "integer"
+ },
+ {
+ "name": "right",
+ "description": "Work area right inset in pixels. Default is 0;",
+ "optional": true,
+ "type": "integer"
}
]
- }
- ],
- "commands": [
+ },
{
- "name": "beginFrame",
- "description": "Sends a BeginFrame to the target and returns when the frame was completed. Optionally captures a\nscreenshot from the resulting frame. Requires that the target was created with enabled\nBeginFrameControl. Designed for use with --run-all-compositor-stages-before-draw, see also\nhttps://goo.gle/chrome-headless-rendering for more background.",
- "parameters": [
+ "id": "ScreenId",
+ "experimental": true,
+ "type": "string"
+ },
+ {
+ "id": "ScreenInfo",
+ "description": "Screen information similar to the one returned by window.getScreenDetails() method,\nsee https://w3c.github.io/window-management/#screendetailed.",
+ "experimental": true,
+ "type": "object",
+ "properties": [
{
- "name": "frameTimeTicks",
- "description": "Timestamp of this BeginFrame in Renderer TimeTicks (milliseconds of uptime). If not set,\nthe current time will be used.",
- "optional": true,
- "type": "number"
+ "name": "left",
+ "description": "Offset of the left edge of the screen.",
+ "type": "integer"
},
{
- "name": "interval",
- "description": "The interval between BeginFrames that is reported to the compositor, in milliseconds.\nDefaults to a 60 frames/second interval, i.e. about 16.666 milliseconds.",
- "optional": true,
+ "name": "top",
+ "description": "Offset of the top edge of the screen.",
+ "type": "integer"
+ },
+ {
+ "name": "width",
+ "description": "Width of the screen.",
+ "type": "integer"
+ },
+ {
+ "name": "height",
+ "description": "Height of the screen.",
+ "type": "integer"
+ },
+ {
+ "name": "availLeft",
+ "description": "Offset of the left edge of the available screen area.",
+ "type": "integer"
+ },
+ {
+ "name": "availTop",
+ "description": "Offset of the top edge of the available screen area.",
+ "type": "integer"
+ },
+ {
+ "name": "availWidth",
+ "description": "Width of the available screen area.",
+ "type": "integer"
+ },
+ {
+ "name": "availHeight",
+ "description": "Height of the available screen area.",
+ "type": "integer"
+ },
+ {
+ "name": "devicePixelRatio",
+ "description": "Specifies the screen's device pixel ratio.",
"type": "number"
},
{
- "name": "noDisplayUpdates",
- "description": "Whether updates should not be committed and drawn onto the display. False by default. If\ntrue, only side effects of the BeginFrame will be run, such as layout and animations, but\nany visual updates may not be visible on the display or in screenshots.",
- "optional": true,
+ "name": "orientation",
+ "description": "Specifies the screen's orientation.",
+ "$ref": "ScreenOrientation"
+ },
+ {
+ "name": "colorDepth",
+ "description": "Specifies the screen's color depth in bits.",
+ "type": "integer"
+ },
+ {
+ "name": "isExtended",
+ "description": "Indicates whether the device has multiple screens.",
"type": "boolean"
},
{
- "name": "screenshot",
- "description": "If set, a screenshot of the frame will be captured and returned in the response. Otherwise,\nno screenshot will be captured. Note that capturing a screenshot can fail, for example,\nduring renderer initialization. In such a case, no screenshot data will be returned.",
- "optional": true,
- "$ref": "ScreenshotParams"
- }
- ],
- "returns": [
+ "name": "isInternal",
+ "description": "Indicates whether the screen is internal to the device or external, attached to the device.",
+ "type": "boolean"
+ },
{
- "name": "hasDamage",
- "description": "Whether the BeginFrame resulted in damage and, thus, a new frame was committed to the\ndisplay. Reported for diagnostic uses, may be removed in the future.",
+ "name": "isPrimary",
+ "description": "Indicates whether the screen is set as the the operating system primary screen.",
"type": "boolean"
},
{
- "name": "screenshotData",
- "description": "Base64-encoded image data of the screenshot, if one was requested and successfully taken. (Encoded as a base64 string when passed over JSON)",
- "optional": true,
+ "name": "label",
+ "description": "Specifies the descriptive label for the screen.",
"type": "string"
+ },
+ {
+ "name": "id",
+ "description": "Specifies the unique identifier of the screen.",
+ "$ref": "ScreenId"
}
]
},
{
- "name": "disable",
- "description": "Disables headless events for the target.",
- "deprecated": true
- },
- {
- "name": "enable",
- "description": "Enables headless events for the target.",
- "deprecated": true
- }
- ]
- },
- {
- "domain": "IO",
- "description": "Input/Output operations for streams produced by DevTools.",
- "types": [
- {
- "id": "StreamHandle",
- "description": "This is either obtained from another method or specified as `blob:` where\n`` is an UUID of a Blob.",
- "type": "string"
+ "id": "DisabledImageType",
+ "description": "Enum of image types that can be disabled.",
+ "experimental": true,
+ "type": "string",
+ "enum": [
+ "avif",
+ "jxl",
+ "webp"
+ ]
}
],
"commands": [
{
- "name": "close",
- "description": "Close the stream, discard any temporary backing storage.",
- "parameters": [
+ "name": "canEmulate",
+ "description": "Tells whether emulation is supported.",
+ "deprecated": true,
+ "returns": [
{
- "name": "handle",
- "description": "Handle of the stream to close.",
- "$ref": "StreamHandle"
+ "name": "result",
+ "description": "True if emulation is supported.",
+ "type": "boolean"
}
]
},
{
- "name": "read",
- "description": "Read a chunk of the stream",
+ "name": "clearDeviceMetricsOverride",
+ "description": "Clears the overridden device metrics."
+ },
+ {
+ "name": "clearGeolocationOverride",
+ "description": "Clears the overridden Geolocation Position and Error."
+ },
+ {
+ "name": "resetPageScaleFactor",
+ "description": "Requests that page scale factor is reset to initial values.",
+ "experimental": true
+ },
+ {
+ "name": "setFocusEmulationEnabled",
+ "description": "Enables or disables simulating a focused and active page.",
+ "experimental": true,
"parameters": [
{
- "name": "handle",
- "description": "Handle of the stream to read.",
- "$ref": "StreamHandle"
- },
- {
- "name": "offset",
- "description": "Seek to the specified offset before reading (if not specified, proceed with offset\nfollowing the last read). Some types of streams may only support sequential reads.",
- "optional": true,
- "type": "integer"
- },
- {
- "name": "size",
- "description": "Maximum number of bytes to read (left upon the agent discretion if not specified).",
- "optional": true,
- "type": "integer"
+ "name": "enabled",
+ "description": "Whether to enable to disable focus emulation.",
+ "type": "boolean"
}
- ],
- "returns": [
+ ]
+ },
+ {
+ "name": "setAutoDarkModeOverride",
+ "description": "Automatically render all web contents using a dark theme.",
+ "experimental": true,
+ "parameters": [
{
- "name": "base64Encoded",
- "description": "Set if the data is base64-encoded",
+ "name": "enabled",
+ "description": "Whether to enable or disable automatic dark mode.\nIf not specified, any existing override will be cleared.",
"optional": true,
"type": "boolean"
- },
- {
- "name": "data",
- "description": "Data that were read.",
- "type": "string"
- },
+ }
+ ]
+ },
+ {
+ "name": "setCPUThrottlingRate",
+ "description": "Enables CPU throttling to emulate slow CPUs.",
+ "parameters": [
{
- "name": "eof",
- "description": "Set if the end-of-file condition occurred while reading.",
- "type": "boolean"
+ "name": "rate",
+ "description": "Throttling rate as a slowdown factor (1 is no throttle, 2 is 2x slowdown, etc).",
+ "type": "number"
}
]
},
{
- "name": "resolveBlob",
- "description": "Return UUID of Blob object specified by a remote object id.",
+ "name": "setDefaultBackgroundColorOverride",
+ "description": "Sets or clears an override of the default background color of the frame. This override is used\nif the content does not specify one.",
"parameters": [
{
- "name": "objectId",
- "description": "Object id of a Blob object wrapper.",
- "$ref": "Runtime.RemoteObjectId"
+ "name": "color",
+ "description": "RGBA of the default background color. If not specified, any existing override will be\ncleared.",
+ "optional": true,
+ "$ref": "DOM.RGBA"
}
- ],
- "returns": [
+ ]
+ },
+ {
+ "name": "setSafeAreaInsetsOverride",
+ "description": "Overrides the values for env(safe-area-inset-*) and env(safe-area-max-inset-*). Unset values will cause the\nrespective variables to be undefined, even if previously overridden.",
+ "experimental": true,
+ "parameters": [
{
- "name": "uuid",
- "description": "UUID of the specified Blob.",
- "type": "string"
+ "name": "insets",
+ "$ref": "SafeAreaInsets"
}
]
- }
- ]
- },
- {
- "domain": "FileSystem",
- "experimental": true,
- "dependencies": [
- "Network",
- "Storage"
- ],
- "types": [
+ },
{
- "id": "File",
- "type": "object",
- "properties": [
+ "name": "setDeviceMetricsOverride",
+ "description": "Overrides the values of device screen dimensions (window.screen.width, window.screen.height,\nwindow.innerWidth, window.innerHeight, and \"device-width\"/\"device-height\"-related CSS media\nquery results).",
+ "parameters": [
{
- "name": "name",
- "type": "string"
+ "name": "width",
+ "description": "Overriding width value in pixels (minimum 0, maximum 10000000). 0 disables the override.",
+ "type": "integer"
},
{
- "name": "lastModified",
- "description": "Timestamp",
- "$ref": "Network.TimeSinceEpoch"
+ "name": "height",
+ "description": "Overriding height value in pixels (minimum 0, maximum 10000000). 0 disables the override.",
+ "type": "integer"
},
{
- "name": "size",
- "description": "Size in bytes",
+ "name": "deviceScaleFactor",
+ "description": "Overriding device scale factor value. 0 disables the override.",
"type": "number"
},
{
- "name": "type",
- "type": "string"
- }
- ]
- },
- {
- "id": "Directory",
- "type": "object",
- "properties": [
+ "name": "mobile",
+ "description": "Whether to emulate mobile device. This includes viewport meta tag, overlay scrollbars, text\nautosizing and more.",
+ "type": "boolean"
+ },
{
- "name": "name",
- "type": "string"
+ "name": "scale",
+ "description": "Scale to apply to resulting view image.",
+ "experimental": true,
+ "optional": true,
+ "type": "number"
},
{
- "name": "nestedDirectories",
- "type": "array",
- "items": {
- "type": "string"
- }
+ "name": "screenWidth",
+ "description": "Overriding screen width value in pixels (minimum 0, maximum 10000000).",
+ "experimental": true,
+ "optional": true,
+ "type": "integer"
},
{
- "name": "nestedFiles",
- "description": "Files that are directly nested under this directory.",
- "type": "array",
- "items": {
- "$ref": "File"
- }
- }
- ]
- },
- {
- "id": "BucketFileSystemLocator",
- "type": "object",
- "properties": [
+ "name": "screenHeight",
+ "description": "Overriding screen height value in pixels (minimum 0, maximum 10000000).",
+ "experimental": true,
+ "optional": true,
+ "type": "integer"
+ },
{
- "name": "storageKey",
- "description": "Storage key",
- "$ref": "Storage.SerializedStorageKey"
+ "name": "positionX",
+ "description": "Overriding view X position on screen in pixels (minimum 0, maximum 10000000).",
+ "experimental": true,
+ "optional": true,
+ "type": "integer"
},
{
- "name": "bucketName",
- "description": "Bucket name. Not passing a `bucketName` will retrieve the default Bucket. (https://developer.mozilla.org/en-US/docs/Web/API/Storage_API#storage_buckets)",
+ "name": "positionY",
+ "description": "Overriding view Y position on screen in pixels (minimum 0, maximum 10000000).",
+ "experimental": true,
"optional": true,
- "type": "string"
+ "type": "integer"
},
{
- "name": "pathComponents",
- "description": "Path to the directory using each path component as an array item.",
- "type": "array",
- "items": {
- "type": "string"
- }
- }
- ]
- }
- ],
- "commands": [
- {
- "name": "getDirectory",
- "parameters": [
+ "name": "dontSetVisibleSize",
+ "description": "Do not set visible view size, rely upon explicit setVisibleSize call.",
+ "experimental": true,
+ "optional": true,
+ "type": "boolean"
+ },
{
- "name": "bucketFileSystemLocator",
- "$ref": "BucketFileSystemLocator"
- }
- ],
- "returns": [
+ "name": "screenOrientation",
+ "description": "Screen orientation override.",
+ "optional": true,
+ "$ref": "ScreenOrientation"
+ },
{
- "name": "directory",
- "description": "Returns the directory object at the path.",
- "$ref": "Directory"
- }
- ]
- }
- ]
- },
- {
- "domain": "IndexedDB",
- "experimental": true,
- "dependencies": [
- "Runtime",
- "Storage"
- ],
- "types": [
- {
- "id": "DatabaseWithObjectStores",
- "description": "Database with an array of object stores.",
- "type": "object",
- "properties": [
+ "name": "viewport",
+ "description": "If set, the visible area of the page will be overridden to this viewport. This viewport\nchange is not observed by the page, e.g. viewport-relative elements do not change positions.",
+ "experimental": true,
+ "optional": true,
+ "$ref": "Page.Viewport"
+ },
{
- "name": "name",
- "description": "Database name.",
- "type": "string"
+ "name": "displayFeature",
+ "description": "If set, the display feature of a multi-segment screen. If not set, multi-segment support\nis turned-off.\nDeprecated, use Emulation.setDisplayFeaturesOverride.",
+ "experimental": true,
+ "deprecated": true,
+ "optional": true,
+ "$ref": "DisplayFeature"
},
{
- "name": "version",
- "description": "Database version (type is not 'integer', as the standard\nrequires the version number to be 'unsigned long long')",
- "type": "number"
+ "name": "devicePosture",
+ "description": "If set, the posture of a foldable device. If not set the posture is set\nto continuous.\nDeprecated, use Emulation.setDevicePostureOverride.",
+ "experimental": true,
+ "deprecated": true,
+ "optional": true,
+ "$ref": "DevicePosture"
},
{
- "name": "objectStores",
- "description": "Object stores in this database.",
+ "name": "scrollbarType",
+ "description": "Scrollbar type. Default: `default`.",
+ "experimental": true,
+ "optional": true,
+ "type": "string",
+ "enum": [
+ "overlay",
+ "default"
+ ]
+ },
+ {
+ "name": "screenOrientationLockEmulation",
+ "description": "If set to true, enables screen orientation lock emulation, which\nintercepts screen.orientation.lock() calls from the page and reports\norientation changes via screenOrientationLockChanged events. This is\nuseful for emulating mobile device orientation lock behavior in\nresponsive design mode.",
+ "experimental": true,
+ "optional": true,
+ "type": "boolean"
+ }
+ ]
+ },
+ {
+ "name": "setDevicePostureOverride",
+ "description": "Start reporting the given posture value to the Device Posture API.\nThis override can also be set in setDeviceMetricsOverride().",
+ "experimental": true,
+ "parameters": [
+ {
+ "name": "posture",
+ "$ref": "DevicePosture"
+ }
+ ]
+ },
+ {
+ "name": "clearDevicePostureOverride",
+ "description": "Clears a device posture override set with either setDeviceMetricsOverride()\nor setDevicePostureOverride() and starts using posture information from the\nplatform again.\nDoes nothing if no override is set.",
+ "experimental": true
+ },
+ {
+ "name": "setDisplayFeaturesOverride",
+ "description": "Start using the given display features to pupulate the Viewport Segments API.\nThis override can also be set in setDeviceMetricsOverride().",
+ "experimental": true,
+ "parameters": [
+ {
+ "name": "features",
"type": "array",
"items": {
- "$ref": "ObjectStore"
+ "$ref": "DisplayFeature"
}
}
]
},
{
- "id": "ObjectStore",
- "description": "Object store.",
- "type": "object",
- "properties": [
+ "name": "clearDisplayFeaturesOverride",
+ "description": "Clears the display features override set with either setDeviceMetricsOverride()\nor setDisplayFeaturesOverride() and starts using display features from the\nplatform again.\nDoes nothing if no override is set.",
+ "experimental": true
+ },
+ {
+ "name": "setScrollbarsHidden",
+ "experimental": true,
+ "parameters": [
{
- "name": "name",
- "description": "Object store name.",
- "type": "string"
- },
+ "name": "hidden",
+ "description": "Whether scrollbars should be always hidden.",
+ "type": "boolean"
+ }
+ ]
+ },
+ {
+ "name": "setDocumentCookieDisabled",
+ "experimental": true,
+ "parameters": [
{
- "name": "keyPath",
- "description": "Object store key path.",
- "$ref": "KeyPath"
- },
+ "name": "disabled",
+ "description": "Whether document.coookie API should be disabled.",
+ "type": "boolean"
+ }
+ ]
+ },
+ {
+ "name": "setEmitTouchEventsForMouse",
+ "experimental": true,
+ "parameters": [
{
- "name": "autoIncrement",
- "description": "If true, object store has auto increment flag set.",
+ "name": "enabled",
+ "description": "Whether touch emulation based on mouse input should be enabled.",
"type": "boolean"
},
{
- "name": "indexes",
- "description": "Indexes in this object store.",
- "type": "array",
- "items": {
- "$ref": "ObjectStoreIndex"
- }
+ "name": "configuration",
+ "description": "Touch/gesture events configuration. Default: current platform.",
+ "optional": true,
+ "type": "string",
+ "enum": [
+ "mobile",
+ "desktop"
+ ]
}
]
},
{
- "id": "ObjectStoreIndex",
- "description": "Object store index.",
- "type": "object",
- "properties": [
+ "name": "setEmulatedMedia",
+ "description": "Emulates the given media type or media feature for CSS media queries.",
+ "parameters": [
{
- "name": "name",
- "description": "Index name.",
+ "name": "media",
+ "description": "Media type to emulate. Empty string disables the override.",
+ "optional": true,
"type": "string"
},
{
- "name": "keyPath",
- "description": "Index key path.",
- "$ref": "KeyPath"
- },
- {
- "name": "unique",
- "description": "If true, index is unique.",
- "type": "boolean"
- },
- {
- "name": "multiEntry",
- "description": "If true, index allows multiple entries for a key.",
- "type": "boolean"
+ "name": "features",
+ "description": "Media features to emulate.",
+ "optional": true,
+ "type": "array",
+ "items": {
+ "$ref": "MediaFeature"
+ }
}
]
},
{
- "id": "Key",
- "description": "Key.",
- "type": "object",
- "properties": [
+ "name": "setEmulatedVisionDeficiency",
+ "description": "Emulates the given vision deficiency.",
+ "parameters": [
{
"name": "type",
- "description": "Key type.",
+ "description": "Vision deficiency to emulate. Order: best-effort emulations come first, followed by any\nphysiologically accurate emulations for medically recognized color vision deficiencies.",
"type": "string",
"enum": [
- "number",
- "string",
- "date",
- "array"
+ "none",
+ "blurredVision",
+ "reducedContrast",
+ "achromatopsia",
+ "deuteranopia",
+ "protanopia",
+ "tritanopia"
]
- },
+ }
+ ]
+ },
+ {
+ "name": "setEmulatedOSTextScale",
+ "description": "Emulates the given OS text scale.",
+ "parameters": [
{
- "name": "number",
- "description": "Number value.",
+ "name": "scale",
"optional": true,
"type": "number"
- },
+ }
+ ]
+ },
+ {
+ "name": "setGeolocationOverride",
+ "description": "Overrides the Geolocation Position or Error. Omitting latitude, longitude or\naccuracy emulates position unavailable.",
+ "parameters": [
{
- "name": "string",
- "description": "String value.",
+ "name": "latitude",
+ "description": "Mock latitude",
"optional": true,
- "type": "string"
+ "type": "number"
},
{
- "name": "date",
- "description": "Date value.",
+ "name": "longitude",
+ "description": "Mock longitude",
"optional": true,
"type": "number"
},
{
- "name": "array",
- "description": "Array value.",
+ "name": "accuracy",
+ "description": "Mock accuracy",
"optional": true,
- "type": "array",
- "items": {
- "$ref": "Key"
- }
- }
- ]
- },
- {
- "id": "KeyRange",
- "description": "Key range.",
- "type": "object",
- "properties": [
+ "type": "number"
+ },
{
- "name": "lower",
- "description": "Lower bound.",
+ "name": "altitude",
+ "description": "Mock altitude",
"optional": true,
- "$ref": "Key"
+ "type": "number"
},
{
- "name": "upper",
- "description": "Upper bound.",
+ "name": "altitudeAccuracy",
+ "description": "Mock altitudeAccuracy",
"optional": true,
- "$ref": "Key"
+ "type": "number"
},
{
- "name": "lowerOpen",
- "description": "If true lower bound is open.",
- "type": "boolean"
+ "name": "heading",
+ "description": "Mock heading",
+ "optional": true,
+ "type": "number"
},
{
- "name": "upperOpen",
- "description": "If true upper bound is open.",
- "type": "boolean"
+ "name": "speed",
+ "description": "Mock speed",
+ "optional": true,
+ "type": "number"
}
]
},
{
- "id": "DataEntry",
- "description": "Data entry.",
- "type": "object",
- "properties": [
- {
- "name": "key",
- "description": "Key object.",
- "$ref": "Runtime.RemoteObject"
- },
+ "name": "getOverriddenSensorInformation",
+ "experimental": true,
+ "parameters": [
{
- "name": "primaryKey",
- "description": "Primary key object.",
- "$ref": "Runtime.RemoteObject"
- },
+ "name": "type",
+ "$ref": "SensorType"
+ }
+ ],
+ "returns": [
{
- "name": "value",
- "description": "Value object.",
- "$ref": "Runtime.RemoteObject"
+ "name": "requestedSamplingFrequency",
+ "type": "number"
}
]
},
{
- "id": "KeyPath",
- "description": "Key path.",
- "type": "object",
- "properties": [
+ "name": "setSensorOverrideEnabled",
+ "description": "Overrides a platform sensor of a given type. If |enabled| is true, calls to\nSensor.start() will use a virtual sensor as backend rather than fetching\ndata from a real hardware sensor. Otherwise, existing virtual\nsensor-backend Sensor objects will fire an error event and new calls to\nSensor.start() will attempt to use a real sensor instead.",
+ "experimental": true,
+ "parameters": [
{
- "name": "type",
- "description": "Key path type.",
- "type": "string",
- "enum": [
- "null",
- "string",
- "array"
- ]
+ "name": "enabled",
+ "type": "boolean"
},
{
- "name": "string",
- "description": "String value.",
- "optional": true,
- "type": "string"
+ "name": "type",
+ "$ref": "SensorType"
},
{
- "name": "array",
- "description": "Array value.",
+ "name": "metadata",
"optional": true,
- "type": "array",
- "items": {
- "type": "string"
- }
+ "$ref": "SensorMetadata"
}
]
- }
- ],
- "commands": [
+ },
{
- "name": "clearObjectStore",
- "description": "Clears all entries from an object store.",
+ "name": "setSensorOverrideReadings",
+ "description": "Updates the sensor readings reported by a sensor type previously overridden\nby setSensorOverrideEnabled.",
+ "experimental": true,
"parameters": [
{
- "name": "securityOrigin",
- "description": "At least and at most one of securityOrigin, storageKey, or storageBucket must be specified.\nSecurity origin.",
- "optional": true,
- "type": "string"
- },
- {
- "name": "storageKey",
- "description": "Storage key.",
- "optional": true,
- "type": "string"
- },
- {
- "name": "storageBucket",
- "description": "Storage bucket. If not specified, it uses the default bucket.",
- "optional": true,
- "$ref": "Storage.StorageBucket"
- },
- {
- "name": "databaseName",
- "description": "Database name.",
- "type": "string"
+ "name": "type",
+ "$ref": "SensorType"
},
{
- "name": "objectStoreName",
- "description": "Object store name.",
- "type": "string"
+ "name": "reading",
+ "$ref": "SensorReading"
}
]
},
{
- "name": "deleteDatabase",
- "description": "Deletes a database.",
+ "name": "setPressureSourceOverrideEnabled",
+ "description": "Overrides a pressure source of a given type, as used by the Compute\nPressure API, so that updates to PressureObserver.observe() are provided\nvia setPressureStateOverride instead of being retrieved from\nplatform-provided telemetry data.",
+ "experimental": true,
"parameters": [
{
- "name": "securityOrigin",
- "description": "At least and at most one of securityOrigin, storageKey, or storageBucket must be specified.\nSecurity origin.",
- "optional": true,
- "type": "string"
+ "name": "enabled",
+ "type": "boolean"
},
{
- "name": "storageKey",
- "description": "Storage key.",
- "optional": true,
- "type": "string"
+ "name": "source",
+ "$ref": "PressureSource"
},
{
- "name": "storageBucket",
- "description": "Storage bucket. If not specified, it uses the default bucket.",
+ "name": "metadata",
"optional": true,
- "$ref": "Storage.StorageBucket"
+ "$ref": "PressureMetadata"
+ }
+ ]
+ },
+ {
+ "name": "setPressureStateOverride",
+ "description": "TODO: OBSOLETE: To remove when setPressureDataOverride is merged.\nProvides a given pressure state that will be processed and eventually be\ndelivered to PressureObserver users. |source| must have been previously\noverridden by setPressureSourceOverrideEnabled.",
+ "experimental": true,
+ "parameters": [
+ {
+ "name": "source",
+ "$ref": "PressureSource"
},
{
- "name": "databaseName",
- "description": "Database name.",
- "type": "string"
+ "name": "state",
+ "$ref": "PressureState"
}
]
},
{
- "name": "deleteObjectStoreEntries",
- "description": "Delete a range of entries from an object store",
+ "name": "setPressureDataOverride",
+ "description": "Provides a given pressure data set that will be processed and eventually be\ndelivered to PressureObserver users. |source| must have been previously\noverridden by setPressureSourceOverrideEnabled.",
+ "experimental": true,
"parameters": [
{
- "name": "securityOrigin",
- "description": "At least and at most one of securityOrigin, storageKey, or storageBucket must be specified.\nSecurity origin.",
- "optional": true,
- "type": "string"
+ "name": "source",
+ "$ref": "PressureSource"
},
{
- "name": "storageKey",
- "description": "Storage key.",
- "optional": true,
- "type": "string"
+ "name": "state",
+ "$ref": "PressureState"
},
{
- "name": "storageBucket",
- "description": "Storage bucket. If not specified, it uses the default bucket.",
+ "name": "ownContributionEstimate",
"optional": true,
- "$ref": "Storage.StorageBucket"
- },
+ "type": "number"
+ }
+ ]
+ },
+ {
+ "name": "setIdleOverride",
+ "description": "Overrides the Idle state.",
+ "parameters": [
{
- "name": "databaseName",
- "type": "string"
+ "name": "isUserActive",
+ "description": "Mock isUserActive",
+ "type": "boolean"
},
{
- "name": "objectStoreName",
- "type": "string"
- },
+ "name": "isScreenUnlocked",
+ "description": "Mock isScreenUnlocked",
+ "type": "boolean"
+ }
+ ]
+ },
+ {
+ "name": "clearIdleOverride",
+ "description": "Clears Idle state overrides."
+ },
+ {
+ "name": "setNavigatorOverrides",
+ "description": "Overrides value returned by the javascript navigator object.",
+ "experimental": true,
+ "deprecated": true,
+ "parameters": [
{
- "name": "keyRange",
- "description": "Range of entry keys to delete",
- "$ref": "KeyRange"
+ "name": "platform",
+ "description": "The platform navigator.platform should return.",
+ "type": "string"
}
]
},
{
- "name": "disable",
- "description": "Disables events from backend."
+ "name": "setPageScaleFactor",
+ "description": "Sets a specified page scale factor.",
+ "experimental": true,
+ "parameters": [
+ {
+ "name": "pageScaleFactor",
+ "description": "Page scale factor.",
+ "type": "number"
+ }
+ ]
},
{
- "name": "enable",
- "description": "Enables events from backend."
+ "name": "setScriptExecutionDisabled",
+ "description": "Switches script execution in the page.",
+ "parameters": [
+ {
+ "name": "value",
+ "description": "Whether script execution should be disabled in the page.",
+ "type": "boolean"
+ }
+ ]
},
{
- "name": "requestData",
- "description": "Requests data from object store or index.",
+ "name": "setTouchEmulationEnabled",
+ "description": "Enables touch on platforms which do not support them.",
"parameters": [
{
- "name": "securityOrigin",
- "description": "At least and at most one of securityOrigin, storageKey, or storageBucket must be specified.\nSecurity origin.",
+ "name": "enabled",
+ "description": "Whether the touch event emulation should be enabled.",
+ "type": "boolean"
+ },
+ {
+ "name": "maxTouchPoints",
+ "description": "Maximum touch points supported. Defaults to one.",
"optional": true,
- "type": "string"
+ "type": "integer"
+ }
+ ]
+ },
+ {
+ "name": "setVirtualTimePolicy",
+ "description": "Turns on virtual time for all frames (replacing real-time with a synthetic time source) and sets\nthe current virtual time policy. Note this supersedes any previous time budget.",
+ "experimental": true,
+ "parameters": [
+ {
+ "name": "policy",
+ "$ref": "VirtualTimePolicy"
},
{
- "name": "storageKey",
- "description": "Storage key.",
+ "name": "budget",
+ "description": "If set, after this many virtual milliseconds have elapsed virtual time will be paused and a\nvirtualTimeBudgetExpired event is sent.",
"optional": true,
- "type": "string"
+ "type": "number"
},
{
- "name": "storageBucket",
- "description": "Storage bucket. If not specified, it uses the default bucket.",
+ "name": "maxVirtualTimeTaskStarvationCount",
+ "description": "If set this specifies the maximum number of tasks that can be run before virtual is forced\nforwards to prevent deadlock.",
"optional": true,
- "$ref": "Storage.StorageBucket"
+ "type": "integer"
},
{
- "name": "databaseName",
- "description": "Database name.",
- "type": "string"
- },
+ "name": "initialVirtualTime",
+ "description": "If set, base::Time::Now will be overridden to initially return this value.",
+ "optional": true,
+ "$ref": "Network.TimeSinceEpoch"
+ }
+ ],
+ "returns": [
{
- "name": "objectStoreName",
- "description": "Object store name.",
+ "name": "virtualTimeTicksBase",
+ "description": "Absolute timestamp at which virtual time was first enabled (up time in milliseconds).",
+ "type": "number"
+ }
+ ]
+ },
+ {
+ "name": "setLocaleOverride",
+ "description": "Overrides default host system locale with the specified one.",
+ "experimental": true,
+ "parameters": [
+ {
+ "name": "locale",
+ "description": "ICU style C locale (e.g. \"en_US\"). If not specified or empty, disables the override and\nrestores default host system locale.",
+ "optional": true,
"type": "string"
- },
+ }
+ ]
+ },
+ {
+ "name": "setTimezoneOverride",
+ "description": "Overrides default host system timezone with the specified one.",
+ "parameters": [
{
- "name": "indexName",
- "description": "Index name, empty string for object store data requests.",
+ "name": "timezoneId",
+ "description": "The timezone identifier. List of supported timezones:\nhttps://source.chromium.org/chromium/chromium/deps/icu.git/+/faee8bc70570192d82d2978a71e2a615788597d1:source/data/misc/metaZones.txt\nIf empty, disables the override and restores default host system timezone.",
"type": "string"
- },
+ }
+ ]
+ },
+ {
+ "name": "setVisibleSize",
+ "description": "Resizes the frame/viewport of the page. Note that this does not affect the frame's container\n(e.g. browser window). Can be used to produce screenshots of the specified size. Not supported\non Android.",
+ "experimental": true,
+ "deprecated": true,
+ "parameters": [
{
- "name": "skipCount",
- "description": "Number of records to skip.",
+ "name": "width",
+ "description": "Frame width (DIP).",
"type": "integer"
},
{
- "name": "pageSize",
- "description": "Number of records to fetch.",
+ "name": "height",
+ "description": "Frame height (DIP).",
"type": "integer"
- },
- {
- "name": "keyRange",
- "description": "Key range.",
- "optional": true,
- "$ref": "KeyRange"
}
- ],
- "returns": [
+ ]
+ },
+ {
+ "name": "setDisabledImageTypes",
+ "experimental": true,
+ "parameters": [
{
- "name": "objectStoreDataEntries",
- "description": "Array of object store data entries.",
+ "name": "imageTypes",
+ "description": "Image types to disable.",
"type": "array",
"items": {
- "$ref": "DataEntry"
+ "$ref": "DisabledImageType"
}
- },
- {
- "name": "hasMore",
- "description": "If true, there are more entries to fetch in the given range.",
- "type": "boolean"
}
]
},
{
- "name": "getMetadata",
- "description": "Gets metadata of an object store.",
+ "name": "setDataSaverOverride",
+ "description": "Override the value of navigator.connection.saveData",
+ "experimental": true,
"parameters": [
{
- "name": "securityOrigin",
- "description": "At least and at most one of securityOrigin, storageKey, or storageBucket must be specified.\nSecurity origin.",
- "optional": true,
- "type": "string"
- },
- {
- "name": "storageKey",
- "description": "Storage key.",
- "optional": true,
- "type": "string"
- },
- {
- "name": "storageBucket",
- "description": "Storage bucket. If not specified, it uses the default bucket.",
+ "name": "dataSaverEnabled",
+ "description": "Override value. Omitting the parameter disables the override.",
"optional": true,
- "$ref": "Storage.StorageBucket"
- },
- {
- "name": "databaseName",
- "description": "Database name.",
- "type": "string"
- },
- {
- "name": "objectStoreName",
- "description": "Object store name.",
- "type": "string"
+ "type": "boolean"
}
- ],
- "returns": [
- {
- "name": "entriesCount",
- "description": "the entries count",
- "type": "number"
- },
+ ]
+ },
+ {
+ "name": "setHardwareConcurrencyOverride",
+ "experimental": true,
+ "parameters": [
{
- "name": "keyGeneratorValue",
- "description": "the current value of key generator, to become the next inserted\nkey into the object store. Valid if objectStore.autoIncrement\nis true.",
- "type": "number"
+ "name": "hardwareConcurrency",
+ "description": "Hardware concurrency to report",
+ "type": "integer"
}
]
},
{
- "name": "requestDatabase",
- "description": "Requests database with given name in given frame.",
+ "name": "setUserAgentOverride",
+ "description": "Allows overriding user agent with the given string.\n`userAgentMetadata` must be set for Client Hint headers to be sent.",
"parameters": [
{
- "name": "securityOrigin",
- "description": "At least and at most one of securityOrigin, storageKey, or storageBucket must be specified.\nSecurity origin.",
- "optional": true,
+ "name": "userAgent",
+ "description": "User agent to use.",
"type": "string"
},
{
- "name": "storageKey",
- "description": "Storage key.",
+ "name": "acceptLanguage",
+ "description": "Browser language to emulate.",
"optional": true,
"type": "string"
},
{
- "name": "storageBucket",
- "description": "Storage bucket. If not specified, it uses the default bucket.",
+ "name": "platform",
+ "description": "The platform navigator.platform should return.",
"optional": true,
- "$ref": "Storage.StorageBucket"
+ "type": "string"
},
{
- "name": "databaseName",
- "description": "Database name.",
- "type": "string"
+ "name": "userAgentMetadata",
+ "description": "To be sent in Sec-CH-UA-* headers and returned in navigator.userAgentData",
+ "experimental": true,
+ "optional": true,
+ "$ref": "UserAgentMetadata"
}
- ],
- "returns": [
+ ]
+ },
+ {
+ "name": "setAutomationOverride",
+ "description": "Allows overriding the automation flag.",
+ "experimental": true,
+ "parameters": [
{
- "name": "databaseWithObjectStores",
- "description": "Database with an array of object stores.",
- "$ref": "DatabaseWithObjectStores"
+ "name": "enabled",
+ "description": "Whether the override should be enabled.",
+ "type": "boolean"
}
]
},
{
- "name": "requestDatabaseNames",
- "description": "Requests database names for given security origin.",
+ "name": "setSmallViewportHeightDifferenceOverride",
+ "description": "Allows overriding the difference between the small and large viewport sizes, which determine the\nvalue of the `svh` and `lvh` unit, respectively. Only supported for top-level frames.",
+ "experimental": true,
"parameters": [
{
- "name": "securityOrigin",
- "description": "At least and at most one of securityOrigin, storageKey, or storageBucket must be specified.\nSecurity origin.",
- "optional": true,
- "type": "string"
- },
- {
- "name": "storageKey",
- "description": "Storage key.",
- "optional": true,
- "type": "string"
- },
- {
- "name": "storageBucket",
- "description": "Storage bucket. If not specified, it uses the default bucket.",
- "optional": true,
- "$ref": "Storage.StorageBucket"
+ "name": "difference",
+ "description": "This will cause an element of size 100svh to be `difference` pixels smaller than an element\nof size 100lvh.",
+ "type": "integer"
}
- ],
+ ]
+ },
+ {
+ "name": "getScreenInfos",
+ "description": "Returns device's screen configuration. In headful mode, the physical screens configuration is returned,\nwhereas in headless mode, a virtual headless screen configuration is provided instead.",
+ "experimental": true,
"returns": [
{
- "name": "databaseNames",
- "description": "Database names for origin.",
+ "name": "screenInfos",
"type": "array",
"items": {
- "type": "string"
+ "$ref": "ScreenInfo"
}
}
]
- }
- ]
- },
- {
- "domain": "Input",
- "types": [
+ },
{
- "id": "TouchPoint",
- "type": "object",
- "properties": [
+ "name": "addScreen",
+ "description": "Add a new screen to the device. Only supported in headless mode.",
+ "experimental": true,
+ "parameters": [
{
- "name": "x",
- "description": "X coordinate of the event relative to the main frame's viewport in CSS pixels.",
- "type": "number"
+ "name": "left",
+ "description": "Offset of the left edge of the screen in pixels.",
+ "type": "integer"
},
{
- "name": "y",
- "description": "Y coordinate of the event relative to the main frame's viewport in CSS pixels. 0 refers to\nthe top of the viewport and Y increases as it proceeds towards the bottom of the viewport.",
- "type": "number"
+ "name": "top",
+ "description": "Offset of the top edge of the screen in pixels.",
+ "type": "integer"
},
{
- "name": "radiusX",
- "description": "X radius of the touch area (default: 1.0).",
- "optional": true,
- "type": "number"
+ "name": "width",
+ "description": "The width of the screen in pixels.",
+ "type": "integer"
},
{
- "name": "radiusY",
- "description": "Y radius of the touch area (default: 1.0).",
- "optional": true,
- "type": "number"
+ "name": "height",
+ "description": "The height of the screen in pixels.",
+ "type": "integer"
},
{
- "name": "rotationAngle",
- "description": "Rotation angle (default: 0.0).",
+ "name": "workAreaInsets",
+ "description": "Specifies the screen's work area. Default is entire screen.",
"optional": true,
- "type": "number"
+ "$ref": "WorkAreaInsets"
},
{
- "name": "force",
- "description": "Force (default: 1.0).",
+ "name": "devicePixelRatio",
+ "description": "Specifies the screen's device pixel ratio. Default is 1.",
"optional": true,
"type": "number"
},
{
- "name": "tangentialPressure",
- "description": "The normalized tangential pressure, which has a range of [-1,1] (default: 0).",
- "experimental": true,
+ "name": "rotation",
+ "description": "Specifies the screen's rotation angle. Available values are 0, 90, 180 and 270. Default is 0.",
"optional": true,
- "type": "number"
+ "type": "integer"
},
{
- "name": "tiltX",
- "description": "The plane angle between the Y-Z plane and the plane containing both the stylus axis and the Y axis, in degrees of the range [-90,90], a positive tiltX is to the right (default: 0)",
+ "name": "colorDepth",
+ "description": "Specifies the screen's color depth in bits. Default is 24.",
"optional": true,
- "type": "number"
+ "type": "integer"
},
{
- "name": "tiltY",
- "description": "The plane angle between the X-Z plane and the plane containing both the stylus axis and the X axis, in degrees of the range [-90,90], a positive tiltY is towards the user (default: 0).",
+ "name": "label",
+ "description": "Specifies the descriptive label for the screen. Default is none.",
"optional": true,
- "type": "number"
+ "type": "string"
},
{
- "name": "twist",
- "description": "The clockwise rotation of a pen stylus around its own major axis, in degrees in the range [0,359] (default: 0).",
- "experimental": true,
+ "name": "isInternal",
+ "description": "Indicates whether the screen is internal to the device or external, attached to the device. Default is false.",
"optional": true,
- "type": "integer"
- },
- {
- "name": "id",
- "description": "Identifier used to track touch sources between events, must be unique within an event.",
- "optional": true,
- "type": "number"
+ "type": "boolean"
}
- ]
- },
- {
- "id": "GestureSourceType",
- "experimental": true,
- "type": "string",
- "enum": [
- "default",
- "touch",
- "mouse"
- ]
- },
- {
- "id": "MouseButton",
- "type": "string",
- "enum": [
- "none",
- "left",
- "middle",
- "right",
- "back",
- "forward"
- ]
- },
- {
- "id": "TimeSinceEpoch",
- "description": "UTC time in seconds, counted from January 1, 1970.",
- "type": "number"
- },
- {
- "id": "DragDataItem",
- "experimental": true,
- "type": "object",
- "properties": [
- {
- "name": "mimeType",
- "description": "Mime type of the dragged data.",
- "type": "string"
- },
- {
- "name": "data",
- "description": "Depending of the value of `mimeType`, it contains the dragged link,\ntext, HTML markup or any other data.",
- "type": "string"
- },
- {
- "name": "title",
- "description": "Title associated with a link. Only valid when `mimeType` == \"text/uri-list\".",
- "optional": true,
- "type": "string"
- },
+ ],
+ "returns": [
{
- "name": "baseURL",
- "description": "Stores the base URL for the contained markup. Only valid when `mimeType`\n== \"text/html\".",
- "optional": true,
- "type": "string"
+ "name": "screenInfo",
+ "$ref": "ScreenInfo"
}
]
},
{
- "id": "DragData",
- "experimental": true,
- "type": "object",
- "properties": [
- {
- "name": "items",
- "type": "array",
- "items": {
- "$ref": "DragDataItem"
- }
- },
- {
- "name": "files",
- "description": "List of filenames that should be included when dropping",
- "optional": true,
- "type": "array",
- "items": {
- "type": "string"
- }
- },
- {
- "name": "dragOperationsMask",
- "description": "Bit field representing allowed drag operations. Copy = 1, Link = 2, Move = 16",
- "type": "integer"
- }
- ]
- }
- ],
- "commands": [
- {
- "name": "dispatchDragEvent",
- "description": "Dispatches a drag event into the page.",
+ "name": "updateScreen",
+ "description": "Updates specified screen parameters. Only supported in headless mode.",
"experimental": true,
"parameters": [
{
- "name": "type",
- "description": "Type of the drag event.",
- "type": "string",
- "enum": [
- "dragEnter",
- "dragOver",
- "drop",
- "dragCancel"
- ]
- },
- {
- "name": "x",
- "description": "X coordinate of the event relative to the main frame's viewport in CSS pixels.",
- "type": "number"
- },
- {
- "name": "y",
- "description": "Y coordinate of the event relative to the main frame's viewport in CSS pixels. 0 refers to\nthe top of the viewport and Y increases as it proceeds towards the bottom of the viewport.",
- "type": "number"
- },
- {
- "name": "data",
- "$ref": "DragData"
+ "name": "screenId",
+ "description": "Target screen identifier.",
+ "$ref": "ScreenId"
},
{
- "name": "modifiers",
- "description": "Bit field representing pressed modifier keys. Alt=1, Ctrl=2, Meta/Command=4, Shift=8\n(default: 0).",
+ "name": "left",
+ "description": "Offset of the left edge of the screen in pixels.",
"optional": true,
"type": "integer"
- }
- ]
- },
- {
- "name": "dispatchKeyEvent",
- "description": "Dispatches a key event to the page.",
- "parameters": [
- {
- "name": "type",
- "description": "Type of the key event.",
- "type": "string",
- "enum": [
- "keyDown",
- "keyUp",
- "rawKeyDown",
- "char"
- ]
},
{
- "name": "modifiers",
- "description": "Bit field representing pressed modifier keys. Alt=1, Ctrl=2, Meta/Command=4, Shift=8\n(default: 0).",
+ "name": "top",
+ "description": "Offset of the top edge of the screen in pixels.",
"optional": true,
"type": "integer"
},
{
- "name": "timestamp",
- "description": "Time at which the event occurred.",
- "optional": true,
- "$ref": "TimeSinceEpoch"
- },
- {
- "name": "text",
- "description": "Text as generated by processing a virtual key code with a keyboard layout. Not needed for\nfor `keyUp` and `rawKeyDown` events (default: \"\")",
- "optional": true,
- "type": "string"
- },
- {
- "name": "unmodifiedText",
- "description": "Text that would have been generated by the keyboard if no modifiers were pressed (except for\nshift). Useful for shortcut (accelerator) key handling (default: \"\").",
+ "name": "width",
+ "description": "The width of the screen in pixels.",
"optional": true,
- "type": "string"
+ "type": "integer"
},
{
- "name": "keyIdentifier",
- "description": "Unique key identifier (e.g., 'U+0041') (default: \"\").",
+ "name": "height",
+ "description": "The height of the screen in pixels.",
"optional": true,
- "type": "string"
+ "type": "integer"
},
{
- "name": "code",
- "description": "Unique DOM defined string value for each physical key (e.g., 'KeyA') (default: \"\").",
+ "name": "workAreaInsets",
+ "description": "Specifies the screen's work area.",
"optional": true,
- "type": "string"
+ "$ref": "WorkAreaInsets"
},
{
- "name": "key",
- "description": "Unique DOM defined string value describing the meaning of the key in the context of active\nmodifiers, keyboard layout, etc (e.g., 'AltGr') (default: \"\").",
+ "name": "devicePixelRatio",
+ "description": "Specifies the screen's device pixel ratio.",
"optional": true,
- "type": "string"
+ "type": "number"
},
{
- "name": "windowsVirtualKeyCode",
- "description": "Windows virtual key code (default: 0).",
+ "name": "rotation",
+ "description": "Specifies the screen's rotation angle. Available values are 0, 90, 180 and 270.",
"optional": true,
"type": "integer"
},
{
- "name": "nativeVirtualKeyCode",
- "description": "Native virtual key code (default: 0).",
+ "name": "colorDepth",
+ "description": "Specifies the screen's color depth in bits.",
"optional": true,
"type": "integer"
},
{
- "name": "autoRepeat",
- "description": "Whether the event was generated from auto repeat (default: false).",
- "optional": true,
- "type": "boolean"
- },
- {
- "name": "isKeypad",
- "description": "Whether the event was generated from the keypad (default: false).",
+ "name": "label",
+ "description": "Specifies the descriptive label for the screen.",
"optional": true,
- "type": "boolean"
+ "type": "string"
},
{
- "name": "isSystemKey",
- "description": "Whether the event was a system key event (default: false).",
+ "name": "isInternal",
+ "description": "Indicates whether the screen is internal to the device or external, attached to the device. Default is false.",
"optional": true,
"type": "boolean"
- },
- {
- "name": "location",
- "description": "Whether the event was from the left or right side of the keyboard. 1=Left, 2=Right (default:\n0).",
- "optional": true,
- "type": "integer"
- },
+ }
+ ],
+ "returns": [
{
- "name": "commands",
- "description": "Editing commands to send with the key event (e.g., 'selectAll') (default: []).\nThese are related to but not equal the command names used in `document.execCommand` and NSStandardKeyBindingResponding.\nSee https://source.chromium.org/chromium/chromium/src/+/main:third_party/blink/renderer/core/editing/commands/editor_command_names.h for valid command names.",
- "experimental": true,
- "optional": true,
- "type": "array",
- "items": {
- "type": "string"
- }
+ "name": "screenInfo",
+ "$ref": "ScreenInfo"
}
]
},
{
- "name": "insertText",
- "description": "This method emulates inserting text that doesn't come from a key press,\nfor example an emoji keyboard or an IME.",
+ "name": "removeScreen",
+ "description": "Remove screen from the device. Only supported in headless mode.",
"experimental": true,
"parameters": [
{
- "name": "text",
- "description": "The text to insert.",
- "type": "string"
+ "name": "screenId",
+ "$ref": "ScreenId"
}
]
},
{
- "name": "imeSetComposition",
- "description": "This method sets the current candidate text for IME.\nUse imeCommitComposition to commit the final text.\nUse imeSetComposition with empty string as text to cancel composition.",
+ "name": "setPrimaryScreen",
+ "description": "Set primary screen. Only supported in headless mode.\nNote that this changes the coordinate system origin to the top-left\nof the new primary screen, updating the bounds and work areas\nof all existing screens accordingly.",
"experimental": true,
"parameters": [
{
- "name": "text",
- "description": "The text to insert",
- "type": "string"
- },
- {
- "name": "selectionStart",
- "description": "selection start",
- "type": "integer"
- },
- {
- "name": "selectionEnd",
- "description": "selection end",
- "type": "integer"
- },
- {
- "name": "replacementStart",
- "description": "replacement start",
- "optional": true,
- "type": "integer"
- },
- {
- "name": "replacementEnd",
- "description": "replacement end",
- "optional": true,
- "type": "integer"
+ "name": "screenId",
+ "$ref": "ScreenId"
}
]
+ }
+ ],
+ "events": [
+ {
+ "name": "virtualTimeBudgetExpired",
+ "description": "Notification sent after the virtual time budget for the current VirtualTimePolicy has run out.",
+ "experimental": true
},
{
- "name": "dispatchMouseEvent",
- "description": "Dispatches a mouse event to the page.",
+ "name": "screenOrientationLockChanged",
+ "description": "Fired when a page calls screen.orientation.lock() or screen.orientation.unlock()\nwhile device emulation is enabled. This allows the DevTools frontend to update the\nemulated device orientation accordingly.",
+ "experimental": true,
"parameters": [
{
- "name": "type",
- "description": "Type of the mouse event.",
- "type": "string",
- "enum": [
- "mousePressed",
- "mouseReleased",
- "mouseMoved",
- "mouseWheel"
- ]
- },
- {
- "name": "x",
- "description": "X coordinate of the event relative to the main frame's viewport in CSS pixels.",
- "type": "number"
- },
- {
- "name": "y",
- "description": "Y coordinate of the event relative to the main frame's viewport in CSS pixels. 0 refers to\nthe top of the viewport and Y increases as it proceeds towards the bottom of the viewport.",
- "type": "number"
+ "name": "locked",
+ "description": "Whether the screen orientation is currently locked.",
+ "type": "boolean"
},
{
- "name": "modifiers",
- "description": "Bit field representing pressed modifier keys. Alt=1, Ctrl=2, Meta/Command=4, Shift=8\n(default: 0).",
+ "name": "orientation",
+ "description": "The orientation lock type requested by the page. Only set when locked is true.",
"optional": true,
- "type": "integer"
- },
+ "$ref": "ScreenOrientation"
+ }
+ ]
+ }
+ ]
+ },
+ {
+ "domain": "EventBreakpoints",
+ "description": "EventBreakpoints permits setting JavaScript breakpoints on operations and events\noccurring in native code invoked from JavaScript. Once breakpoint is hit, it is\nreported through Debugger domain, similarly to regular breakpoints being hit.",
+ "experimental": true,
+ "commands": [
+ {
+ "name": "setInstrumentationBreakpoint",
+ "description": "Sets breakpoint on particular native event.",
+ "parameters": [
{
- "name": "timestamp",
- "description": "Time at which the event occurred.",
- "optional": true,
- "$ref": "TimeSinceEpoch"
- },
+ "name": "eventName",
+ "description": "Instrumentation name to stop on.",
+ "type": "string"
+ }
+ ]
+ },
+ {
+ "name": "removeInstrumentationBreakpoint",
+ "description": "Removes breakpoint on particular native event.",
+ "parameters": [
{
- "name": "button",
- "description": "Mouse button (default: \"none\").",
- "optional": true,
- "$ref": "MouseButton"
- },
+ "name": "eventName",
+ "description": "Instrumentation name to stop on.",
+ "type": "string"
+ }
+ ]
+ },
+ {
+ "name": "disable",
+ "description": "Removes all breakpoints"
+ }
+ ]
+ },
+ {
+ "domain": "Extensions",
+ "description": "Defines commands and events for browser extensions.",
+ "experimental": true,
+ "types": [
+ {
+ "id": "StorageArea",
+ "description": "Storage areas.",
+ "type": "string",
+ "enum": [
+ "session",
+ "local",
+ "sync",
+ "managed"
+ ]
+ },
+ {
+ "id": "ExtensionInfo",
+ "description": "Detailed information about an extension.",
+ "type": "object",
+ "properties": [
{
- "name": "buttons",
- "description": "A number indicating which buttons are pressed on the mouse when a mouse event is triggered.\nLeft=1, Right=2, Middle=4, Back=8, Forward=16, None=0.",
- "optional": true,
- "type": "integer"
+ "name": "id",
+ "description": "Extension id.",
+ "type": "string"
},
{
- "name": "clickCount",
- "description": "Number of times the mouse button was clicked (default: 0).",
- "optional": true,
- "type": "integer"
+ "name": "name",
+ "description": "Extension name.",
+ "type": "string"
},
{
- "name": "force",
- "description": "The normalized pressure, which has a range of [0,1] (default: 0).",
- "experimental": true,
- "optional": true,
- "type": "number"
+ "name": "version",
+ "description": "Extension version.",
+ "type": "string"
},
{
- "name": "tangentialPressure",
- "description": "The normalized tangential pressure, which has a range of [-1,1] (default: 0).",
- "experimental": true,
- "optional": true,
- "type": "number"
+ "name": "path",
+ "description": "The path from which the extension was loaded.",
+ "type": "string"
},
{
- "name": "tiltX",
- "description": "The plane angle between the Y-Z plane and the plane containing both the stylus axis and the Y axis, in degrees of the range [-90,90], a positive tiltX is to the right (default: 0).",
- "optional": true,
- "type": "number"
- },
+ "name": "enabled",
+ "description": "Extension enabled status.",
+ "type": "boolean"
+ }
+ ]
+ }
+ ],
+ "commands": [
+ {
+ "name": "triggerAction",
+ "description": "Runs an extension default action.\nAvailable if the client is connected using the --remote-debugging-pipe\nflag and the --enable-unsafe-extension-debugging flag is set.",
+ "parameters": [
{
- "name": "tiltY",
- "description": "The plane angle between the X-Z plane and the plane containing both the stylus axis and the X axis, in degrees of the range [-90,90], a positive tiltY is towards the user (default: 0).",
- "optional": true,
- "type": "number"
+ "name": "id",
+ "description": "Extension id.",
+ "type": "string"
},
{
- "name": "twist",
- "description": "The clockwise rotation of a pen stylus around its own major axis, in degrees in the range [0,359] (default: 0).",
- "experimental": true,
- "optional": true,
- "type": "integer"
- },
+ "name": "targetId",
+ "description": "A tab target ID to trigger the default extension action on.",
+ "type": "string"
+ }
+ ]
+ },
+ {
+ "name": "loadUnpacked",
+ "description": "Installs an unpacked extension from the filesystem similar to\n--load-extension CLI flags. Returns extension ID once the extension\nhas been installed. Available if the client is connected using the\n--remote-debugging-pipe flag and the --enable-unsafe-extension-debugging\nflag is set.",
+ "parameters": [
{
- "name": "deltaX",
- "description": "X delta in CSS pixels for mouse wheel event (default: 0).",
- "optional": true,
- "type": "number"
+ "name": "path",
+ "description": "Absolute file path.",
+ "type": "string"
},
{
- "name": "deltaY",
- "description": "Y delta in CSS pixels for mouse wheel event (default: 0).",
+ "name": "enableInIncognito",
+ "description": "Enable the extension in incognito",
"optional": true,
- "type": "number"
- },
+ "type": "boolean"
+ }
+ ],
+ "returns": [
{
- "name": "pointerType",
- "description": "Pointer type (default: \"mouse\").",
- "optional": true,
- "type": "string",
- "enum": [
- "mouse",
- "pen"
- ]
+ "name": "id",
+ "description": "Extension id.",
+ "type": "string"
}
]
},
{
- "name": "dispatchTouchEvent",
- "description": "Dispatches a touch event to the page.",
- "parameters": [
- {
- "name": "type",
- "description": "Type of the touch event. TouchEnd and TouchCancel must not contain any touch points, while\nTouchStart and TouchMove must contains at least one.",
- "type": "string",
- "enum": [
- "touchStart",
- "touchEnd",
- "touchMove",
- "touchCancel"
- ]
- },
+ "name": "getExtensions",
+ "description": "Gets a list of all unpacked extensions.\nAvailable if the client is connected using the --remote-debugging-pipe flag\nand the --enable-unsafe-extension-debugging flag is set.",
+ "returns": [
{
- "name": "touchPoints",
- "description": "Active touch points on the touch device. One event per any changed point (compared to\nprevious touch event in a sequence) is generated, emulating pressing/moving/releasing points\none by one.",
+ "name": "extensions",
"type": "array",
"items": {
- "$ref": "TouchPoint"
+ "$ref": "ExtensionInfo"
}
- },
- {
- "name": "modifiers",
- "description": "Bit field representing pressed modifier keys. Alt=1, Ctrl=2, Meta/Command=4, Shift=8\n(default: 0).",
- "optional": true,
- "type": "integer"
- },
- {
- "name": "timestamp",
- "description": "Time at which the event occurred.",
- "optional": true,
- "$ref": "TimeSinceEpoch"
}
]
},
{
- "name": "cancelDragging",
- "description": "Cancels any active dragging in the page."
+ "name": "uninstall",
+ "description": "Uninstalls an unpacked extension (others not supported) from the profile.\nAvailable if the client is connected using the --remote-debugging-pipe flag\nand the --enable-unsafe-extension-debugging.",
+ "parameters": [
+ {
+ "name": "id",
+ "description": "Extension id.",
+ "type": "string"
+ }
+ ]
},
{
- "name": "emulateTouchFromMouseEvent",
- "description": "Emulates touch event from the mouse event parameters.",
- "experimental": true,
+ "name": "getStorageItems",
+ "description": "Gets data from extension storage in the given `storageArea`. If `keys` is\nspecified, these are used to filter the result.",
"parameters": [
{
- "name": "type",
- "description": "Type of the mouse event.",
- "type": "string",
- "enum": [
- "mousePressed",
- "mouseReleased",
- "mouseMoved",
- "mouseWheel"
- ]
- },
- {
- "name": "x",
- "description": "X coordinate of the mouse pointer in DIP.",
- "type": "integer"
- },
- {
- "name": "y",
- "description": "Y coordinate of the mouse pointer in DIP.",
- "type": "integer"
- },
- {
- "name": "button",
- "description": "Mouse button. Only \"none\", \"left\", \"right\" are supported.",
- "$ref": "MouseButton"
+ "name": "id",
+ "description": "ID of extension.",
+ "type": "string"
},
{
- "name": "timestamp",
- "description": "Time at which the event occurred (default: current time).",
- "optional": true,
- "$ref": "TimeSinceEpoch"
+ "name": "storageArea",
+ "description": "StorageArea to retrieve data from.",
+ "$ref": "StorageArea"
},
{
- "name": "deltaX",
- "description": "X delta in DIP for mouse wheel event (default: 0).",
+ "name": "keys",
+ "description": "Keys to retrieve.",
"optional": true,
- "type": "number"
- },
- {
- "name": "deltaY",
- "description": "Y delta in DIP for mouse wheel event (default: 0).",
- "optional": true,
- "type": "number"
- },
- {
- "name": "modifiers",
- "description": "Bit field representing pressed modifier keys. Alt=1, Ctrl=2, Meta/Command=4, Shift=8\n(default: 0).",
- "optional": true,
- "type": "integer"
- },
+ "type": "array",
+ "items": {
+ "type": "string"
+ }
+ }
+ ],
+ "returns": [
{
- "name": "clickCount",
- "description": "Number of times the mouse button was clicked (default: 0).",
- "optional": true,
- "type": "integer"
+ "name": "data",
+ "type": "object"
}
]
},
{
- "name": "setIgnoreInputEvents",
- "description": "Ignores input events (useful while auditing page).",
+ "name": "removeStorageItems",
+ "description": "Removes `keys` from extension storage in the given `storageArea`.",
"parameters": [
{
- "name": "ignore",
- "description": "Ignores input events processing when set to true.",
- "type": "boolean"
+ "name": "id",
+ "description": "ID of extension.",
+ "type": "string"
+ },
+ {
+ "name": "storageArea",
+ "description": "StorageArea to remove data from.",
+ "$ref": "StorageArea"
+ },
+ {
+ "name": "keys",
+ "description": "Keys to remove.",
+ "type": "array",
+ "items": {
+ "type": "string"
+ }
}
]
},
{
- "name": "setInterceptDrags",
- "description": "Prevents default drag and drop behavior and instead emits `Input.dragIntercepted` events.\nDrag and drop behavior can be directly controlled via `Input.dispatchDragEvent`.",
- "experimental": true,
+ "name": "clearStorageItems",
+ "description": "Clears extension storage in the given `storageArea`.",
"parameters": [
{
- "name": "enabled",
- "type": "boolean"
+ "name": "id",
+ "description": "ID of extension.",
+ "type": "string"
+ },
+ {
+ "name": "storageArea",
+ "description": "StorageArea to remove data from.",
+ "$ref": "StorageArea"
}
]
},
{
- "name": "synthesizePinchGesture",
- "description": "Synthesizes a pinch gesture over a time period by issuing appropriate touch events.",
- "experimental": true,
+ "name": "setStorageItems",
+ "description": "Sets `values` in extension storage in the given `storageArea`. The provided `values`\nwill be merged with existing values in the storage area.",
"parameters": [
{
- "name": "x",
- "description": "X coordinate of the start of the gesture in CSS pixels.",
- "type": "number"
- },
- {
- "name": "y",
- "description": "Y coordinate of the start of the gesture in CSS pixels.",
- "type": "number"
- },
- {
- "name": "scaleFactor",
- "description": "Relative scale factor after zooming (>1.0 zooms in, <1.0 zooms out).",
- "type": "number"
+ "name": "id",
+ "description": "ID of extension.",
+ "type": "string"
},
{
- "name": "relativeSpeed",
- "description": "Relative pointer speed in pixels per second (default: 800).",
- "optional": true,
- "type": "integer"
+ "name": "storageArea",
+ "description": "StorageArea to set data in.",
+ "$ref": "StorageArea"
},
{
- "name": "gestureSourceType",
- "description": "Which type of input events to be generated (default: 'default', which queries the platform\nfor the preferred input type).",
- "optional": true,
- "$ref": "GestureSourceType"
+ "name": "values",
+ "description": "Values to set.",
+ "type": "object"
}
]
+ }
+ ]
+ },
+ {
+ "domain": "FedCm",
+ "description": "This domain allows interacting with the FedCM dialog.",
+ "experimental": true,
+ "types": [
+ {
+ "id": "LoginState",
+ "description": "Whether this is a sign-up or sign-in action for this account, i.e.\nwhether this account has ever been used to sign in to this RP before.",
+ "type": "string",
+ "enum": [
+ "SignIn",
+ "SignUp"
+ ]
},
{
- "name": "synthesizeScrollGesture",
- "description": "Synthesizes a scroll gesture over a time period by issuing appropriate touch events.",
- "experimental": true,
- "parameters": [
- {
- "name": "x",
- "description": "X coordinate of the start of the gesture in CSS pixels.",
- "type": "number"
- },
- {
- "name": "y",
- "description": "Y coordinate of the start of the gesture in CSS pixels.",
- "type": "number"
- },
+ "id": "DialogType",
+ "description": "The types of FedCM dialogs.",
+ "type": "string",
+ "enum": [
+ "AccountChooser",
+ "AutoReauthn",
+ "ConfirmIdpLogin",
+ "Error"
+ ]
+ },
+ {
+ "id": "DialogButton",
+ "description": "The buttons on the FedCM dialog.",
+ "type": "string",
+ "enum": [
+ "ConfirmIdpLoginContinue",
+ "ErrorGotIt",
+ "ErrorMoreDetails"
+ ]
+ },
+ {
+ "id": "AccountUrlType",
+ "description": "The URLs that each account has",
+ "type": "string",
+ "enum": [
+ "TermsOfService",
+ "PrivacyPolicy"
+ ]
+ },
+ {
+ "id": "Account",
+ "description": "Corresponds to IdentityRequestAccount",
+ "type": "object",
+ "properties": [
{
- "name": "xDistance",
- "description": "The distance to scroll along the X axis (positive to scroll left).",
- "optional": true,
- "type": "number"
+ "name": "accountId",
+ "type": "string"
},
{
- "name": "yDistance",
- "description": "The distance to scroll along the Y axis (positive to scroll up).",
- "optional": true,
- "type": "number"
+ "name": "email",
+ "type": "string"
},
{
- "name": "xOverscroll",
- "description": "The number of additional pixels to scroll back along the X axis, in addition to the given\ndistance.",
- "optional": true,
- "type": "number"
+ "name": "name",
+ "type": "string"
},
{
- "name": "yOverscroll",
- "description": "The number of additional pixels to scroll back along the Y axis, in addition to the given\ndistance.",
- "optional": true,
- "type": "number"
+ "name": "givenName",
+ "type": "string"
},
{
- "name": "preventFling",
- "description": "Prevent fling (default: true).",
- "optional": true,
- "type": "boolean"
+ "name": "pictureUrl",
+ "type": "string"
},
{
- "name": "speed",
- "description": "Swipe speed in pixels per second (default: 800).",
- "optional": true,
- "type": "integer"
+ "name": "idpConfigUrl",
+ "type": "string"
},
{
- "name": "gestureSourceType",
- "description": "Which type of input events to be generated (default: 'default', which queries the platform\nfor the preferred input type).",
- "optional": true,
- "$ref": "GestureSourceType"
+ "name": "idpLoginUrl",
+ "type": "string"
},
{
- "name": "repeatCount",
- "description": "The number of times to repeat the gesture (default: 0).",
- "optional": true,
- "type": "integer"
+ "name": "loginState",
+ "$ref": "LoginState"
},
{
- "name": "repeatDelayMs",
- "description": "The number of milliseconds delay between each repeat. (default: 250).",
+ "name": "termsOfServiceUrl",
+ "description": "These two are only set if the loginState is signUp",
"optional": true,
- "type": "integer"
+ "type": "string"
},
{
- "name": "interactionMarkerName",
- "description": "The name of the interaction markers to generate, if not empty (default: \"\").",
+ "name": "privacyPolicyUrl",
"optional": true,
"type": "string"
}
]
- },
+ }
+ ],
+ "events": [
{
- "name": "synthesizeTapGesture",
- "description": "Synthesizes a tap gesture over a time period by issuing appropriate touch events.",
- "experimental": true,
+ "name": "dialogShown",
"parameters": [
{
- "name": "x",
- "description": "X coordinate of the start of the gesture in CSS pixels.",
- "type": "number"
+ "name": "dialogId",
+ "type": "string"
},
{
- "name": "y",
- "description": "Y coordinate of the start of the gesture in CSS pixels.",
- "type": "number"
+ "name": "dialogType",
+ "$ref": "DialogType"
},
{
- "name": "duration",
- "description": "Duration between touchdown and touchup events in ms (default: 50).",
- "optional": true,
- "type": "integer"
+ "name": "accounts",
+ "type": "array",
+ "items": {
+ "$ref": "Account"
+ }
},
{
- "name": "tapCount",
- "description": "Number of times to perform the tap (e.g. 2 for double tap, default: 1).",
- "optional": true,
- "type": "integer"
+ "name": "title",
+ "description": "These exist primarily so that the caller can verify the\nRP context was used appropriately.",
+ "type": "string"
},
{
- "name": "gestureSourceType",
- "description": "Which type of input events to be generated (default: 'default', which queries the platform\nfor the preferred input type).",
+ "name": "subtitle",
"optional": true,
- "$ref": "GestureSourceType"
+ "type": "string"
}
]
- }
- ],
- "events": [
+ },
{
- "name": "dragIntercepted",
- "description": "Emitted only when `Input.setInterceptDrags` is enabled. Use this data with `Input.dispatchDragEvent` to\nrestore normal drag and drop behavior.",
- "experimental": true,
+ "name": "dialogClosed",
+ "description": "Triggered when a dialog is closed, either by user action, JS abort,\nor a command below.",
"parameters": [
{
- "name": "data",
- "$ref": "DragData"
+ "name": "dialogId",
+ "type": "string"
}
]
}
- ]
- },
- {
- "domain": "Inspector",
- "experimental": true,
+ ],
"commands": [
{
- "name": "disable",
- "description": "Disables inspector domain notifications."
+ "name": "enable",
+ "parameters": [
+ {
+ "name": "disableRejectionDelay",
+ "description": "Allows callers to disable the promise rejection delay that would\nnormally happen, if this is unimportant to what's being tested.\n(step 4 of https://fedidcg.github.io/FedCM/#browser-api-rp-sign-in)",
+ "optional": true,
+ "type": "boolean"
+ }
+ ]
},
{
- "name": "enable",
- "description": "Enables inspector domain notifications."
- }
- ],
- "events": [
+ "name": "disable"
+ },
{
- "name": "detached",
- "description": "Fired when remote debugging connection is about to be terminated. Contains detach reason.",
+ "name": "selectAccount",
"parameters": [
{
- "name": "reason",
- "description": "The reason why connection has been terminated.",
+ "name": "dialogId",
"type": "string"
+ },
+ {
+ "name": "accountIndex",
+ "type": "integer"
}
]
},
{
- "name": "targetCrashed",
- "description": "Fired when debugging target has crashed"
+ "name": "clickDialogButton",
+ "parameters": [
+ {
+ "name": "dialogId",
+ "type": "string"
+ },
+ {
+ "name": "dialogButton",
+ "$ref": "DialogButton"
+ }
+ ]
},
{
- "name": "targetReloadedAfterCrash",
- "description": "Fired when debugging target has reloaded after crash"
+ "name": "openUrl",
+ "parameters": [
+ {
+ "name": "dialogId",
+ "type": "string"
+ },
+ {
+ "name": "accountIndex",
+ "type": "integer"
+ },
+ {
+ "name": "accountUrlType",
+ "$ref": "AccountUrlType"
+ }
+ ]
+ },
+ {
+ "name": "dismissDialog",
+ "parameters": [
+ {
+ "name": "dialogId",
+ "type": "string"
+ },
+ {
+ "name": "triggerCooldown",
+ "optional": true,
+ "type": "boolean"
+ }
+ ]
+ },
+ {
+ "name": "resetCooldown",
+ "description": "Resets the cooldown time, if any, to allow the next FedCM call to show\na dialog even if one was recently dismissed by the user."
}
]
},
{
- "domain": "LayerTree",
- "experimental": true,
+ "domain": "Fetch",
+ "description": "A domain for letting clients substitute browser's network layer with client code.",
"dependencies": [
- "DOM"
+ "Network",
+ "IO",
+ "Page"
],
"types": [
{
- "id": "LayerId",
- "description": "Unique Layer identifier.",
+ "id": "RequestId",
+ "description": "Unique request identifier.\nNote that this does not identify individual HTTP requests that are part of\na network request.",
"type": "string"
},
{
- "id": "SnapshotId",
- "description": "Unique snapshot identifier.",
- "type": "string"
+ "id": "RequestStage",
+ "description": "Stages of the request to handle. Request will intercept before the request is\nsent. Response will intercept after the response is received (but before response\nbody is received).",
+ "type": "string",
+ "enum": [
+ "Request",
+ "Response"
+ ]
},
{
- "id": "ScrollRect",
- "description": "Rectangle where scrolling happens on the main thread.",
+ "id": "RequestPattern",
"type": "object",
"properties": [
{
- "name": "rect",
- "description": "Rectangle itself.",
- "$ref": "DOM.Rect"
+ "name": "urlPattern",
+ "description": "Wildcards (`'*'` -> zero or more, `'?'` -> exactly one) are allowed. Escape character is\nbackslash. Omitting is equivalent to `\"*\"`.",
+ "optional": true,
+ "type": "string"
},
{
- "name": "type",
- "description": "Reason for rectangle to force scrolling on the main thread",
- "type": "string",
- "enum": [
- "RepaintsOnScroll",
- "TouchEventHandler",
- "WheelEventHandler"
- ]
+ "name": "resourceType",
+ "description": "If set, only requests for matching resource types will be intercepted.",
+ "optional": true,
+ "$ref": "Network.ResourceType"
+ },
+ {
+ "name": "requestStage",
+ "description": "Stage at which to begin intercepting requests. Default is Request.",
+ "optional": true,
+ "$ref": "RequestStage"
}
]
},
{
- "id": "StickyPositionConstraint",
- "description": "Sticky position constraints.",
+ "id": "HeaderEntry",
+ "description": "Response HTTP header entry",
"type": "object",
"properties": [
{
- "name": "stickyBoxRect",
- "description": "Layout rectangle of the sticky element before being shifted",
- "$ref": "DOM.Rect"
- },
- {
- "name": "containingBlockRect",
- "description": "Layout rectangle of the containing block of the sticky element",
- "$ref": "DOM.Rect"
- },
- {
- "name": "nearestLayerShiftingStickyBox",
- "description": "The nearest sticky layer that shifts the sticky box",
- "optional": true,
- "$ref": "LayerId"
+ "name": "name",
+ "type": "string"
},
{
- "name": "nearestLayerShiftingContainingBlock",
- "description": "The nearest sticky layer that shifts the containing block",
- "optional": true,
- "$ref": "LayerId"
+ "name": "value",
+ "type": "string"
}
]
},
{
- "id": "PictureTile",
- "description": "Serialized fragment of layer picture along with its offset within the layer.",
+ "id": "AuthChallenge",
+ "description": "Authorization challenge for HTTP status code 401 or 407.",
"type": "object",
"properties": [
{
- "name": "x",
- "description": "Offset from owning layer left boundary",
- "type": "number"
+ "name": "source",
+ "description": "Source of the authentication challenge.",
+ "optional": true,
+ "type": "string",
+ "enum": [
+ "Server",
+ "Proxy"
+ ]
},
{
- "name": "y",
- "description": "Offset from owning layer top boundary",
- "type": "number"
+ "name": "origin",
+ "description": "Origin of the challenger.",
+ "type": "string"
},
{
- "name": "picture",
- "description": "Base64-encoded snapshot data. (Encoded as a base64 string when passed over JSON)",
+ "name": "scheme",
+ "description": "The authentication scheme used, such as basic or digest",
+ "type": "string"
+ },
+ {
+ "name": "realm",
+ "description": "The realm of the challenge. May be empty.",
"type": "string"
}
]
},
{
- "id": "Layer",
- "description": "Information about a compositing layer.",
+ "id": "AuthChallengeResponse",
+ "description": "Response to an AuthChallenge.",
"type": "object",
"properties": [
{
- "name": "layerId",
- "description": "The unique id for this layer.",
- "$ref": "LayerId"
+ "name": "response",
+ "description": "The decision on what to do in response to the authorization challenge. Default means\ndeferring to the default behavior of the net stack, which will likely either the Cancel\nauthentication or display a popup dialog box.",
+ "type": "string",
+ "enum": [
+ "Default",
+ "CancelAuth",
+ "ProvideCredentials"
+ ]
},
{
- "name": "parentLayerId",
- "description": "The id of parent (not present for root).",
+ "name": "username",
+ "description": "The username to provide, possibly empty. Should only be set if response is\nProvideCredentials.",
"optional": true,
- "$ref": "LayerId"
+ "type": "string"
},
{
- "name": "backendNodeId",
- "description": "The backend id for the node associated with this layer.",
+ "name": "password",
+ "description": "The password to provide, possibly empty. Should only be set if response is\nProvideCredentials.",
"optional": true,
- "$ref": "DOM.BackendNodeId"
- },
+ "type": "string"
+ }
+ ]
+ }
+ ],
+ "commands": [
+ {
+ "name": "disable",
+ "description": "Disables the fetch domain."
+ },
+ {
+ "name": "enable",
+ "description": "Enables issuing of requestPaused events. A request will be paused until client\ncalls one of failRequest, fulfillRequest or continueRequest/continueWithAuth.",
+ "parameters": [
{
- "name": "offsetX",
- "description": "Offset from parent layer, X coordinate.",
- "type": "number"
+ "name": "patterns",
+ "description": "If specified, only requests matching any of these patterns will produce\nfetchRequested event and will be paused until clients response. If not set,\nall requests will be affected.",
+ "optional": true,
+ "type": "array",
+ "items": {
+ "$ref": "RequestPattern"
+ }
},
{
- "name": "offsetY",
- "description": "Offset from parent layer, Y coordinate.",
- "type": "number"
+ "name": "handleAuthRequests",
+ "description": "If true, authRequired events will be issued and requests will be paused\nexpecting a call to continueWithAuth.",
+ "optional": true,
+ "type": "boolean"
+ }
+ ]
+ },
+ {
+ "name": "failRequest",
+ "description": "Causes the request to fail with specified reason.",
+ "parameters": [
+ {
+ "name": "requestId",
+ "description": "An id the client received in requestPaused event.",
+ "$ref": "RequestId"
},
{
- "name": "width",
- "description": "Layer width.",
- "type": "number"
+ "name": "errorReason",
+ "description": "Causes the request to fail with the given reason.",
+ "$ref": "Network.ErrorReason"
+ }
+ ]
+ },
+ {
+ "name": "fulfillRequest",
+ "description": "Provides response to the request.",
+ "parameters": [
+ {
+ "name": "requestId",
+ "description": "An id the client received in requestPaused event.",
+ "$ref": "RequestId"
},
{
- "name": "height",
- "description": "Layer height.",
- "type": "number"
+ "name": "responseCode",
+ "description": "An HTTP response code.",
+ "type": "integer"
},
{
- "name": "transform",
- "description": "Transformation matrix for layer, default is identity matrix",
+ "name": "responseHeaders",
+ "description": "Response headers.",
"optional": true,
"type": "array",
"items": {
- "type": "number"
+ "$ref": "HeaderEntry"
}
},
{
- "name": "anchorX",
- "description": "Transform anchor point X, absent if no transform specified",
+ "name": "binaryResponseHeaders",
+ "description": "Alternative way of specifying response headers as a \\0-separated\nseries of name: value pairs. Prefer the above method unless you\nneed to represent some non-UTF8 values that can't be transmitted\nover the protocol as text. (Encoded as a base64 string when passed over JSON)",
"optional": true,
- "type": "number"
+ "type": "string"
},
{
- "name": "anchorY",
- "description": "Transform anchor point Y, absent if no transform specified",
+ "name": "body",
+ "description": "A response body. If absent, original response body will be used if\nthe request is intercepted at the response stage and empty body\nwill be used if the request is intercepted at the request stage. (Encoded as a base64 string when passed over JSON)",
"optional": true,
- "type": "number"
+ "type": "string"
},
{
- "name": "anchorZ",
- "description": "Transform anchor point Z, absent if no transform specified",
+ "name": "responsePhrase",
+ "description": "A textual representation of responseCode.\nIf absent, a standard phrase matching responseCode is used.",
"optional": true,
- "type": "number"
+ "type": "string"
+ }
+ ]
+ },
+ {
+ "name": "continueRequest",
+ "description": "Continues the request, optionally modifying some of its parameters.",
+ "parameters": [
+ {
+ "name": "requestId",
+ "description": "An id the client received in requestPaused event.",
+ "$ref": "RequestId"
},
{
- "name": "paintCount",
- "description": "Indicates how many time this layer has painted.",
- "type": "integer"
+ "name": "url",
+ "description": "If set, the request url will be modified in a way that's not observable by page.",
+ "optional": true,
+ "type": "string"
},
{
- "name": "drawsContent",
- "description": "Indicates whether this layer hosts any content, rather than being used for\ntransform/scrolling purposes only.",
- "type": "boolean"
+ "name": "method",
+ "description": "If set, the request method is overridden.",
+ "optional": true,
+ "type": "string"
},
{
- "name": "invisible",
- "description": "Set if layer is not visible.",
+ "name": "postData",
+ "description": "If set, overrides the post data in the request. (Encoded as a base64 string when passed over JSON)",
"optional": true,
- "type": "boolean"
+ "type": "string"
},
{
- "name": "scrollRects",
- "description": "Rectangles scrolling on main thread only.",
+ "name": "headers",
+ "description": "If set, overrides the request headers. Note that the overrides do not\nextend to subsequent redirect hops, if a redirect happens. Another override\nmay be applied to a different request produced by a redirect.",
"optional": true,
"type": "array",
"items": {
- "$ref": "ScrollRect"
+ "$ref": "HeaderEntry"
}
},
{
- "name": "stickyPositionConstraint",
- "description": "Sticky position constraint information",
+ "name": "interceptResponse",
+ "description": "If set, overrides response interception behavior for this request.",
+ "experimental": true,
"optional": true,
- "$ref": "StickyPositionConstraint"
+ "type": "boolean"
}
]
},
{
- "id": "PaintProfile",
- "description": "Array of timings, one per paint step.",
- "type": "array",
- "items": {
- "type": "number"
- }
- }
- ],
- "commands": [
- {
- "name": "compositingReasons",
- "description": "Provides the reasons why the given layer was composited.",
+ "name": "continueWithAuth",
+ "description": "Continues a request supplying authChallengeResponse following authRequired event.",
"parameters": [
{
- "name": "layerId",
- "description": "The id of the layer for which we want to get the reasons it was composited.",
- "$ref": "LayerId"
+ "name": "requestId",
+ "description": "An id the client received in authRequired event.",
+ "$ref": "RequestId"
+ },
+ {
+ "name": "authChallengeResponse",
+ "description": "Response to with an authChallenge.",
+ "$ref": "AuthChallengeResponse"
}
- ],
- "returns": [
+ ]
+ },
+ {
+ "name": "continueResponse",
+ "description": "Continues loading of the paused response, optionally modifying the\nresponse headers. If either responseCode or headers are modified, all of them\nmust be present.",
+ "experimental": true,
+ "parameters": [
{
- "name": "compositingReasons",
- "description": "A list of strings specifying reasons for the given layer to become composited.",
- "type": "array",
- "items": {
- "type": "string"
- }
+ "name": "requestId",
+ "description": "An id the client received in requestPaused event.",
+ "$ref": "RequestId"
},
{
- "name": "compositingReasonIds",
- "description": "A list of strings specifying reason IDs for the given layer to become composited.",
+ "name": "responseCode",
+ "description": "An HTTP response code. If absent, original response code will be used.",
+ "optional": true,
+ "type": "integer"
+ },
+ {
+ "name": "responsePhrase",
+ "description": "A textual representation of responseCode.\nIf absent, a standard phrase matching responseCode is used.",
+ "optional": true,
+ "type": "string"
+ },
+ {
+ "name": "responseHeaders",
+ "description": "Response headers. If absent, original response headers will be used.",
+ "optional": true,
"type": "array",
"items": {
- "type": "string"
+ "$ref": "HeaderEntry"
}
+ },
+ {
+ "name": "binaryResponseHeaders",
+ "description": "Alternative way of specifying response headers as a \\0-separated\nseries of name: value pairs. Prefer the above method unless you\nneed to represent some non-UTF8 values that can't be transmitted\nover the protocol as text. (Encoded as a base64 string when passed over JSON)",
+ "optional": true,
+ "type": "string"
}
]
},
{
- "name": "disable",
- "description": "Disables compositing tree inspection."
- },
- {
- "name": "enable",
- "description": "Enables compositing tree inspection."
- },
- {
- "name": "loadSnapshot",
- "description": "Returns the snapshot identifier.",
+ "name": "getResponseBody",
+ "description": "Causes the body of the response to be received from the server and\nreturned as a single string. May only be issued for a request that\nis paused in the Response stage and is mutually exclusive with\ntakeResponseBodyForInterceptionAsStream. Calling other methods that\naffect the request or disabling fetch domain before body is received\nresults in an undefined behavior.\nNote that the response body is not available for redirects. Requests\npaused in the _redirect received_ state may be differentiated by\n`responseCode` and presence of `location` response header, see\ncomments to `requestPaused` for details.",
"parameters": [
{
- "name": "tiles",
- "description": "An array of tiles composing the snapshot.",
- "type": "array",
- "items": {
- "$ref": "PictureTile"
- }
+ "name": "requestId",
+ "description": "Identifier for the intercepted request to get body for.",
+ "$ref": "RequestId"
}
],
"returns": [
{
- "name": "snapshotId",
- "description": "The id of the snapshot.",
- "$ref": "SnapshotId"
+ "name": "body",
+ "description": "Response body.",
+ "type": "string"
+ },
+ {
+ "name": "base64Encoded",
+ "description": "True, if content was sent as base64.",
+ "type": "boolean"
}
]
},
{
- "name": "makeSnapshot",
- "description": "Returns the layer snapshot identifier.",
+ "name": "takeResponseBodyAsStream",
+ "description": "Returns a handle to the stream representing the response body.\nThe request must be paused in the HeadersReceived stage.\nNote that after this command the request can't be continued\nas is -- client either needs to cancel it or to provide the\nresponse body.\nThe stream only supports sequential read, IO.read will fail if the position\nis specified.\nThis method is mutually exclusive with getResponseBody.\nCalling other methods that affect the request or disabling fetch\ndomain before body is received results in an undefined behavior.",
"parameters": [
{
- "name": "layerId",
- "description": "The id of the layer.",
- "$ref": "LayerId"
+ "name": "requestId",
+ "$ref": "RequestId"
}
],
"returns": [
{
- "name": "snapshotId",
- "description": "The id of the layer snapshot.",
- "$ref": "SnapshotId"
+ "name": "stream",
+ "$ref": "IO.StreamHandle"
}
]
- },
+ }
+ ],
+ "events": [
{
- "name": "profileSnapshot",
+ "name": "requestPaused",
+ "description": "Issued when the domain is enabled and the request URL matches the\nspecified filter. The request is paused until the client responds\nwith one of continueRequest, failRequest or fulfillRequest.\nThe stage of the request can be determined by presence of responseErrorReason\nand responseStatusCode -- the request is at the response stage if either\nof these fields is present and in the request stage otherwise.\nRedirect responses and subsequent requests are reported similarly to regular\nresponses and requests. Redirect responses may be distinguished by the value\nof `responseStatusCode` (which is one of 301, 302, 303, 307, 308) along with\npresence of the `location` header. Requests resulting from a redirect will\nhave `redirectedRequestId` field set.",
"parameters": [
{
- "name": "snapshotId",
- "description": "The id of the layer snapshot.",
- "$ref": "SnapshotId"
+ "name": "requestId",
+ "description": "Each request the page makes will have a unique id.",
+ "$ref": "RequestId"
},
{
- "name": "minRepeatCount",
- "description": "The maximum number of times to replay the snapshot (1, if not specified).",
- "optional": true,
- "type": "integer"
+ "name": "request",
+ "description": "The details of the request.",
+ "$ref": "Network.Request"
},
{
- "name": "minDuration",
- "description": "The minimum duration (in seconds) to replay the snapshot.",
- "optional": true,
- "type": "number"
+ "name": "frameId",
+ "description": "The id of the frame that initiated the request.",
+ "$ref": "Page.FrameId"
},
{
- "name": "clipRect",
- "description": "The clip rectangle to apply when replaying the snapshot.",
- "optional": true,
- "$ref": "DOM.Rect"
- }
- ],
- "returns": [
- {
- "name": "timings",
- "description": "The array of paint profiles, one per run.",
- "type": "array",
- "items": {
- "$ref": "PaintProfile"
- }
- }
- ]
- },
- {
- "name": "releaseSnapshot",
- "description": "Releases layer snapshot captured by the back-end.",
- "parameters": [
- {
- "name": "snapshotId",
- "description": "The id of the layer snapshot.",
- "$ref": "SnapshotId"
- }
- ]
- },
- {
- "name": "replaySnapshot",
- "description": "Replays the layer snapshot and returns the resulting bitmap.",
- "parameters": [
- {
- "name": "snapshotId",
- "description": "The id of the layer snapshot.",
- "$ref": "SnapshotId"
+ "name": "resourceType",
+ "description": "How the requested resource will be used.",
+ "$ref": "Network.ResourceType"
},
{
- "name": "fromStep",
- "description": "The first step to replay from (replay from the very start if not specified).",
+ "name": "responseErrorReason",
+ "description": "Response error if intercepted at response stage.",
"optional": true,
- "type": "integer"
+ "$ref": "Network.ErrorReason"
},
{
- "name": "toStep",
- "description": "The last step to replay to (replay till the end if not specified).",
+ "name": "responseStatusCode",
+ "description": "Response code if intercepted at response stage.",
"optional": true,
"type": "integer"
},
{
- "name": "scale",
- "description": "The scale to apply while replaying (defaults to 1).",
+ "name": "responseStatusText",
+ "description": "Response status text if intercepted at response stage.",
"optional": true,
- "type": "number"
- }
- ],
- "returns": [
- {
- "name": "dataURL",
- "description": "A data: URL for resulting image.",
"type": "string"
- }
- ]
- },
- {
- "name": "snapshotCommandLog",
- "description": "Replays the layer snapshot and returns canvas log.",
- "parameters": [
- {
- "name": "snapshotId",
- "description": "The id of the layer snapshot.",
- "$ref": "SnapshotId"
- }
- ],
- "returns": [
+ },
{
- "name": "commandLog",
- "description": "The array of canvas function calls.",
+ "name": "responseHeaders",
+ "description": "Response headers if intercepted at the response stage.",
+ "optional": true,
"type": "array",
"items": {
- "type": "object"
+ "$ref": "HeaderEntry"
}
- }
- ]
- }
- ],
- "events": [
- {
- "name": "layerPainted",
- "parameters": [
+ },
{
- "name": "layerId",
- "description": "The id of the painted layer.",
- "$ref": "LayerId"
+ "name": "networkId",
+ "description": "If the intercepted request had a corresponding Network.requestWillBeSent event fired for it,\nthen this networkId will be the same as the requestId present in the requestWillBeSent event.",
+ "optional": true,
+ "$ref": "Network.RequestId"
},
{
- "name": "clip",
- "description": "Clip rectangle.",
- "$ref": "DOM.Rect"
+ "name": "redirectedRequestId",
+ "description": "If the request is due to a redirect response from the server, the id of the request that\nhas caused the redirect.",
+ "experimental": true,
+ "optional": true,
+ "$ref": "RequestId"
}
]
},
{
- "name": "layerTreeDidChange",
+ "name": "authRequired",
+ "description": "Issued when the domain is enabled with handleAuthRequests set to true.\nThe request is paused until client responds with continueWithAuth.",
"parameters": [
{
- "name": "layers",
- "description": "Layer tree, absent if not in the compositing mode.",
- "optional": true,
- "type": "array",
- "items": {
- "$ref": "Layer"
- }
+ "name": "requestId",
+ "description": "Each request the page makes will have a unique id.",
+ "$ref": "RequestId"
+ },
+ {
+ "name": "request",
+ "description": "The details of the request.",
+ "$ref": "Network.Request"
+ },
+ {
+ "name": "frameId",
+ "description": "The id of the frame that initiated the request.",
+ "$ref": "Page.FrameId"
+ },
+ {
+ "name": "resourceType",
+ "description": "How the requested resource will be used.",
+ "$ref": "Network.ResourceType"
+ },
+ {
+ "name": "authChallenge",
+ "description": "Details of the Authorization Challenge encountered.\nIf this is set, client should respond with continueRequest that\ncontains AuthChallengeResponse.",
+ "$ref": "AuthChallenge"
}
]
}
]
},
{
- "domain": "Log",
- "description": "Provides access to log entries.",
+ "domain": "FileSystem",
+ "experimental": true,
"dependencies": [
- "Runtime",
- "Network"
+ "Network",
+ "Storage"
],
"types": [
{
- "id": "LogEntry",
- "description": "Log entry.",
+ "id": "File",
"type": "object",
"properties": [
{
- "name": "source",
- "description": "Log entry source.",
- "type": "string",
- "enum": [
- "xml",
- "javascript",
- "network",
- "storage",
- "appcache",
- "rendering",
- "security",
- "deprecation",
- "worker",
- "violation",
- "intervention",
- "recommendation",
- "other"
- ]
- },
- {
- "name": "level",
- "description": "Log entry severity.",
- "type": "string",
- "enum": [
- "verbose",
- "info",
- "warning",
- "error"
- ]
- },
- {
- "name": "text",
- "description": "Logged text.",
+ "name": "name",
"type": "string"
},
{
- "name": "category",
- "optional": true,
- "type": "string",
- "enum": [
- "cors"
- ]
+ "name": "lastModified",
+ "description": "Timestamp",
+ "$ref": "Network.TimeSinceEpoch"
},
{
- "name": "timestamp",
- "description": "Timestamp when this entry was added.",
- "$ref": "Runtime.Timestamp"
+ "name": "size",
+ "description": "Size in bytes",
+ "type": "number"
},
{
- "name": "url",
- "description": "URL of the resource if known.",
- "optional": true,
+ "name": "type",
"type": "string"
- },
- {
- "name": "lineNumber",
- "description": "Line number in the resource.",
- "optional": true,
- "type": "integer"
- },
- {
- "name": "stackTrace",
- "description": "JavaScript stack trace.",
- "optional": true,
- "$ref": "Runtime.StackTrace"
- },
+ }
+ ]
+ },
+ {
+ "id": "Directory",
+ "type": "object",
+ "properties": [
{
- "name": "networkRequestId",
- "description": "Identifier of the network request associated with this entry.",
- "optional": true,
- "$ref": "Network.RequestId"
+ "name": "name",
+ "type": "string"
},
{
- "name": "workerId",
- "description": "Identifier of the worker associated with this entry.",
- "optional": true,
- "type": "string"
+ "name": "nestedDirectories",
+ "type": "array",
+ "items": {
+ "type": "string"
+ }
},
{
- "name": "args",
- "description": "Call arguments.",
- "optional": true,
+ "name": "nestedFiles",
+ "description": "Files that are directly nested under this directory.",
"type": "array",
"items": {
- "$ref": "Runtime.RemoteObject"
+ "$ref": "File"
}
}
]
},
{
- "id": "ViolationSetting",
- "description": "Violation configuration setting.",
+ "id": "BucketFileSystemLocator",
"type": "object",
"properties": [
{
- "name": "name",
- "description": "Violation type.",
- "type": "string",
- "enum": [
- "longTask",
- "longLayout",
- "blockedEvent",
- "blockedParser",
- "discouragedAPIUse",
- "handler",
- "recurringHandler"
- ]
+ "name": "storageKey",
+ "description": "Storage key",
+ "$ref": "Storage.SerializedStorageKey"
},
{
- "name": "threshold",
- "description": "Time threshold to trigger upon.",
- "type": "number"
- }
- ]
- }
- ],
- "commands": [
- {
- "name": "clear",
- "description": "Clears the log."
- },
- {
- "name": "disable",
- "description": "Disables log domain, prevents further log entries from being reported to the client."
- },
- {
- "name": "enable",
- "description": "Enables log domain, sends the entries collected so far to the client by means of the\n`entryAdded` notification."
- },
- {
- "name": "startViolationsReport",
- "description": "start violation reporting.",
- "parameters": [
+ "name": "bucketName",
+ "description": "Bucket name. Not passing a `bucketName` will retrieve the default Bucket. (https://developer.mozilla.org/en-US/docs/Web/API/Storage_API#storage_buckets)",
+ "optional": true,
+ "type": "string"
+ },
{
- "name": "config",
- "description": "Configuration for violations.",
+ "name": "pathComponents",
+ "description": "Path to the directory using each path component as an array item.",
"type": "array",
"items": {
- "$ref": "ViolationSetting"
+ "type": "string"
}
}
]
- },
- {
- "name": "stopViolationsReport",
- "description": "Stop violation reporting."
}
],
- "events": [
+ "commands": [
{
- "name": "entryAdded",
- "description": "Issued when new message was logged.",
+ "name": "getDirectory",
"parameters": [
{
- "name": "entry",
- "description": "The entry.",
- "$ref": "LogEntry"
+ "name": "bucketFileSystemLocator",
+ "$ref": "BucketFileSystemLocator"
+ }
+ ],
+ "returns": [
+ {
+ "name": "directory",
+ "description": "Returns the directory object at the path.",
+ "$ref": "Directory"
}
]
}
]
},
{
- "domain": "Memory",
+ "domain": "HeadlessExperimental",
+ "description": "This domain provides experimental commands only supported in headless mode.",
"experimental": true,
+ "dependencies": [
+ "Page",
+ "Runtime"
+ ],
"types": [
{
- "id": "PressureLevel",
- "description": "Memory pressure level.",
- "type": "string",
- "enum": [
- "moderate",
- "critical"
- ]
- },
- {
- "id": "SamplingProfileNode",
- "description": "Heap profile sample.",
+ "id": "ScreenshotParams",
+ "description": "Encoding options for a screenshot.",
"type": "object",
"properties": [
{
- "name": "size",
- "description": "Size of the sampled allocation.",
- "type": "number"
+ "name": "format",
+ "description": "Image compression format (defaults to png).",
+ "optional": true,
+ "type": "string",
+ "enum": [
+ "jpeg",
+ "png",
+ "webp"
+ ]
},
{
- "name": "total",
- "description": "Total bytes attributed to this sample.",
- "type": "number"
+ "name": "quality",
+ "description": "Compression quality from range [0..100] (jpeg and webp only).",
+ "optional": true,
+ "type": "integer"
},
{
- "name": "stack",
- "description": "Execution stack at the point of allocation.",
- "type": "array",
- "items": {
- "type": "string"
- }
+ "name": "optimizeForSpeed",
+ "description": "Optimize image encoding for speed, not for resulting size (defaults to false)",
+ "optional": true,
+ "type": "boolean"
}
]
- },
+ }
+ ],
+ "commands": [
{
- "id": "SamplingProfile",
- "description": "Array of heap profile samples.",
- "type": "object",
- "properties": [
+ "name": "beginFrame",
+ "description": "Sends a BeginFrame to the target and returns when the frame was completed. Optionally captures a\nscreenshot from the resulting frame. Requires that the target was created with enabled\nBeginFrameControl. Designed for use with --run-all-compositor-stages-before-draw, see also\nhttps://goo.gle/chrome-headless-rendering for more background.",
+ "parameters": [
{
- "name": "samples",
- "type": "array",
- "items": {
- "$ref": "SamplingProfileNode"
- }
+ "name": "frameTimeTicks",
+ "description": "Timestamp of this BeginFrame in Renderer TimeTicks (milliseconds of uptime). If not set,\nthe current time will be used.",
+ "optional": true,
+ "type": "number"
},
{
- "name": "modules",
- "type": "array",
- "items": {
- "$ref": "Module"
- }
- }
- ]
- },
- {
- "id": "Module",
- "description": "Executable module information",
- "type": "object",
- "properties": [
+ "name": "interval",
+ "description": "The interval between BeginFrames that is reported to the compositor, in milliseconds.\nDefaults to a 60 frames/second interval, i.e. about 16.666 milliseconds.",
+ "optional": true,
+ "type": "number"
+ },
{
- "name": "name",
- "description": "Name of the module.",
- "type": "string"
+ "name": "noDisplayUpdates",
+ "description": "Whether updates should not be committed and drawn onto the display. False by default. If\ntrue, only side effects of the BeginFrame will be run, such as layout and animations, but\nany visual updates may not be visible on the display or in screenshots.",
+ "optional": true,
+ "type": "boolean"
},
{
- "name": "uuid",
- "description": "UUID of the module.",
- "type": "string"
+ "name": "screenshot",
+ "description": "If set, a screenshot of the frame will be captured and returned in the response. Otherwise,\nno screenshot will be captured. Note that capturing a screenshot can fail, for example,\nduring renderer initialization. In such a case, no screenshot data will be returned.",
+ "optional": true,
+ "$ref": "ScreenshotParams"
+ }
+ ],
+ "returns": [
+ {
+ "name": "hasDamage",
+ "description": "Whether the BeginFrame resulted in damage and, thus, a new frame was committed to the\ndisplay. Reported for diagnostic uses, may be removed in the future.",
+ "type": "boolean"
},
{
- "name": "baseAddress",
- "description": "Base address where the module is loaded into memory. Encoded as a decimal\nor hexadecimal (0x prefixed) string.",
+ "name": "screenshotData",
+ "description": "Base64-encoded image data of the screenshot, if one was requested and successfully taken. (Encoded as a base64 string when passed over JSON)",
+ "optional": true,
"type": "string"
- },
+ }
+ ]
+ },
+ {
+ "name": "disable",
+ "description": "Disables headless events for the target.",
+ "deprecated": true
+ },
+ {
+ "name": "enable",
+ "description": "Enables headless events for the target.",
+ "deprecated": true
+ }
+ ]
+ },
+ {
+ "domain": "IO",
+ "description": "Input/Output operations for streams produced by DevTools.",
+ "types": [
+ {
+ "id": "StreamHandle",
+ "description": "This is either obtained from another method or specified as `blob:` where\n`` is an UUID of a Blob.",
+ "type": "string"
+ }
+ ],
+ "commands": [
+ {
+ "name": "close",
+ "description": "Close the stream, discard any temporary backing storage.",
+ "parameters": [
{
- "name": "size",
- "description": "Size of the module in bytes.",
- "type": "number"
+ "name": "handle",
+ "description": "Handle of the stream to close.",
+ "$ref": "StreamHandle"
}
]
},
{
- "id": "DOMCounter",
- "description": "DOM object counter data.",
- "type": "object",
- "properties": [
+ "name": "read",
+ "description": "Read a chunk of the stream",
+ "parameters": [
{
- "name": "name",
- "description": "Object name. Note: object names should be presumed volatile and clients should not expect\nthe returned names to be consistent across runs.",
- "type": "string"
+ "name": "handle",
+ "description": "Handle of the stream to read.",
+ "$ref": "StreamHandle"
},
{
- "name": "count",
- "description": "Object count.",
+ "name": "offset",
+ "description": "Seek to the specified offset before reading (if not specified, proceed with offset\nfollowing the last read). Some types of streams may only support sequential reads.",
+ "optional": true,
+ "type": "integer"
+ },
+ {
+ "name": "size",
+ "description": "Maximum number of bytes to read (left upon the agent discretion if not specified).",
+ "optional": true,
"type": "integer"
}
- ]
- }
- ],
- "commands": [
- {
- "name": "getDOMCounters",
- "description": "Retruns current DOM object counters.",
+ ],
"returns": [
{
- "name": "documents",
- "type": "integer"
+ "name": "base64Encoded",
+ "description": "Set if the data is base64-encoded",
+ "optional": true,
+ "type": "boolean"
},
{
- "name": "nodes",
- "type": "integer"
+ "name": "data",
+ "description": "Data that were read.",
+ "type": "string"
},
{
- "name": "jsEventListeners",
- "type": "integer"
+ "name": "eof",
+ "description": "Set if the end-of-file condition occurred while reading.",
+ "type": "boolean"
}
]
},
{
- "name": "getDOMCountersForLeakDetection",
- "description": "Retruns DOM object counters after preparing renderer for leak detection.",
+ "name": "resolveBlob",
+ "description": "Return UUID of Blob object specified by a remote object id.",
+ "parameters": [
+ {
+ "name": "objectId",
+ "description": "Object id of a Blob object wrapper.",
+ "$ref": "Runtime.RemoteObjectId"
+ }
+ ],
"returns": [
{
- "name": "counters",
- "description": "DOM object counters.",
+ "name": "uuid",
+ "description": "UUID of the specified Blob.",
+ "type": "string"
+ }
+ ]
+ }
+ ]
+ },
+ {
+ "domain": "IndexedDB",
+ "experimental": true,
+ "dependencies": [
+ "Runtime",
+ "Storage"
+ ],
+ "types": [
+ {
+ "id": "DatabaseWithObjectStores",
+ "description": "Database with an array of object stores.",
+ "type": "object",
+ "properties": [
+ {
+ "name": "name",
+ "description": "Database name.",
+ "type": "string"
+ },
+ {
+ "name": "version",
+ "description": "Database version (type is not 'integer', as the standard\nrequires the version number to be 'unsigned long long')",
+ "type": "number"
+ },
+ {
+ "name": "objectStores",
+ "description": "Object stores in this database.",
"type": "array",
"items": {
- "$ref": "DOMCounter"
+ "$ref": "ObjectStore"
}
}
]
},
{
- "name": "prepareForLeakDetection",
- "description": "Prepares for leak detection by terminating workers, stopping spellcheckers,\ndropping non-essential internal caches, running garbage collections, etc."
- },
- {
- "name": "forciblyPurgeJavaScriptMemory",
- "description": "Simulate OomIntervention by purging V8 memory."
- },
- {
- "name": "setPressureNotificationsSuppressed",
- "description": "Enable/disable suppressing memory pressure notifications in all processes.",
- "parameters": [
+ "id": "ObjectStore",
+ "description": "Object store.",
+ "type": "object",
+ "properties": [
{
- "name": "suppressed",
- "description": "If true, memory pressure notifications will be suppressed.",
+ "name": "name",
+ "description": "Object store name.",
+ "type": "string"
+ },
+ {
+ "name": "keyPath",
+ "description": "Object store key path.",
+ "$ref": "KeyPath"
+ },
+ {
+ "name": "autoIncrement",
+ "description": "If true, object store has auto increment flag set.",
"type": "boolean"
+ },
+ {
+ "name": "indexes",
+ "description": "Indexes in this object store.",
+ "type": "array",
+ "items": {
+ "$ref": "ObjectStoreIndex"
+ }
}
]
},
{
- "name": "simulatePressureNotification",
- "description": "Simulate a memory pressure notification in all processes.",
- "parameters": [
+ "id": "ObjectStoreIndex",
+ "description": "Object store index.",
+ "type": "object",
+ "properties": [
{
- "name": "level",
- "description": "Memory pressure level of the notification.",
- "$ref": "PressureLevel"
+ "name": "name",
+ "description": "Index name.",
+ "type": "string"
+ },
+ {
+ "name": "keyPath",
+ "description": "Index key path.",
+ "$ref": "KeyPath"
+ },
+ {
+ "name": "unique",
+ "description": "If true, index is unique.",
+ "type": "boolean"
+ },
+ {
+ "name": "multiEntry",
+ "description": "If true, index allows multiple entries for a key.",
+ "type": "boolean"
}
]
},
{
- "name": "startSampling",
- "description": "Start collecting native memory profile.",
- "parameters": [
+ "id": "Key",
+ "description": "Key.",
+ "type": "object",
+ "properties": [
{
- "name": "samplingInterval",
- "description": "Average number of bytes between samples.",
+ "name": "type",
+ "description": "Key type.",
+ "type": "string",
+ "enum": [
+ "number",
+ "string",
+ "date",
+ "array"
+ ]
+ },
+ {
+ "name": "number",
+ "description": "Number value.",
"optional": true,
- "type": "integer"
+ "type": "number"
},
{
- "name": "suppressRandomness",
- "description": "Do not randomize intervals between samples.",
+ "name": "string",
+ "description": "String value.",
"optional": true,
- "type": "boolean"
+ "type": "string"
+ },
+ {
+ "name": "date",
+ "description": "Date value.",
+ "optional": true,
+ "type": "number"
+ },
+ {
+ "name": "array",
+ "description": "Array value.",
+ "optional": true,
+ "type": "array",
+ "items": {
+ "$ref": "Key"
+ }
}
]
},
{
- "name": "stopSampling",
- "description": "Stop collecting native memory profile."
- },
- {
- "name": "getAllTimeSamplingProfile",
- "description": "Retrieve native memory allocations profile\ncollected since renderer process startup.",
- "returns": [
+ "id": "KeyRange",
+ "description": "Key range.",
+ "type": "object",
+ "properties": [
{
- "name": "profile",
- "$ref": "SamplingProfile"
+ "name": "lower",
+ "description": "Lower bound.",
+ "optional": true,
+ "$ref": "Key"
+ },
+ {
+ "name": "upper",
+ "description": "Upper bound.",
+ "optional": true,
+ "$ref": "Key"
+ },
+ {
+ "name": "lowerOpen",
+ "description": "If true lower bound is open.",
+ "type": "boolean"
+ },
+ {
+ "name": "upperOpen",
+ "description": "If true upper bound is open.",
+ "type": "boolean"
}
]
},
{
- "name": "getBrowserSamplingProfile",
- "description": "Retrieve native memory allocations profile\ncollected since browser process startup.",
- "returns": [
+ "id": "DataEntry",
+ "description": "Data entry.",
+ "type": "object",
+ "properties": [
{
- "name": "profile",
- "$ref": "SamplingProfile"
+ "name": "key",
+ "description": "Key object.",
+ "$ref": "Runtime.RemoteObject"
+ },
+ {
+ "name": "primaryKey",
+ "description": "Primary key object.",
+ "$ref": "Runtime.RemoteObject"
+ },
+ {
+ "name": "value",
+ "description": "Value object.",
+ "$ref": "Runtime.RemoteObject"
}
]
},
{
- "name": "getSamplingProfile",
- "description": "Retrieve native memory allocations profile collected since last\n`startSampling` call.",
- "returns": [
+ "id": "KeyPath",
+ "description": "Key path.",
+ "type": "object",
+ "properties": [
{
- "name": "profile",
- "$ref": "SamplingProfile"
+ "name": "type",
+ "description": "Key path type.",
+ "type": "string",
+ "enum": [
+ "null",
+ "string",
+ "array"
+ ]
+ },
+ {
+ "name": "string",
+ "description": "String value.",
+ "optional": true,
+ "type": "string"
+ },
+ {
+ "name": "array",
+ "description": "Array value.",
+ "optional": true,
+ "type": "array",
+ "items": {
+ "type": "string"
+ }
}
]
}
- ]
- },
- {
- "domain": "Network",
- "description": "Network domain allows tracking network activities of the page. It exposes information about http,\nfile, data and other requests and responses, their headers, bodies, timing, etc.",
- "dependencies": [
- "Debugger",
- "Runtime",
- "Security"
],
- "types": [
+ "commands": [
{
- "id": "ResourceType",
+ "name": "clearObjectStore",
+ "description": "Clears all entries from an object store.",
+ "parameters": [
+ {
+ "name": "securityOrigin",
+ "description": "At least and at most one of securityOrigin, storageKey, or storageBucket must be specified.\nSecurity origin.",
+ "optional": true,
+ "type": "string"
+ },
+ {
+ "name": "storageKey",
+ "description": "Storage key.",
+ "optional": true,
+ "type": "string"
+ },
+ {
+ "name": "storageBucket",
+ "description": "Storage bucket. If not specified, it uses the default bucket.",
+ "optional": true,
+ "$ref": "Storage.StorageBucket"
+ },
+ {
+ "name": "databaseName",
+ "description": "Database name.",
+ "type": "string"
+ },
+ {
+ "name": "objectStoreName",
+ "description": "Object store name.",
+ "type": "string"
+ }
+ ]
+ },
+ {
+ "name": "deleteDatabase",
+ "description": "Deletes a database.",
+ "parameters": [
+ {
+ "name": "securityOrigin",
+ "description": "At least and at most one of securityOrigin, storageKey, or storageBucket must be specified.\nSecurity origin.",
+ "optional": true,
+ "type": "string"
+ },
+ {
+ "name": "storageKey",
+ "description": "Storage key.",
+ "optional": true,
+ "type": "string"
+ },
+ {
+ "name": "storageBucket",
+ "description": "Storage bucket. If not specified, it uses the default bucket.",
+ "optional": true,
+ "$ref": "Storage.StorageBucket"
+ },
+ {
+ "name": "databaseName",
+ "description": "Database name.",
+ "type": "string"
+ }
+ ]
+ },
+ {
+ "name": "deleteObjectStoreEntries",
+ "description": "Delete a range of entries from an object store",
+ "parameters": [
+ {
+ "name": "securityOrigin",
+ "description": "At least and at most one of securityOrigin, storageKey, or storageBucket must be specified.\nSecurity origin.",
+ "optional": true,
+ "type": "string"
+ },
+ {
+ "name": "storageKey",
+ "description": "Storage key.",
+ "optional": true,
+ "type": "string"
+ },
+ {
+ "name": "storageBucket",
+ "description": "Storage bucket. If not specified, it uses the default bucket.",
+ "optional": true,
+ "$ref": "Storage.StorageBucket"
+ },
+ {
+ "name": "databaseName",
+ "type": "string"
+ },
+ {
+ "name": "objectStoreName",
+ "type": "string"
+ },
+ {
+ "name": "keyRange",
+ "description": "Range of entry keys to delete",
+ "$ref": "KeyRange"
+ }
+ ]
+ },
+ {
+ "name": "disable",
+ "description": "Disables events from backend."
+ },
+ {
+ "name": "enable",
+ "description": "Enables events from backend."
+ },
+ {
+ "name": "requestData",
+ "description": "Requests data from object store or index.",
+ "parameters": [
+ {
+ "name": "securityOrigin",
+ "description": "At least and at most one of securityOrigin, storageKey, or storageBucket must be specified.\nSecurity origin.",
+ "optional": true,
+ "type": "string"
+ },
+ {
+ "name": "storageKey",
+ "description": "Storage key.",
+ "optional": true,
+ "type": "string"
+ },
+ {
+ "name": "storageBucket",
+ "description": "Storage bucket. If not specified, it uses the default bucket.",
+ "optional": true,
+ "$ref": "Storage.StorageBucket"
+ },
+ {
+ "name": "databaseName",
+ "description": "Database name.",
+ "type": "string"
+ },
+ {
+ "name": "objectStoreName",
+ "description": "Object store name.",
+ "type": "string"
+ },
+ {
+ "name": "indexName",
+ "description": "Index name. If not specified, it performs an object store data request.",
+ "optional": true,
+ "type": "string"
+ },
+ {
+ "name": "skipCount",
+ "description": "Number of records to skip.",
+ "type": "integer"
+ },
+ {
+ "name": "pageSize",
+ "description": "Number of records to fetch.",
+ "type": "integer"
+ },
+ {
+ "name": "keyRange",
+ "description": "Key range.",
+ "optional": true,
+ "$ref": "KeyRange"
+ }
+ ],
+ "returns": [
+ {
+ "name": "objectStoreDataEntries",
+ "description": "Array of object store data entries.",
+ "type": "array",
+ "items": {
+ "$ref": "DataEntry"
+ }
+ },
+ {
+ "name": "hasMore",
+ "description": "If true, there are more entries to fetch in the given range.",
+ "type": "boolean"
+ }
+ ]
+ },
+ {
+ "name": "getMetadata",
+ "description": "Gets metadata of an object store.",
+ "parameters": [
+ {
+ "name": "securityOrigin",
+ "description": "At least and at most one of securityOrigin, storageKey, or storageBucket must be specified.\nSecurity origin.",
+ "optional": true,
+ "type": "string"
+ },
+ {
+ "name": "storageKey",
+ "description": "Storage key.",
+ "optional": true,
+ "type": "string"
+ },
+ {
+ "name": "storageBucket",
+ "description": "Storage bucket. If not specified, it uses the default bucket.",
+ "optional": true,
+ "$ref": "Storage.StorageBucket"
+ },
+ {
+ "name": "databaseName",
+ "description": "Database name.",
+ "type": "string"
+ },
+ {
+ "name": "objectStoreName",
+ "description": "Object store name.",
+ "type": "string"
+ }
+ ],
+ "returns": [
+ {
+ "name": "entriesCount",
+ "description": "the entries count",
+ "type": "number"
+ },
+ {
+ "name": "keyGeneratorValue",
+ "description": "the current value of key generator, to become the next inserted\nkey into the object store. Valid if objectStore.autoIncrement\nis true.",
+ "type": "number"
+ }
+ ]
+ },
+ {
+ "name": "requestDatabase",
+ "description": "Requests database with given name in given frame.",
+ "parameters": [
+ {
+ "name": "securityOrigin",
+ "description": "At least and at most one of securityOrigin, storageKey, or storageBucket must be specified.\nSecurity origin.",
+ "optional": true,
+ "type": "string"
+ },
+ {
+ "name": "storageKey",
+ "description": "Storage key.",
+ "optional": true,
+ "type": "string"
+ },
+ {
+ "name": "storageBucket",
+ "description": "Storage bucket. If not specified, it uses the default bucket.",
+ "optional": true,
+ "$ref": "Storage.StorageBucket"
+ },
+ {
+ "name": "databaseName",
+ "description": "Database name.",
+ "type": "string"
+ }
+ ],
+ "returns": [
+ {
+ "name": "databaseWithObjectStores",
+ "description": "Database with an array of object stores.",
+ "$ref": "DatabaseWithObjectStores"
+ }
+ ]
+ },
+ {
+ "name": "requestDatabaseNames",
+ "description": "Requests database names for given security origin.",
+ "parameters": [
+ {
+ "name": "securityOrigin",
+ "description": "At least and at most one of securityOrigin, storageKey, or storageBucket must be specified.\nSecurity origin.",
+ "optional": true,
+ "type": "string"
+ },
+ {
+ "name": "storageKey",
+ "description": "Storage key.",
+ "optional": true,
+ "type": "string"
+ },
+ {
+ "name": "storageBucket",
+ "description": "Storage bucket. If not specified, it uses the default bucket.",
+ "optional": true,
+ "$ref": "Storage.StorageBucket"
+ }
+ ],
+ "returns": [
+ {
+ "name": "databaseNames",
+ "description": "Database names for origin.",
+ "type": "array",
+ "items": {
+ "type": "string"
+ }
+ }
+ ]
+ }
+ ]
+ },
+ {
+ "domain": "Input",
+ "types": [
+ {
+ "id": "TouchPoint",
+ "type": "object",
+ "properties": [
+ {
+ "name": "x",
+ "description": "X coordinate of the event relative to the main frame's viewport in CSS pixels.",
+ "type": "number"
+ },
+ {
+ "name": "y",
+ "description": "Y coordinate of the event relative to the main frame's viewport in CSS pixels. 0 refers to\nthe top of the viewport and Y increases as it proceeds towards the bottom of the viewport.",
+ "type": "number"
+ },
+ {
+ "name": "radiusX",
+ "description": "X radius of the touch area (default: 1.0).",
+ "optional": true,
+ "type": "number"
+ },
+ {
+ "name": "radiusY",
+ "description": "Y radius of the touch area (default: 1.0).",
+ "optional": true,
+ "type": "number"
+ },
+ {
+ "name": "rotationAngle",
+ "description": "Rotation angle (default: 0.0).",
+ "optional": true,
+ "type": "number"
+ },
+ {
+ "name": "force",
+ "description": "Force (default: 1.0).",
+ "optional": true,
+ "type": "number"
+ },
+ {
+ "name": "tangentialPressure",
+ "description": "The normalized tangential pressure, which has a range of [-1,1] (default: 0).",
+ "experimental": true,
+ "optional": true,
+ "type": "number"
+ },
+ {
+ "name": "tiltX",
+ "description": "The plane angle between the Y-Z plane and the plane containing both the stylus axis and the Y axis, in degrees of the range [-90,90], a positive tiltX is to the right (default: 0)",
+ "optional": true,
+ "type": "number"
+ },
+ {
+ "name": "tiltY",
+ "description": "The plane angle between the X-Z plane and the plane containing both the stylus axis and the X axis, in degrees of the range [-90,90], a positive tiltY is towards the user (default: 0).",
+ "optional": true,
+ "type": "number"
+ },
+ {
+ "name": "twist",
+ "description": "The clockwise rotation of a pen stylus around its own major axis, in degrees in the range [0,359] (default: 0).",
+ "experimental": true,
+ "optional": true,
+ "type": "integer"
+ },
+ {
+ "name": "id",
+ "description": "Identifier used to track touch sources between events, must be unique within an event.",
+ "optional": true,
+ "type": "number"
+ }
+ ]
+ },
+ {
+ "id": "GestureSourceType",
+ "experimental": true,
+ "type": "string",
+ "enum": [
+ "default",
+ "touch",
+ "mouse"
+ ]
+ },
+ {
+ "id": "MouseButton",
+ "type": "string",
+ "enum": [
+ "none",
+ "left",
+ "middle",
+ "right",
+ "back",
+ "forward"
+ ]
+ },
+ {
+ "id": "TimeSinceEpoch",
+ "description": "UTC time in seconds, counted from January 1, 1970.",
+ "type": "number"
+ },
+ {
+ "id": "DragDataItem",
+ "experimental": true,
+ "type": "object",
+ "properties": [
+ {
+ "name": "mimeType",
+ "description": "Mime type of the dragged data.",
+ "type": "string"
+ },
+ {
+ "name": "data",
+ "description": "Depending of the value of `mimeType`, it contains the dragged link,\ntext, HTML markup or any other data.",
+ "type": "string"
+ },
+ {
+ "name": "title",
+ "description": "Title associated with a link. Only valid when `mimeType` == \"text/uri-list\".",
+ "optional": true,
+ "type": "string"
+ },
+ {
+ "name": "baseURL",
+ "description": "Stores the base URL for the contained markup. Only valid when `mimeType`\n== \"text/html\".",
+ "optional": true,
+ "type": "string"
+ }
+ ]
+ },
+ {
+ "id": "DragData",
+ "experimental": true,
+ "type": "object",
+ "properties": [
+ {
+ "name": "items",
+ "type": "array",
+ "items": {
+ "$ref": "DragDataItem"
+ }
+ },
+ {
+ "name": "files",
+ "description": "List of filenames that should be included when dropping",
+ "optional": true,
+ "type": "array",
+ "items": {
+ "type": "string"
+ }
+ },
+ {
+ "name": "dragOperationsMask",
+ "description": "Bit field representing allowed drag operations. Copy = 1, Link = 2, Move = 16",
+ "type": "integer"
+ }
+ ]
+ }
+ ],
+ "commands": [
+ {
+ "name": "dispatchDragEvent",
+ "description": "Dispatches a drag event into the page.",
+ "experimental": true,
+ "parameters": [
+ {
+ "name": "type",
+ "description": "Type of the drag event.",
+ "type": "string",
+ "enum": [
+ "dragEnter",
+ "dragOver",
+ "drop",
+ "dragCancel"
+ ]
+ },
+ {
+ "name": "x",
+ "description": "X coordinate of the event relative to the main frame's viewport in CSS pixels.",
+ "type": "number"
+ },
+ {
+ "name": "y",
+ "description": "Y coordinate of the event relative to the main frame's viewport in CSS pixels. 0 refers to\nthe top of the viewport and Y increases as it proceeds towards the bottom of the viewport.",
+ "type": "number"
+ },
+ {
+ "name": "data",
+ "$ref": "DragData"
+ },
+ {
+ "name": "modifiers",
+ "description": "Bit field representing pressed modifier keys. Alt=1, Ctrl=2, Meta/Command=4, Shift=8\n(default: 0).",
+ "optional": true,
+ "type": "integer"
+ }
+ ]
+ },
+ {
+ "name": "dispatchKeyEvent",
+ "description": "Dispatches a key event to the page.",
+ "parameters": [
+ {
+ "name": "type",
+ "description": "Type of the key event.",
+ "type": "string",
+ "enum": [
+ "keyDown",
+ "keyUp",
+ "rawKeyDown",
+ "char"
+ ]
+ },
+ {
+ "name": "modifiers",
+ "description": "Bit field representing pressed modifier keys. Alt=1, Ctrl=2, Meta/Command=4, Shift=8\n(default: 0).",
+ "optional": true,
+ "type": "integer"
+ },
+ {
+ "name": "timestamp",
+ "description": "Time at which the event occurred.",
+ "optional": true,
+ "$ref": "TimeSinceEpoch"
+ },
+ {
+ "name": "text",
+ "description": "Text as generated by processing a virtual key code with a keyboard layout. Not needed for\nfor `keyUp` and `rawKeyDown` events (default: \"\")",
+ "optional": true,
+ "type": "string"
+ },
+ {
+ "name": "unmodifiedText",
+ "description": "Text that would have been generated by the keyboard if no modifiers were pressed (except for\nshift). Useful for shortcut (accelerator) key handling (default: \"\").",
+ "optional": true,
+ "type": "string"
+ },
+ {
+ "name": "keyIdentifier",
+ "description": "Unique key identifier (e.g., 'U+0041') (default: \"\").",
+ "optional": true,
+ "type": "string"
+ },
+ {
+ "name": "code",
+ "description": "Unique DOM defined string value for each physical key (e.g., 'KeyA') (default: \"\").",
+ "optional": true,
+ "type": "string"
+ },
+ {
+ "name": "key",
+ "description": "Unique DOM defined string value describing the meaning of the key in the context of active\nmodifiers, keyboard layout, etc (e.g., 'AltGr') (default: \"\").",
+ "optional": true,
+ "type": "string"
+ },
+ {
+ "name": "windowsVirtualKeyCode",
+ "description": "Windows virtual key code (default: 0).",
+ "optional": true,
+ "type": "integer"
+ },
+ {
+ "name": "nativeVirtualKeyCode",
+ "description": "Native virtual key code (default: 0).",
+ "optional": true,
+ "type": "integer"
+ },
+ {
+ "name": "autoRepeat",
+ "description": "Whether the event was generated from auto repeat (default: false).",
+ "optional": true,
+ "type": "boolean"
+ },
+ {
+ "name": "isKeypad",
+ "description": "Whether the event was generated from the keypad (default: false).",
+ "optional": true,
+ "type": "boolean"
+ },
+ {
+ "name": "isSystemKey",
+ "description": "Whether the event was a system key event (default: false).",
+ "optional": true,
+ "type": "boolean"
+ },
+ {
+ "name": "location",
+ "description": "Whether the event was from the left or right side of the keyboard. 1=Left, 2=Right (default:\n0).",
+ "optional": true,
+ "type": "integer"
+ },
+ {
+ "name": "commands",
+ "description": "Editing commands to send with the key event (e.g., 'selectAll') (default: []).\nThese are related to but not equal the command names used in `document.execCommand` and NSStandardKeyBindingResponding.\nSee https://source.chromium.org/chromium/chromium/src/+/main:third_party/blink/renderer/core/editing/commands/editor_command_names.h for valid command names.",
+ "experimental": true,
+ "optional": true,
+ "type": "array",
+ "items": {
+ "type": "string"
+ }
+ }
+ ]
+ },
+ {
+ "name": "insertText",
+ "description": "This method emulates inserting text that doesn't come from a key press,\nfor example an emoji keyboard or an IME.",
+ "experimental": true,
+ "parameters": [
+ {
+ "name": "text",
+ "description": "The text to insert.",
+ "type": "string"
+ }
+ ]
+ },
+ {
+ "name": "imeSetComposition",
+ "description": "This method sets the current candidate text for IME.\nUse imeCommitComposition to commit the final text.\nUse imeSetComposition with empty string as text to cancel composition.",
+ "experimental": true,
+ "parameters": [
+ {
+ "name": "text",
+ "description": "The text to insert",
+ "type": "string"
+ },
+ {
+ "name": "selectionStart",
+ "description": "selection start",
+ "type": "integer"
+ },
+ {
+ "name": "selectionEnd",
+ "description": "selection end",
+ "type": "integer"
+ },
+ {
+ "name": "replacementStart",
+ "description": "replacement start",
+ "optional": true,
+ "type": "integer"
+ },
+ {
+ "name": "replacementEnd",
+ "description": "replacement end",
+ "optional": true,
+ "type": "integer"
+ }
+ ]
+ },
+ {
+ "name": "dispatchMouseEvent",
+ "description": "Dispatches a mouse event to the page.",
+ "parameters": [
+ {
+ "name": "type",
+ "description": "Type of the mouse event.",
+ "type": "string",
+ "enum": [
+ "mousePressed",
+ "mouseReleased",
+ "mouseMoved",
+ "mouseWheel"
+ ]
+ },
+ {
+ "name": "x",
+ "description": "X coordinate of the event relative to the main frame's viewport in CSS pixels.",
+ "type": "number"
+ },
+ {
+ "name": "y",
+ "description": "Y coordinate of the event relative to the main frame's viewport in CSS pixels. 0 refers to\nthe top of the viewport and Y increases as it proceeds towards the bottom of the viewport.",
+ "type": "number"
+ },
+ {
+ "name": "modifiers",
+ "description": "Bit field representing pressed modifier keys. Alt=1, Ctrl=2, Meta/Command=4, Shift=8\n(default: 0).",
+ "optional": true,
+ "type": "integer"
+ },
+ {
+ "name": "timestamp",
+ "description": "Time at which the event occurred.",
+ "optional": true,
+ "$ref": "TimeSinceEpoch"
+ },
+ {
+ "name": "button",
+ "description": "Mouse button (default: \"none\").",
+ "optional": true,
+ "$ref": "MouseButton"
+ },
+ {
+ "name": "buttons",
+ "description": "A number indicating which buttons are pressed on the mouse when a mouse event is triggered.\nLeft=1, Right=2, Middle=4, Back=8, Forward=16, None=0.",
+ "optional": true,
+ "type": "integer"
+ },
+ {
+ "name": "clickCount",
+ "description": "Number of times the mouse button was clicked (default: 0).",
+ "optional": true,
+ "type": "integer"
+ },
+ {
+ "name": "force",
+ "description": "The normalized pressure, which has a range of [0,1] (default: 0).",
+ "experimental": true,
+ "optional": true,
+ "type": "number"
+ },
+ {
+ "name": "tangentialPressure",
+ "description": "The normalized tangential pressure, which has a range of [-1,1] (default: 0).",
+ "experimental": true,
+ "optional": true,
+ "type": "number"
+ },
+ {
+ "name": "tiltX",
+ "description": "The plane angle between the Y-Z plane and the plane containing both the stylus axis and the Y axis, in degrees of the range [-90,90], a positive tiltX is to the right (default: 0).",
+ "optional": true,
+ "type": "number"
+ },
+ {
+ "name": "tiltY",
+ "description": "The plane angle between the X-Z plane and the plane containing both the stylus axis and the X axis, in degrees of the range [-90,90], a positive tiltY is towards the user (default: 0).",
+ "optional": true,
+ "type": "number"
+ },
+ {
+ "name": "twist",
+ "description": "The clockwise rotation of a pen stylus around its own major axis, in degrees in the range [0,359] (default: 0).",
+ "experimental": true,
+ "optional": true,
+ "type": "integer"
+ },
+ {
+ "name": "deltaX",
+ "description": "X delta in CSS pixels for mouse wheel event (default: 0).",
+ "optional": true,
+ "type": "number"
+ },
+ {
+ "name": "deltaY",
+ "description": "Y delta in CSS pixels for mouse wheel event (default: 0).",
+ "optional": true,
+ "type": "number"
+ },
+ {
+ "name": "pointerType",
+ "description": "Pointer type (default: \"mouse\").",
+ "optional": true,
+ "type": "string",
+ "enum": [
+ "mouse",
+ "pen"
+ ]
+ }
+ ]
+ },
+ {
+ "name": "dispatchTouchEvent",
+ "description": "Dispatches a touch event to the page.",
+ "parameters": [
+ {
+ "name": "type",
+ "description": "Type of the touch event. TouchEnd and TouchCancel must not contain any touch points, while\nTouchStart and TouchMove must contains at least one.",
+ "type": "string",
+ "enum": [
+ "touchStart",
+ "touchEnd",
+ "touchMove",
+ "touchCancel"
+ ]
+ },
+ {
+ "name": "touchPoints",
+ "description": "Active touch points on the touch device. One event per any changed point (compared to\nprevious touch event in a sequence) is generated, emulating pressing/moving/releasing points\none by one.",
+ "type": "array",
+ "items": {
+ "$ref": "TouchPoint"
+ }
+ },
+ {
+ "name": "modifiers",
+ "description": "Bit field representing pressed modifier keys. Alt=1, Ctrl=2, Meta/Command=4, Shift=8\n(default: 0).",
+ "optional": true,
+ "type": "integer"
+ },
+ {
+ "name": "timestamp",
+ "description": "Time at which the event occurred.",
+ "optional": true,
+ "$ref": "TimeSinceEpoch"
+ }
+ ]
+ },
+ {
+ "name": "cancelDragging",
+ "description": "Cancels any active dragging in the page."
+ },
+ {
+ "name": "emulateTouchFromMouseEvent",
+ "description": "Emulates touch event from the mouse event parameters.",
+ "experimental": true,
+ "parameters": [
+ {
+ "name": "type",
+ "description": "Type of the mouse event.",
+ "type": "string",
+ "enum": [
+ "mousePressed",
+ "mouseReleased",
+ "mouseMoved",
+ "mouseWheel"
+ ]
+ },
+ {
+ "name": "x",
+ "description": "X coordinate of the mouse pointer in DIP.",
+ "type": "integer"
+ },
+ {
+ "name": "y",
+ "description": "Y coordinate of the mouse pointer in DIP.",
+ "type": "integer"
+ },
+ {
+ "name": "button",
+ "description": "Mouse button. Only \"none\", \"left\", \"right\" are supported.",
+ "$ref": "MouseButton"
+ },
+ {
+ "name": "timestamp",
+ "description": "Time at which the event occurred (default: current time).",
+ "optional": true,
+ "$ref": "TimeSinceEpoch"
+ },
+ {
+ "name": "deltaX",
+ "description": "X delta in DIP for mouse wheel event (default: 0).",
+ "optional": true,
+ "type": "number"
+ },
+ {
+ "name": "deltaY",
+ "description": "Y delta in DIP for mouse wheel event (default: 0).",
+ "optional": true,
+ "type": "number"
+ },
+ {
+ "name": "modifiers",
+ "description": "Bit field representing pressed modifier keys. Alt=1, Ctrl=2, Meta/Command=4, Shift=8\n(default: 0).",
+ "optional": true,
+ "type": "integer"
+ },
+ {
+ "name": "clickCount",
+ "description": "Number of times the mouse button was clicked (default: 0).",
+ "optional": true,
+ "type": "integer"
+ }
+ ]
+ },
+ {
+ "name": "setIgnoreInputEvents",
+ "description": "Ignores input events (useful while auditing page).",
+ "parameters": [
+ {
+ "name": "ignore",
+ "description": "Ignores input events processing when set to true.",
+ "type": "boolean"
+ }
+ ]
+ },
+ {
+ "name": "setInterceptDrags",
+ "description": "Prevents default drag and drop behavior and instead emits `Input.dragIntercepted` events.\nDrag and drop behavior can be directly controlled via `Input.dispatchDragEvent`.",
+ "experimental": true,
+ "parameters": [
+ {
+ "name": "enabled",
+ "type": "boolean"
+ }
+ ]
+ },
+ {
+ "name": "synthesizePinchGesture",
+ "description": "Synthesizes a pinch gesture over a time period by issuing appropriate touch events.",
+ "experimental": true,
+ "parameters": [
+ {
+ "name": "x",
+ "description": "X coordinate of the start of the gesture in CSS pixels.",
+ "type": "number"
+ },
+ {
+ "name": "y",
+ "description": "Y coordinate of the start of the gesture in CSS pixels.",
+ "type": "number"
+ },
+ {
+ "name": "scaleFactor",
+ "description": "Relative scale factor after zooming (>1.0 zooms in, <1.0 zooms out).",
+ "type": "number"
+ },
+ {
+ "name": "relativeSpeed",
+ "description": "Relative pointer speed in pixels per second (default: 800).",
+ "optional": true,
+ "type": "integer"
+ },
+ {
+ "name": "gestureSourceType",
+ "description": "Which type of input events to be generated (default: 'default', which queries the platform\nfor the preferred input type).",
+ "optional": true,
+ "$ref": "GestureSourceType"
+ }
+ ]
+ },
+ {
+ "name": "synthesizeScrollGesture",
+ "description": "Synthesizes a scroll gesture over a time period by issuing appropriate touch events.",
+ "experimental": true,
+ "parameters": [
+ {
+ "name": "x",
+ "description": "X coordinate of the start of the gesture in CSS pixels.",
+ "type": "number"
+ },
+ {
+ "name": "y",
+ "description": "Y coordinate of the start of the gesture in CSS pixels.",
+ "type": "number"
+ },
+ {
+ "name": "xDistance",
+ "description": "The distance to scroll along the X axis (positive to scroll left).",
+ "optional": true,
+ "type": "number"
+ },
+ {
+ "name": "yDistance",
+ "description": "The distance to scroll along the Y axis (positive to scroll up).",
+ "optional": true,
+ "type": "number"
+ },
+ {
+ "name": "xOverscroll",
+ "description": "The number of additional pixels to scroll back along the X axis, in addition to the given\ndistance.",
+ "optional": true,
+ "type": "number"
+ },
+ {
+ "name": "yOverscroll",
+ "description": "The number of additional pixels to scroll back along the Y axis, in addition to the given\ndistance.",
+ "optional": true,
+ "type": "number"
+ },
+ {
+ "name": "preventFling",
+ "description": "Prevent fling (default: true).",
+ "optional": true,
+ "type": "boolean"
+ },
+ {
+ "name": "speed",
+ "description": "Swipe speed in pixels per second (default: 800).",
+ "optional": true,
+ "type": "integer"
+ },
+ {
+ "name": "gestureSourceType",
+ "description": "Which type of input events to be generated (default: 'default', which queries the platform\nfor the preferred input type).",
+ "optional": true,
+ "$ref": "GestureSourceType"
+ },
+ {
+ "name": "repeatCount",
+ "description": "The number of times to repeat the gesture (default: 0).",
+ "optional": true,
+ "type": "integer"
+ },
+ {
+ "name": "repeatDelayMs",
+ "description": "The number of milliseconds delay between each repeat. (default: 250).",
+ "optional": true,
+ "type": "integer"
+ },
+ {
+ "name": "interactionMarkerName",
+ "description": "The name of the interaction markers to generate, if not empty (default: \"\").",
+ "optional": true,
+ "type": "string"
+ }
+ ]
+ },
+ {
+ "name": "synthesizeTapGesture",
+ "description": "Synthesizes a tap gesture over a time period by issuing appropriate touch events.",
+ "experimental": true,
+ "parameters": [
+ {
+ "name": "x",
+ "description": "X coordinate of the start of the gesture in CSS pixels.",
+ "type": "number"
+ },
+ {
+ "name": "y",
+ "description": "Y coordinate of the start of the gesture in CSS pixels.",
+ "type": "number"
+ },
+ {
+ "name": "duration",
+ "description": "Duration between touchdown and touchup events in ms (default: 50).",
+ "optional": true,
+ "type": "integer"
+ },
+ {
+ "name": "tapCount",
+ "description": "Number of times to perform the tap (e.g. 2 for double tap, default: 1).",
+ "optional": true,
+ "type": "integer"
+ },
+ {
+ "name": "gestureSourceType",
+ "description": "Which type of input events to be generated (default: 'default', which queries the platform\nfor the preferred input type).",
+ "optional": true,
+ "$ref": "GestureSourceType"
+ }
+ ]
+ }
+ ],
+ "events": [
+ {
+ "name": "dragIntercepted",
+ "description": "Emitted only when `Input.setInterceptDrags` is enabled. Use this data with `Input.dispatchDragEvent` to\nrestore normal drag and drop behavior.",
+ "experimental": true,
+ "parameters": [
+ {
+ "name": "data",
+ "$ref": "DragData"
+ }
+ ]
+ }
+ ]
+ },
+ {
+ "domain": "Inspector",
+ "experimental": true,
+ "commands": [
+ {
+ "name": "disable",
+ "description": "Disables inspector domain notifications."
+ },
+ {
+ "name": "enable",
+ "description": "Enables inspector domain notifications."
+ }
+ ],
+ "events": [
+ {
+ "name": "detached",
+ "description": "Fired when remote debugging connection is about to be terminated. Contains detach reason.",
+ "parameters": [
+ {
+ "name": "reason",
+ "description": "The reason why connection has been terminated.",
+ "type": "string"
+ }
+ ]
+ },
+ {
+ "name": "targetCrashed",
+ "description": "Fired when debugging target has crashed"
+ },
+ {
+ "name": "targetReloadedAfterCrash",
+ "description": "Fired when debugging target has reloaded after crash"
+ },
+ {
+ "name": "workerScriptLoaded",
+ "description": "Fired on worker targets when main worker script and any imported scripts have been evaluated.",
+ "experimental": true
+ }
+ ]
+ },
+ {
+ "domain": "LayerTree",
+ "experimental": true,
+ "dependencies": [
+ "DOM"
+ ],
+ "types": [
+ {
+ "id": "LayerId",
+ "description": "Unique Layer identifier.",
+ "type": "string"
+ },
+ {
+ "id": "SnapshotId",
+ "description": "Unique snapshot identifier.",
+ "type": "string"
+ },
+ {
+ "id": "ScrollRect",
+ "description": "Rectangle where scrolling happens on the main thread.",
+ "type": "object",
+ "properties": [
+ {
+ "name": "rect",
+ "description": "Rectangle itself.",
+ "$ref": "DOM.Rect"
+ },
+ {
+ "name": "type",
+ "description": "Reason for rectangle to force scrolling on the main thread",
+ "type": "string",
+ "enum": [
+ "RepaintsOnScroll",
+ "TouchEventHandler",
+ "WheelEventHandler"
+ ]
+ }
+ ]
+ },
+ {
+ "id": "StickyPositionConstraint",
+ "description": "Sticky position constraints.",
+ "type": "object",
+ "properties": [
+ {
+ "name": "stickyBoxRect",
+ "description": "Layout rectangle of the sticky element before being shifted",
+ "$ref": "DOM.Rect"
+ },
+ {
+ "name": "containingBlockRect",
+ "description": "Layout rectangle of the containing block of the sticky element",
+ "$ref": "DOM.Rect"
+ },
+ {
+ "name": "nearestLayerShiftingStickyBox",
+ "description": "The nearest sticky layer that shifts the sticky box",
+ "optional": true,
+ "$ref": "LayerId"
+ },
+ {
+ "name": "nearestLayerShiftingContainingBlock",
+ "description": "The nearest sticky layer that shifts the containing block",
+ "optional": true,
+ "$ref": "LayerId"
+ }
+ ]
+ },
+ {
+ "id": "PictureTile",
+ "description": "Serialized fragment of layer picture along with its offset within the layer.",
+ "type": "object",
+ "properties": [
+ {
+ "name": "x",
+ "description": "Offset from owning layer left boundary",
+ "type": "number"
+ },
+ {
+ "name": "y",
+ "description": "Offset from owning layer top boundary",
+ "type": "number"
+ },
+ {
+ "name": "picture",
+ "description": "Base64-encoded snapshot data. (Encoded as a base64 string when passed over JSON)",
+ "type": "string"
+ }
+ ]
+ },
+ {
+ "id": "Layer",
+ "description": "Information about a compositing layer.",
+ "type": "object",
+ "properties": [
+ {
+ "name": "layerId",
+ "description": "The unique id for this layer.",
+ "$ref": "LayerId"
+ },
+ {
+ "name": "parentLayerId",
+ "description": "The id of parent (not present for root).",
+ "optional": true,
+ "$ref": "LayerId"
+ },
+ {
+ "name": "backendNodeId",
+ "description": "The backend id for the node associated with this layer.",
+ "optional": true,
+ "$ref": "DOM.BackendNodeId"
+ },
+ {
+ "name": "offsetX",
+ "description": "Offset from parent layer, X coordinate.",
+ "type": "number"
+ },
+ {
+ "name": "offsetY",
+ "description": "Offset from parent layer, Y coordinate.",
+ "type": "number"
+ },
+ {
+ "name": "width",
+ "description": "Layer width.",
+ "type": "number"
+ },
+ {
+ "name": "height",
+ "description": "Layer height.",
+ "type": "number"
+ },
+ {
+ "name": "transform",
+ "description": "Transformation matrix for layer, default is identity matrix",
+ "optional": true,
+ "type": "array",
+ "items": {
+ "type": "number"
+ }
+ },
+ {
+ "name": "anchorX",
+ "description": "Transform anchor point X, absent if no transform specified",
+ "optional": true,
+ "type": "number"
+ },
+ {
+ "name": "anchorY",
+ "description": "Transform anchor point Y, absent if no transform specified",
+ "optional": true,
+ "type": "number"
+ },
+ {
+ "name": "anchorZ",
+ "description": "Transform anchor point Z, absent if no transform specified",
+ "optional": true,
+ "type": "number"
+ },
+ {
+ "name": "paintCount",
+ "description": "Indicates how many time this layer has painted.",
+ "type": "integer"
+ },
+ {
+ "name": "drawsContent",
+ "description": "Indicates whether this layer hosts any content, rather than being used for\ntransform/scrolling purposes only.",
+ "type": "boolean"
+ },
+ {
+ "name": "invisible",
+ "description": "Set if layer is not visible.",
+ "optional": true,
+ "type": "boolean"
+ },
+ {
+ "name": "scrollRects",
+ "description": "Rectangles scrolling on main thread only.",
+ "optional": true,
+ "type": "array",
+ "items": {
+ "$ref": "ScrollRect"
+ }
+ },
+ {
+ "name": "stickyPositionConstraint",
+ "description": "Sticky position constraint information",
+ "optional": true,
+ "$ref": "StickyPositionConstraint"
+ }
+ ]
+ },
+ {
+ "id": "PaintProfile",
+ "description": "Array of timings, one per paint step.",
+ "type": "array",
+ "items": {
+ "type": "number"
+ }
+ }
+ ],
+ "commands": [
+ {
+ "name": "compositingReasons",
+ "description": "Provides the reasons why the given layer was composited.",
+ "parameters": [
+ {
+ "name": "layerId",
+ "description": "The id of the layer for which we want to get the reasons it was composited.",
+ "$ref": "LayerId"
+ }
+ ],
+ "returns": [
+ {
+ "name": "compositingReasons",
+ "description": "A list of strings specifying reasons for the given layer to become composited.",
+ "type": "array",
+ "items": {
+ "type": "string"
+ }
+ },
+ {
+ "name": "compositingReasonIds",
+ "description": "A list of strings specifying reason IDs for the given layer to become composited.",
+ "type": "array",
+ "items": {
+ "type": "string"
+ }
+ }
+ ]
+ },
+ {
+ "name": "disable",
+ "description": "Disables compositing tree inspection."
+ },
+ {
+ "name": "enable",
+ "description": "Enables compositing tree inspection."
+ },
+ {
+ "name": "loadSnapshot",
+ "description": "Returns the snapshot identifier.",
+ "parameters": [
+ {
+ "name": "tiles",
+ "description": "An array of tiles composing the snapshot.",
+ "type": "array",
+ "items": {
+ "$ref": "PictureTile"
+ }
+ }
+ ],
+ "returns": [
+ {
+ "name": "snapshotId",
+ "description": "The id of the snapshot.",
+ "$ref": "SnapshotId"
+ }
+ ]
+ },
+ {
+ "name": "makeSnapshot",
+ "description": "Returns the layer snapshot identifier.",
+ "parameters": [
+ {
+ "name": "layerId",
+ "description": "The id of the layer.",
+ "$ref": "LayerId"
+ }
+ ],
+ "returns": [
+ {
+ "name": "snapshotId",
+ "description": "The id of the layer snapshot.",
+ "$ref": "SnapshotId"
+ }
+ ]
+ },
+ {
+ "name": "profileSnapshot",
+ "parameters": [
+ {
+ "name": "snapshotId",
+ "description": "The id of the layer snapshot.",
+ "$ref": "SnapshotId"
+ },
+ {
+ "name": "minRepeatCount",
+ "description": "The maximum number of times to replay the snapshot (1, if not specified).",
+ "optional": true,
+ "type": "integer"
+ },
+ {
+ "name": "minDuration",
+ "description": "The minimum duration (in seconds) to replay the snapshot.",
+ "optional": true,
+ "type": "number"
+ },
+ {
+ "name": "clipRect",
+ "description": "The clip rectangle to apply when replaying the snapshot.",
+ "optional": true,
+ "$ref": "DOM.Rect"
+ }
+ ],
+ "returns": [
+ {
+ "name": "timings",
+ "description": "The array of paint profiles, one per run.",
+ "type": "array",
+ "items": {
+ "$ref": "PaintProfile"
+ }
+ }
+ ]
+ },
+ {
+ "name": "releaseSnapshot",
+ "description": "Releases layer snapshot captured by the back-end.",
+ "parameters": [
+ {
+ "name": "snapshotId",
+ "description": "The id of the layer snapshot.",
+ "$ref": "SnapshotId"
+ }
+ ]
+ },
+ {
+ "name": "replaySnapshot",
+ "description": "Replays the layer snapshot and returns the resulting bitmap.",
+ "parameters": [
+ {
+ "name": "snapshotId",
+ "description": "The id of the layer snapshot.",
+ "$ref": "SnapshotId"
+ },
+ {
+ "name": "fromStep",
+ "description": "The first step to replay from (replay from the very start if not specified).",
+ "optional": true,
+ "type": "integer"
+ },
+ {
+ "name": "toStep",
+ "description": "The last step to replay to (replay till the end if not specified).",
+ "optional": true,
+ "type": "integer"
+ },
+ {
+ "name": "scale",
+ "description": "The scale to apply while replaying (defaults to 1).",
+ "optional": true,
+ "type": "number"
+ }
+ ],
+ "returns": [
+ {
+ "name": "dataURL",
+ "description": "A data: URL for resulting image.",
+ "type": "string"
+ }
+ ]
+ },
+ {
+ "name": "snapshotCommandLog",
+ "description": "Replays the layer snapshot and returns canvas log.",
+ "parameters": [
+ {
+ "name": "snapshotId",
+ "description": "The id of the layer snapshot.",
+ "$ref": "SnapshotId"
+ }
+ ],
+ "returns": [
+ {
+ "name": "commandLog",
+ "description": "The array of canvas function calls.",
+ "type": "array",
+ "items": {
+ "type": "object"
+ }
+ }
+ ]
+ }
+ ],
+ "events": [
+ {
+ "name": "layerPainted",
+ "parameters": [
+ {
+ "name": "layerId",
+ "description": "The id of the painted layer.",
+ "$ref": "LayerId"
+ },
+ {
+ "name": "clip",
+ "description": "Clip rectangle.",
+ "$ref": "DOM.Rect"
+ }
+ ]
+ },
+ {
+ "name": "layerTreeDidChange",
+ "parameters": [
+ {
+ "name": "layers",
+ "description": "Layer tree, absent if not in the compositing mode.",
+ "optional": true,
+ "type": "array",
+ "items": {
+ "$ref": "Layer"
+ }
+ }
+ ]
+ }
+ ]
+ },
+ {
+ "domain": "Log",
+ "description": "Provides access to log entries.",
+ "dependencies": [
+ "Runtime",
+ "Network"
+ ],
+ "types": [
+ {
+ "id": "LogEntry",
+ "description": "Log entry.",
+ "type": "object",
+ "properties": [
+ {
+ "name": "source",
+ "description": "Log entry source.",
+ "type": "string",
+ "enum": [
+ "xml",
+ "javascript",
+ "network",
+ "storage",
+ "appcache",
+ "rendering",
+ "security",
+ "deprecation",
+ "worker",
+ "violation",
+ "intervention",
+ "recommendation",
+ "other"
+ ]
+ },
+ {
+ "name": "level",
+ "description": "Log entry severity.",
+ "type": "string",
+ "enum": [
+ "verbose",
+ "info",
+ "warning",
+ "error"
+ ]
+ },
+ {
+ "name": "text",
+ "description": "Logged text.",
+ "type": "string"
+ },
+ {
+ "name": "category",
+ "optional": true,
+ "type": "string",
+ "enum": [
+ "cors"
+ ]
+ },
+ {
+ "name": "timestamp",
+ "description": "Timestamp when this entry was added.",
+ "$ref": "Runtime.Timestamp"
+ },
+ {
+ "name": "url",
+ "description": "URL of the resource if known.",
+ "optional": true,
+ "type": "string"
+ },
+ {
+ "name": "lineNumber",
+ "description": "Line number in the resource.",
+ "optional": true,
+ "type": "integer"
+ },
+ {
+ "name": "stackTrace",
+ "description": "JavaScript stack trace.",
+ "optional": true,
+ "$ref": "Runtime.StackTrace"
+ },
+ {
+ "name": "networkRequestId",
+ "description": "Identifier of the network request associated with this entry.",
+ "optional": true,
+ "$ref": "Network.RequestId"
+ },
+ {
+ "name": "workerId",
+ "description": "Identifier of the worker associated with this entry.",
+ "optional": true,
+ "type": "string"
+ },
+ {
+ "name": "args",
+ "description": "Call arguments.",
+ "optional": true,
+ "type": "array",
+ "items": {
+ "$ref": "Runtime.RemoteObject"
+ }
+ }
+ ]
+ },
+ {
+ "id": "ViolationSetting",
+ "description": "Violation configuration setting.",
+ "type": "object",
+ "properties": [
+ {
+ "name": "name",
+ "description": "Violation type.",
+ "type": "string",
+ "enum": [
+ "longTask",
+ "longLayout",
+ "blockedEvent",
+ "blockedParser",
+ "discouragedAPIUse",
+ "handler",
+ "recurringHandler"
+ ]
+ },
+ {
+ "name": "threshold",
+ "description": "Time threshold to trigger upon.",
+ "type": "number"
+ }
+ ]
+ }
+ ],
+ "commands": [
+ {
+ "name": "clear",
+ "description": "Clears the log."
+ },
+ {
+ "name": "disable",
+ "description": "Disables log domain, prevents further log entries from being reported to the client."
+ },
+ {
+ "name": "enable",
+ "description": "Enables log domain, sends the entries collected so far to the client by means of the\n`entryAdded` notification."
+ },
+ {
+ "name": "startViolationsReport",
+ "description": "start violation reporting.",
+ "parameters": [
+ {
+ "name": "config",
+ "description": "Configuration for violations.",
+ "type": "array",
+ "items": {
+ "$ref": "ViolationSetting"
+ }
+ }
+ ]
+ },
+ {
+ "name": "stopViolationsReport",
+ "description": "Stop violation reporting."
+ }
+ ],
+ "events": [
+ {
+ "name": "entryAdded",
+ "description": "Issued when new message was logged.",
+ "parameters": [
+ {
+ "name": "entry",
+ "description": "The entry.",
+ "$ref": "LogEntry"
+ }
+ ]
+ }
+ ]
+ },
+ {
+ "domain": "Media",
+ "description": "This domain allows detailed inspection of media elements.",
+ "experimental": true,
+ "types": [
+ {
+ "id": "PlayerId",
+ "description": "Players will get an ID that is unique within the agent context.",
+ "type": "string"
+ },
+ {
+ "id": "Timestamp",
+ "type": "number"
+ },
+ {
+ "id": "PlayerMessage",
+ "description": "Have one type per entry in MediaLogRecord::Type\nCorresponds to kMessage",
+ "type": "object",
+ "properties": [
+ {
+ "name": "level",
+ "description": "Keep in sync with MediaLogMessageLevel\nWe are currently keeping the message level 'error' separate from the\nPlayerError type because right now they represent different things,\nthis one being a DVLOG(ERROR) style log message that gets printed\nbased on what log level is selected in the UI, and the other is a\nrepresentation of a media::PipelineStatus object. Soon however we're\ngoing to be moving away from using PipelineStatus for errors and\nintroducing a new error type which should hopefully let us integrate\nthe error log level into the PlayerError type.",
+ "type": "string",
+ "enum": [
+ "error",
+ "warning",
+ "info",
+ "debug"
+ ]
+ },
+ {
+ "name": "message",
+ "type": "string"
+ }
+ ]
+ },
+ {
+ "id": "PlayerProperty",
+ "description": "Corresponds to kMediaPropertyChange",
+ "type": "object",
+ "properties": [
+ {
+ "name": "name",
+ "type": "string"
+ },
+ {
+ "name": "value",
+ "type": "string"
+ }
+ ]
+ },
+ {
+ "id": "PlayerEvent",
+ "description": "Corresponds to kMediaEventTriggered",
+ "type": "object",
+ "properties": [
+ {
+ "name": "timestamp",
+ "$ref": "Timestamp"
+ },
+ {
+ "name": "value",
+ "type": "string"
+ }
+ ]
+ },
+ {
+ "id": "PlayerErrorSourceLocation",
+ "description": "Represents logged source line numbers reported in an error.\nNOTE: file and line are from chromium c++ implementation code, not js.",
+ "type": "object",
+ "properties": [
+ {
+ "name": "file",
+ "type": "string"
+ },
+ {
+ "name": "line",
+ "type": "integer"
+ }
+ ]
+ },
+ {
+ "id": "PlayerError",
+ "description": "Corresponds to kMediaError",
+ "type": "object",
+ "properties": [
+ {
+ "name": "errorType",
+ "type": "string"
+ },
+ {
+ "name": "code",
+ "description": "Code is the numeric enum entry for a specific set of error codes, such\nas PipelineStatusCodes in media/base/pipeline_status.h",
+ "type": "integer"
+ },
+ {
+ "name": "stack",
+ "description": "A trace of where this error was caused / where it passed through.",
+ "type": "array",
+ "items": {
+ "$ref": "PlayerErrorSourceLocation"
+ }
+ },
+ {
+ "name": "cause",
+ "description": "Errors potentially have a root cause error, ie, a DecoderError might be\ncaused by an WindowsError",
+ "type": "array",
+ "items": {
+ "$ref": "PlayerError"
+ }
+ },
+ {
+ "name": "data",
+ "description": "Extra data attached to an error, such as an HRESULT, Video Codec, etc.",
+ "type": "object"
+ }
+ ]
+ },
+ {
+ "id": "Player",
+ "type": "object",
+ "properties": [
+ {
+ "name": "playerId",
+ "$ref": "PlayerId"
+ },
+ {
+ "name": "domNodeId",
+ "optional": true,
+ "$ref": "DOM.BackendNodeId"
+ }
+ ]
+ }
+ ],
+ "events": [
+ {
+ "name": "playerPropertiesChanged",
+ "description": "This can be called multiple times, and can be used to set / override /\nremove player properties. A null propValue indicates removal.",
+ "parameters": [
+ {
+ "name": "playerId",
+ "$ref": "PlayerId"
+ },
+ {
+ "name": "properties",
+ "type": "array",
+ "items": {
+ "$ref": "PlayerProperty"
+ }
+ }
+ ]
+ },
+ {
+ "name": "playerEventsAdded",
+ "description": "Send events as a list, allowing them to be batched on the browser for less\ncongestion. If batched, events must ALWAYS be in chronological order.",
+ "parameters": [
+ {
+ "name": "playerId",
+ "$ref": "PlayerId"
+ },
+ {
+ "name": "events",
+ "type": "array",
+ "items": {
+ "$ref": "PlayerEvent"
+ }
+ }
+ ]
+ },
+ {
+ "name": "playerMessagesLogged",
+ "description": "Send a list of any messages that need to be delivered.",
+ "parameters": [
+ {
+ "name": "playerId",
+ "$ref": "PlayerId"
+ },
+ {
+ "name": "messages",
+ "type": "array",
+ "items": {
+ "$ref": "PlayerMessage"
+ }
+ }
+ ]
+ },
+ {
+ "name": "playerErrorsRaised",
+ "description": "Send a list of any errors that need to be delivered.",
+ "parameters": [
+ {
+ "name": "playerId",
+ "$ref": "PlayerId"
+ },
+ {
+ "name": "errors",
+ "type": "array",
+ "items": {
+ "$ref": "PlayerError"
+ }
+ }
+ ]
+ },
+ {
+ "name": "playerCreated",
+ "description": "Called whenever a player is created, or when a new agent joins and receives\na list of active players. If an agent is restored, it will receive one\nevent for each active player.",
+ "parameters": [
+ {
+ "name": "player",
+ "$ref": "Player"
+ }
+ ]
+ }
+ ],
+ "commands": [
+ {
+ "name": "enable",
+ "description": "Enables the Media domain"
+ },
+ {
+ "name": "disable",
+ "description": "Disables the Media domain."
+ }
+ ]
+ },
+ {
+ "domain": "Memory",
+ "experimental": true,
+ "types": [
+ {
+ "id": "PressureLevel",
+ "description": "Memory pressure level.",
+ "type": "string",
+ "enum": [
+ "moderate",
+ "critical"
+ ]
+ },
+ {
+ "id": "SamplingProfileNode",
+ "description": "Heap profile sample.",
+ "type": "object",
+ "properties": [
+ {
+ "name": "size",
+ "description": "Size of the sampled allocation.",
+ "type": "number"
+ },
+ {
+ "name": "total",
+ "description": "Total bytes attributed to this sample.",
+ "type": "number"
+ },
+ {
+ "name": "stack",
+ "description": "Execution stack at the point of allocation.",
+ "type": "array",
+ "items": {
+ "type": "string"
+ }
+ }
+ ]
+ },
+ {
+ "id": "SamplingProfile",
+ "description": "Array of heap profile samples.",
+ "type": "object",
+ "properties": [
+ {
+ "name": "samples",
+ "type": "array",
+ "items": {
+ "$ref": "SamplingProfileNode"
+ }
+ },
+ {
+ "name": "modules",
+ "type": "array",
+ "items": {
+ "$ref": "Module"
+ }
+ }
+ ]
+ },
+ {
+ "id": "Module",
+ "description": "Executable module information",
+ "type": "object",
+ "properties": [
+ {
+ "name": "name",
+ "description": "Name of the module.",
+ "type": "string"
+ },
+ {
+ "name": "uuid",
+ "description": "UUID of the module.",
+ "type": "string"
+ },
+ {
+ "name": "baseAddress",
+ "description": "Base address where the module is loaded into memory. Encoded as a decimal\nor hexadecimal (0x prefixed) string.",
+ "type": "string"
+ },
+ {
+ "name": "size",
+ "description": "Size of the module in bytes.",
+ "type": "number"
+ }
+ ]
+ },
+ {
+ "id": "DOMCounter",
+ "description": "DOM object counter data.",
+ "type": "object",
+ "properties": [
+ {
+ "name": "name",
+ "description": "Object name. Note: object names should be presumed volatile and clients should not expect\nthe returned names to be consistent across runs.",
+ "type": "string"
+ },
+ {
+ "name": "count",
+ "description": "Object count.",
+ "type": "integer"
+ }
+ ]
+ }
+ ],
+ "commands": [
+ {
+ "name": "getDOMCounters",
+ "description": "Retruns current DOM object counters.",
+ "returns": [
+ {
+ "name": "documents",
+ "type": "integer"
+ },
+ {
+ "name": "nodes",
+ "type": "integer"
+ },
+ {
+ "name": "jsEventListeners",
+ "type": "integer"
+ }
+ ]
+ },
+ {
+ "name": "getDOMCountersForLeakDetection",
+ "description": "Retruns DOM object counters after preparing renderer for leak detection.",
+ "returns": [
+ {
+ "name": "counters",
+ "description": "DOM object counters.",
+ "type": "array",
+ "items": {
+ "$ref": "DOMCounter"
+ }
+ }
+ ]
+ },
+ {
+ "name": "prepareForLeakDetection",
+ "description": "Prepares for leak detection by terminating workers, stopping spellcheckers,\ndropping non-essential internal caches, running garbage collections, etc."
+ },
+ {
+ "name": "forciblyPurgeJavaScriptMemory",
+ "description": "Simulate OomIntervention by purging V8 memory."
+ },
+ {
+ "name": "setPressureNotificationsSuppressed",
+ "description": "Enable/disable suppressing memory pressure notifications in all processes.",
+ "parameters": [
+ {
+ "name": "suppressed",
+ "description": "If true, memory pressure notifications will be suppressed.",
+ "type": "boolean"
+ }
+ ]
+ },
+ {
+ "name": "simulatePressureNotification",
+ "description": "Simulate a memory pressure notification in all processes.",
+ "parameters": [
+ {
+ "name": "level",
+ "description": "Memory pressure level of the notification.",
+ "$ref": "PressureLevel"
+ }
+ ]
+ },
+ {
+ "name": "startSampling",
+ "description": "Start collecting native memory profile.",
+ "parameters": [
+ {
+ "name": "samplingInterval",
+ "description": "Average number of bytes between samples.",
+ "optional": true,
+ "type": "integer"
+ },
+ {
+ "name": "suppressRandomness",
+ "description": "Do not randomize intervals between samples.",
+ "optional": true,
+ "type": "boolean"
+ }
+ ]
+ },
+ {
+ "name": "stopSampling",
+ "description": "Stop collecting native memory profile."
+ },
+ {
+ "name": "getAllTimeSamplingProfile",
+ "description": "Retrieve native memory allocations profile\ncollected since renderer process startup.",
+ "returns": [
+ {
+ "name": "profile",
+ "$ref": "SamplingProfile"
+ }
+ ]
+ },
+ {
+ "name": "getBrowserSamplingProfile",
+ "description": "Retrieve native memory allocations profile\ncollected since browser process startup.",
+ "returns": [
+ {
+ "name": "profile",
+ "$ref": "SamplingProfile"
+ }
+ ]
+ },
+ {
+ "name": "getSamplingProfile",
+ "description": "Retrieve native memory allocations profile collected since last\n`startSampling` call.",
+ "returns": [
+ {
+ "name": "profile",
+ "$ref": "SamplingProfile"
+ }
+ ]
+ }
+ ]
+ },
+ {
+ "domain": "Network",
+ "description": "Network domain allows tracking network activities of the page. It exposes information about http,\nfile, data and other requests and responses, their headers, bodies, timing, etc.",
+ "dependencies": [
+ "Debugger",
+ "Runtime",
+ "Security"
+ ],
+ "types": [
+ {
+ "id": "ResourceType",
"description": "Resource type as it was perceived by the rendering engine.",
"type": "string",
"enum": [
@@ -12806,6 +15367,7 @@
"Ping",
"CSPViolationReport",
"Preflight",
+ "FedCM",
"Other"
]
},
@@ -13043,6 +15605,19 @@
"VeryHigh"
]
},
+ {
+ "id": "RenderBlockingBehavior",
+ "description": "The render-blocking behavior of a resource request.",
+ "experimental": true,
+ "type": "string",
+ "enum": [
+ "Blocking",
+ "InBodyParserBlocking",
+ "NonBlocking",
+ "NonBlockingDynamic",
+ "PotentiallyBlocking"
+ ]
+ },
{
"id": "PostDataEntry",
"description": "Post data entry for HTTP request",
@@ -13144,8 +15719,15 @@
"$ref": "TrustTokenParams"
},
{
- "name": "isSameSite",
- "description": "True if this resource request is considered to be the 'same site' as the\nrequest corresponding to the main frame.",
+ "name": "isSameSite",
+ "description": "True if this resource request is considered to be the 'same site' as the\nrequest corresponding to the main frame.",
+ "experimental": true,
+ "optional": true,
+ "type": "boolean"
+ },
+ {
+ "name": "isAdRelated",
+ "description": "True when the resource request is ad-related.",
"experimental": true,
"optional": true,
"type": "boolean"
@@ -13310,6 +15892,7 @@
"mixed-content",
"origin",
"inspector",
+ "integrity",
"subresource-filter",
"content-type",
"coep-frame-resource-needs-coep-header",
@@ -13346,21 +15929,14 @@
"PreflightInvalidAllowCredentials",
"PreflightMissingAllowExternal",
"PreflightInvalidAllowExternal",
- "PreflightMissingAllowPrivateNetwork",
- "PreflightInvalidAllowPrivateNetwork",
"InvalidAllowMethodsPreflightResponse",
"InvalidAllowHeadersPreflightResponse",
"MethodDisallowedByPreflightResponse",
"HeaderDisallowedByPreflightResponse",
"RedirectContainsCredentials",
- "InsecurePrivateNetwork",
- "InvalidPrivateNetworkAccess",
- "UnexpectedPrivateNetworkAccess",
+ "InsecureLocalNetwork",
+ "InvalidLocalNetworkAccess",
"NoCorsRedirectModeNotFollow",
- "PreflightMissingPrivateNetworkAccessId",
- "PreflightMissingPrivateNetworkAccessName",
- "PrivateNetworkAccessPermissionUnavailable",
- "PrivateNetworkAccessPermissionDenied",
"LocalNetworkAccessPermissionDenied"
]
},
@@ -13369,1379 +15945,2003 @@
"type": "object",
"properties": [
{
- "name": "corsError",
- "$ref": "CorsError"
+ "name": "corsError",
+ "$ref": "CorsError"
+ },
+ {
+ "name": "failedParameter",
+ "type": "string"
+ }
+ ]
+ },
+ {
+ "id": "ServiceWorkerResponseSource",
+ "description": "Source of serviceworker response.",
+ "type": "string",
+ "enum": [
+ "cache-storage",
+ "http-cache",
+ "fallback-code",
+ "network"
+ ]
+ },
+ {
+ "id": "TrustTokenParams",
+ "description": "Determines what type of Trust Token operation is executed and\ndepending on the type, some additional parameters. The values\nare specified in third_party/blink/renderer/core/fetch/trust_token.idl.",
+ "experimental": true,
+ "type": "object",
+ "properties": [
+ {
+ "name": "operation",
+ "$ref": "TrustTokenOperationType"
+ },
+ {
+ "name": "refreshPolicy",
+ "description": "Only set for \"token-redemption\" operation and determine whether\nto request a fresh SRR or use a still valid cached SRR.",
+ "type": "string",
+ "enum": [
+ "UseCached",
+ "Refresh"
+ ]
+ },
+ {
+ "name": "issuers",
+ "description": "Origins of issuers from whom to request tokens or redemption\nrecords.",
+ "optional": true,
+ "type": "array",
+ "items": {
+ "type": "string"
+ }
+ }
+ ]
+ },
+ {
+ "id": "TrustTokenOperationType",
+ "experimental": true,
+ "type": "string",
+ "enum": [
+ "Issuance",
+ "Redemption",
+ "Signing"
+ ]
+ },
+ {
+ "id": "AlternateProtocolUsage",
+ "description": "The reason why Chrome uses a specific transport protocol for HTTP semantics.",
+ "experimental": true,
+ "type": "string",
+ "enum": [
+ "alternativeJobWonWithoutRace",
+ "alternativeJobWonRace",
+ "mainJobWonRace",
+ "mappingMissing",
+ "broken",
+ "dnsAlpnH3JobWonWithoutRace",
+ "dnsAlpnH3JobWonRace",
+ "unspecifiedReason"
+ ]
+ },
+ {
+ "id": "ServiceWorkerRouterSource",
+ "description": "Source of service worker router.",
+ "type": "string",
+ "enum": [
+ "network",
+ "cache",
+ "fetch-event",
+ "race-network-and-fetch-handler",
+ "race-network-and-cache"
+ ]
+ },
+ {
+ "id": "ServiceWorkerRouterInfo",
+ "experimental": true,
+ "type": "object",
+ "properties": [
+ {
+ "name": "ruleIdMatched",
+ "description": "ID of the rule matched. If there is a matched rule, this field will\nbe set, otherwiser no value will be set.",
+ "optional": true,
+ "type": "integer"
+ },
+ {
+ "name": "matchedSourceType",
+ "description": "The router source of the matched rule. If there is a matched rule, this\nfield will be set, otherwise no value will be set.",
+ "optional": true,
+ "$ref": "ServiceWorkerRouterSource"
+ },
+ {
+ "name": "actualSourceType",
+ "description": "The actual router source used.",
+ "optional": true,
+ "$ref": "ServiceWorkerRouterSource"
+ }
+ ]
+ },
+ {
+ "id": "Response",
+ "description": "HTTP response data.",
+ "type": "object",
+ "properties": [
+ {
+ "name": "url",
+ "description": "Response URL. This URL can be different from CachedResource.url in case of redirect.",
+ "type": "string"
+ },
+ {
+ "name": "status",
+ "description": "HTTP response status code.",
+ "type": "integer"
+ },
+ {
+ "name": "statusText",
+ "description": "HTTP response status text.",
+ "type": "string"
+ },
+ {
+ "name": "headers",
+ "description": "HTTP response headers.",
+ "$ref": "Headers"
+ },
+ {
+ "name": "headersText",
+ "description": "HTTP response headers text. This has been replaced by the headers in Network.responseReceivedExtraInfo.",
+ "deprecated": true,
+ "optional": true,
+ "type": "string"
+ },
+ {
+ "name": "mimeType",
+ "description": "Resource mimeType as determined by the browser.",
+ "type": "string"
+ },
+ {
+ "name": "charset",
+ "description": "Resource charset as determined by the browser (if applicable).",
+ "type": "string"
+ },
+ {
+ "name": "requestHeaders",
+ "description": "Refined HTTP request headers that were actually transmitted over the network.",
+ "optional": true,
+ "$ref": "Headers"
+ },
+ {
+ "name": "requestHeadersText",
+ "description": "HTTP request headers text. This has been replaced by the headers in Network.requestWillBeSentExtraInfo.",
+ "deprecated": true,
+ "optional": true,
+ "type": "string"
+ },
+ {
+ "name": "connectionReused",
+ "description": "Specifies whether physical connection was actually reused for this request.",
+ "type": "boolean"
+ },
+ {
+ "name": "connectionId",
+ "description": "Physical connection id that was actually used for this request.",
+ "type": "number"
+ },
+ {
+ "name": "remoteIPAddress",
+ "description": "Remote IP address.",
+ "optional": true,
+ "type": "string"
+ },
+ {
+ "name": "remotePort",
+ "description": "Remote port.",
+ "optional": true,
+ "type": "integer"
+ },
+ {
+ "name": "fromDiskCache",
+ "description": "Specifies that the request was served from the disk cache.",
+ "optional": true,
+ "type": "boolean"
+ },
+ {
+ "name": "fromServiceWorker",
+ "description": "Specifies that the request was served from the ServiceWorker.",
+ "optional": true,
+ "type": "boolean"
+ },
+ {
+ "name": "fromPrefetchCache",
+ "description": "Specifies that the request was served from the prefetch cache.",
+ "optional": true,
+ "type": "boolean"
+ },
+ {
+ "name": "fromEarlyHints",
+ "description": "Specifies that the request was served from the prefetch cache.",
+ "optional": true,
+ "type": "boolean"
+ },
+ {
+ "name": "serviceWorkerRouterInfo",
+ "description": "Information about how ServiceWorker Static Router API was used. If this\nfield is set with `matchedSourceType` field, a matching rule is found.\nIf this field is set without `matchedSource`, no matching rule is found.\nOtherwise, the API is not used.",
+ "experimental": true,
+ "optional": true,
+ "$ref": "ServiceWorkerRouterInfo"
+ },
+ {
+ "name": "encodedDataLength",
+ "description": "Total number of bytes received for this request so far.",
+ "type": "number"
+ },
+ {
+ "name": "timing",
+ "description": "Timing information for the given request.",
+ "optional": true,
+ "$ref": "ResourceTiming"
+ },
+ {
+ "name": "serviceWorkerResponseSource",
+ "description": "Response source of response from ServiceWorker.",
+ "optional": true,
+ "$ref": "ServiceWorkerResponseSource"
+ },
+ {
+ "name": "responseTime",
+ "description": "The time at which the returned response was generated.",
+ "optional": true,
+ "$ref": "TimeSinceEpoch"
+ },
+ {
+ "name": "cacheStorageCacheName",
+ "description": "Cache Storage Cache Name.",
+ "optional": true,
+ "type": "string"
+ },
+ {
+ "name": "protocol",
+ "description": "Protocol used to fetch this request.",
+ "optional": true,
+ "type": "string"
+ },
+ {
+ "name": "alternateProtocolUsage",
+ "description": "The reason why Chrome uses a specific transport protocol for HTTP semantics.",
+ "experimental": true,
+ "optional": true,
+ "$ref": "AlternateProtocolUsage"
},
{
- "name": "failedParameter",
- "type": "string"
+ "name": "securityState",
+ "description": "Security state of the request resource.",
+ "$ref": "Security.SecurityState"
+ },
+ {
+ "name": "securityDetails",
+ "description": "Security details for the request.",
+ "optional": true,
+ "$ref": "SecurityDetails"
}
]
},
{
- "id": "ServiceWorkerResponseSource",
- "description": "Source of serviceworker response.",
- "type": "string",
- "enum": [
- "cache-storage",
- "http-cache",
- "fallback-code",
- "network"
+ "id": "WebSocketRequest",
+ "description": "WebSocket request data.",
+ "type": "object",
+ "properties": [
+ {
+ "name": "headers",
+ "description": "HTTP request headers.",
+ "$ref": "Headers"
+ }
]
},
{
- "id": "TrustTokenParams",
- "description": "Determines what type of Trust Token operation is executed and\ndepending on the type, some additional parameters. The values\nare specified in third_party/blink/renderer/core/fetch/trust_token.idl.",
- "experimental": true,
+ "id": "WebSocketResponse",
+ "description": "WebSocket response data.",
"type": "object",
"properties": [
{
- "name": "operation",
- "$ref": "TrustTokenOperationType"
+ "name": "status",
+ "description": "HTTP response status code.",
+ "type": "integer"
},
{
- "name": "refreshPolicy",
- "description": "Only set for \"token-redemption\" operation and determine whether\nto request a fresh SRR or use a still valid cached SRR.",
- "type": "string",
- "enum": [
- "UseCached",
- "Refresh"
- ]
+ "name": "statusText",
+ "description": "HTTP response status text.",
+ "type": "string"
},
{
- "name": "issuers",
- "description": "Origins of issuers from whom to request tokens or redemption\nrecords.",
+ "name": "headers",
+ "description": "HTTP response headers.",
+ "$ref": "Headers"
+ },
+ {
+ "name": "headersText",
+ "description": "HTTP response headers text.",
"optional": true,
- "type": "array",
- "items": {
- "type": "string"
- }
+ "type": "string"
+ },
+ {
+ "name": "requestHeaders",
+ "description": "HTTP request headers.",
+ "optional": true,
+ "$ref": "Headers"
+ },
+ {
+ "name": "requestHeadersText",
+ "description": "HTTP request headers text.",
+ "optional": true,
+ "type": "string"
}
]
},
{
- "id": "TrustTokenOperationType",
- "experimental": true,
- "type": "string",
- "enum": [
- "Issuance",
- "Redemption",
- "Signing"
- ]
- },
- {
- "id": "AlternateProtocolUsage",
- "description": "The reason why Chrome uses a specific transport protocol for HTTP semantics.",
- "experimental": true,
- "type": "string",
- "enum": [
- "alternativeJobWonWithoutRace",
- "alternativeJobWonRace",
- "mainJobWonRace",
- "mappingMissing",
- "broken",
- "dnsAlpnH3JobWonWithoutRace",
- "dnsAlpnH3JobWonRace",
- "unspecifiedReason"
- ]
- },
- {
- "id": "ServiceWorkerRouterSource",
- "description": "Source of service worker router.",
- "type": "string",
- "enum": [
- "network",
- "cache",
- "fetch-event",
- "race-network-and-fetch-handler"
- ]
- },
- {
- "id": "ServiceWorkerRouterInfo",
- "experimental": true,
+ "id": "WebSocketFrame",
+ "description": "WebSocket message data. This represents an entire WebSocket message, not just a fragmented frame as the name suggests.",
"type": "object",
"properties": [
{
- "name": "ruleIdMatched",
- "description": "ID of the rule matched. If there is a matched rule, this field will\nbe set, otherwiser no value will be set.",
- "optional": true,
- "type": "integer"
+ "name": "opcode",
+ "description": "WebSocket message opcode.",
+ "type": "number"
},
{
- "name": "matchedSourceType",
- "description": "The router source of the matched rule. If there is a matched rule, this\nfield will be set, otherwise no value will be set.",
- "optional": true,
- "$ref": "ServiceWorkerRouterSource"
+ "name": "mask",
+ "description": "WebSocket message mask.",
+ "type": "boolean"
},
{
- "name": "actualSourceType",
- "description": "The actual router source used.",
- "optional": true,
- "$ref": "ServiceWorkerRouterSource"
+ "name": "payloadData",
+ "description": "WebSocket message payload data.\nIf the opcode is 1, this is a text message and payloadData is a UTF-8 string.\nIf the opcode isn't 1, then payloadData is a base64 encoded string representing binary data.",
+ "type": "string"
}
]
},
{
- "id": "Response",
- "description": "HTTP response data.",
+ "id": "CachedResource",
+ "description": "Information about the cached resource.",
"type": "object",
"properties": [
{
"name": "url",
- "description": "Response URL. This URL can be different from CachedResource.url in case of redirect.",
+ "description": "Resource URL. This is the url of the original network request.",
"type": "string"
},
{
- "name": "status",
- "description": "HTTP response status code.",
- "type": "integer"
+ "name": "type",
+ "description": "Type of this resource.",
+ "$ref": "ResourceType"
},
{
- "name": "statusText",
- "description": "HTTP response status text.",
- "type": "string"
+ "name": "response",
+ "description": "Cached response data.",
+ "optional": true,
+ "$ref": "Response"
},
{
- "name": "headers",
- "description": "HTTP response headers.",
- "$ref": "Headers"
+ "name": "bodySize",
+ "description": "Cached response body size.",
+ "type": "number"
+ }
+ ]
+ },
+ {
+ "id": "Initiator",
+ "description": "Information about the request initiator.",
+ "type": "object",
+ "properties": [
+ {
+ "name": "type",
+ "description": "Type of this initiator.",
+ "type": "string",
+ "enum": [
+ "parser",
+ "script",
+ "preload",
+ "SignedExchange",
+ "preflight",
+ "FedCM",
+ "other"
+ ]
},
{
- "name": "headersText",
- "description": "HTTP response headers text. This has been replaced by the headers in Network.responseReceivedExtraInfo.",
- "deprecated": true,
+ "name": "stack",
+ "description": "Initiator JavaScript stack trace, set for Script only.\nRequires the Debugger domain to be enabled.",
"optional": true,
- "type": "string"
+ "$ref": "Runtime.StackTrace"
},
{
- "name": "mimeType",
- "description": "Resource mimeType as determined by the browser.",
+ "name": "url",
+ "description": "Initiator URL, set for Parser type or for Script type (when script is importing module) or for SignedExchange type.",
+ "optional": true,
"type": "string"
},
{
- "name": "charset",
- "description": "Resource charset as determined by the browser (if applicable).",
- "type": "string"
+ "name": "lineNumber",
+ "description": "Initiator line number, set for Parser type or for Script type (when script is importing\nmodule) (0-based).",
+ "optional": true,
+ "type": "number"
},
{
- "name": "requestHeaders",
- "description": "Refined HTTP request headers that were actually transmitted over the network.",
+ "name": "columnNumber",
+ "description": "Initiator column number, set for Parser type or for Script type (when script is importing\nmodule) (0-based).",
"optional": true,
- "$ref": "Headers"
+ "type": "number"
},
{
- "name": "requestHeadersText",
- "description": "HTTP request headers text. This has been replaced by the headers in Network.requestWillBeSentExtraInfo.",
- "deprecated": true,
+ "name": "requestId",
+ "description": "Set if another request triggered this request (e.g. preflight).",
"optional": true,
+ "$ref": "RequestId"
+ }
+ ]
+ },
+ {
+ "id": "CookiePartitionKey",
+ "description": "cookiePartitionKey object\nThe representation of the components of the key that are created by the cookiePartitionKey class contained in net/cookies/cookie_partition_key.h.",
+ "experimental": true,
+ "type": "object",
+ "properties": [
+ {
+ "name": "topLevelSite",
+ "description": "The site of the top-level URL the browser was visiting at the start\nof the request to the endpoint that set the cookie.",
"type": "string"
},
{
- "name": "connectionReused",
- "description": "Specifies whether physical connection was actually reused for this request.",
+ "name": "hasCrossSiteAncestor",
+ "description": "Indicates if the cookie has any ancestors that are cross-site to the topLevelSite.",
"type": "boolean"
+ }
+ ]
+ },
+ {
+ "id": "Cookie",
+ "description": "Cookie object",
+ "type": "object",
+ "properties": [
+ {
+ "name": "name",
+ "description": "Cookie name.",
+ "type": "string"
+ },
+ {
+ "name": "value",
+ "description": "Cookie value.",
+ "type": "string"
+ },
+ {
+ "name": "domain",
+ "description": "Cookie domain.",
+ "type": "string"
},
{
- "name": "connectionId",
- "description": "Physical connection id that was actually used for this request.",
- "type": "number"
+ "name": "path",
+ "description": "Cookie path.",
+ "type": "string"
},
{
- "name": "remoteIPAddress",
- "description": "Remote IP address.",
- "optional": true,
- "type": "string"
+ "name": "expires",
+ "description": "Cookie expiration date as the number of seconds since the UNIX epoch.\nThe value is set to -1 if the expiry date is not set.\nThe value can be null for values that cannot be represented in\nJSON (\u00b1Inf).",
+ "type": "number"
},
{
- "name": "remotePort",
- "description": "Remote port.",
- "optional": true,
+ "name": "size",
+ "description": "Cookie size.",
"type": "integer"
},
{
- "name": "fromDiskCache",
- "description": "Specifies that the request was served from the disk cache.",
- "optional": true,
+ "name": "httpOnly",
+ "description": "True if cookie is http-only.",
"type": "boolean"
},
{
- "name": "fromServiceWorker",
- "description": "Specifies that the request was served from the ServiceWorker.",
- "optional": true,
+ "name": "secure",
+ "description": "True if cookie is secure.",
"type": "boolean"
},
{
- "name": "fromPrefetchCache",
- "description": "Specifies that the request was served from the prefetch cache.",
- "optional": true,
+ "name": "session",
+ "description": "True in case of session cookie.",
"type": "boolean"
},
{
- "name": "fromEarlyHints",
- "description": "Specifies that the request was served from the prefetch cache.",
+ "name": "sameSite",
+ "description": "Cookie SameSite type.",
"optional": true,
- "type": "boolean"
+ "$ref": "CookieSameSite"
},
{
- "name": "serviceWorkerRouterInfo",
- "description": "Information about how ServiceWorker Static Router API was used. If this\nfield is set with `matchedSourceType` field, a matching rule is found.\nIf this field is set without `matchedSource`, no matching rule is found.\nOtherwise, the API is not used.",
+ "name": "priority",
+ "description": "Cookie Priority",
"experimental": true,
- "optional": true,
- "$ref": "ServiceWorkerRouterInfo"
+ "$ref": "CookiePriority"
},
{
- "name": "encodedDataLength",
- "description": "Total number of bytes received for this request so far.",
- "type": "number"
+ "name": "sourceScheme",
+ "description": "Cookie source scheme type.",
+ "experimental": true,
+ "$ref": "CookieSourceScheme"
},
{
- "name": "timing",
- "description": "Timing information for the given request.",
- "optional": true,
- "$ref": "ResourceTiming"
+ "name": "sourcePort",
+ "description": "Cookie source port. Valid values are {-1, [1, 65535]}, -1 indicates an unspecified port.\nAn unspecified port value allows protocol clients to emulate legacy cookie scope for the port.\nThis is a temporary ability and it will be removed in the future.",
+ "experimental": true,
+ "type": "integer"
},
{
- "name": "serviceWorkerResponseSource",
- "description": "Response source of response from ServiceWorker.",
+ "name": "partitionKey",
+ "description": "Cookie partition key.",
+ "experimental": true,
"optional": true,
- "$ref": "ServiceWorkerResponseSource"
+ "$ref": "CookiePartitionKey"
},
{
- "name": "responseTime",
- "description": "The time at which the returned response was generated.",
+ "name": "partitionKeyOpaque",
+ "description": "True if cookie partition key is opaque.",
+ "experimental": true,
"optional": true,
- "$ref": "TimeSinceEpoch"
- },
+ "type": "boolean"
+ }
+ ]
+ },
+ {
+ "id": "SetCookieBlockedReason",
+ "description": "Types of reasons why a cookie may not be stored from a response.",
+ "experimental": true,
+ "type": "string",
+ "enum": [
+ "SecureOnly",
+ "SameSiteStrict",
+ "SameSiteLax",
+ "SameSiteUnspecifiedTreatedAsLax",
+ "SameSiteNoneInsecure",
+ "UserPreferences",
+ "ThirdPartyPhaseout",
+ "ThirdPartyBlockedInFirstPartySet",
+ "SyntaxError",
+ "SchemeNotSupported",
+ "OverwriteSecure",
+ "InvalidDomain",
+ "InvalidPrefix",
+ "UnknownError",
+ "SchemefulSameSiteStrict",
+ "SchemefulSameSiteLax",
+ "SchemefulSameSiteUnspecifiedTreatedAsLax",
+ "NameValuePairExceedsMaxSize",
+ "DisallowedCharacter",
+ "NoCookieContent"
+ ]
+ },
+ {
+ "id": "CookieBlockedReason",
+ "description": "Types of reasons why a cookie may not be sent with a request.",
+ "experimental": true,
+ "type": "string",
+ "enum": [
+ "SecureOnly",
+ "NotOnPath",
+ "DomainMismatch",
+ "SameSiteStrict",
+ "SameSiteLax",
+ "SameSiteUnspecifiedTreatedAsLax",
+ "SameSiteNoneInsecure",
+ "UserPreferences",
+ "ThirdPartyPhaseout",
+ "ThirdPartyBlockedInFirstPartySet",
+ "UnknownError",
+ "SchemefulSameSiteStrict",
+ "SchemefulSameSiteLax",
+ "SchemefulSameSiteUnspecifiedTreatedAsLax",
+ "NameValuePairExceedsMaxSize",
+ "PortMismatch",
+ "SchemeMismatch",
+ "AnonymousContext"
+ ]
+ },
+ {
+ "id": "CookieExemptionReason",
+ "description": "Types of reasons why a cookie should have been blocked by 3PCD but is exempted for the request.",
+ "experimental": true,
+ "type": "string",
+ "enum": [
+ "None",
+ "UserSetting",
+ "TPCDMetadata",
+ "TPCDDeprecationTrial",
+ "TopLevelTPCDDeprecationTrial",
+ "TPCDHeuristics",
+ "EnterprisePolicy",
+ "StorageAccess",
+ "TopLevelStorageAccess",
+ "Scheme",
+ "SameSiteNoneCookiesInSandbox"
+ ]
+ },
+ {
+ "id": "BlockedSetCookieWithReason",
+ "description": "A cookie which was not stored from a response with the corresponding reason.",
+ "experimental": true,
+ "type": "object",
+ "properties": [
{
- "name": "cacheStorageCacheName",
- "description": "Cache Storage Cache Name.",
- "optional": true,
- "type": "string"
+ "name": "blockedReasons",
+ "description": "The reason(s) this cookie was blocked.",
+ "type": "array",
+ "items": {
+ "$ref": "SetCookieBlockedReason"
+ }
},
{
- "name": "protocol",
- "description": "Protocol used to fetch this request.",
- "optional": true,
+ "name": "cookieLine",
+ "description": "The string representing this individual cookie as it would appear in the header.\nThis is not the entire \"cookie\" or \"set-cookie\" header which could have multiple cookies.",
"type": "string"
},
{
- "name": "alternateProtocolUsage",
- "description": "The reason why Chrome uses a specific transport protocol for HTTP semantics.",
- "experimental": true,
+ "name": "cookie",
+ "description": "The cookie object which represents the cookie which was not stored. It is optional because\nsometimes complete cookie information is not available, such as in the case of parsing\nerrors.",
"optional": true,
- "$ref": "AlternateProtocolUsage"
+ "$ref": "Cookie"
+ }
+ ]
+ },
+ {
+ "id": "ExemptedSetCookieWithReason",
+ "description": "A cookie should have been blocked by 3PCD but is exempted and stored from a response with the\ncorresponding reason. A cookie could only have at most one exemption reason.",
+ "experimental": true,
+ "type": "object",
+ "properties": [
+ {
+ "name": "exemptionReason",
+ "description": "The reason the cookie was exempted.",
+ "$ref": "CookieExemptionReason"
},
{
- "name": "securityState",
- "description": "Security state of the request resource.",
- "$ref": "Security.SecurityState"
+ "name": "cookieLine",
+ "description": "The string representing this individual cookie as it would appear in the header.",
+ "type": "string"
},
{
- "name": "securityDetails",
- "description": "Security details for the request.",
- "optional": true,
- "$ref": "SecurityDetails"
+ "name": "cookie",
+ "description": "The cookie object representing the cookie.",
+ "$ref": "Cookie"
}
]
},
{
- "id": "WebSocketRequest",
- "description": "WebSocket request data.",
+ "id": "AssociatedCookie",
+ "description": "A cookie associated with the request which may or may not be sent with it.\nIncludes the cookies itself and reasons for blocking or exemption.",
+ "experimental": true,
"type": "object",
"properties": [
{
- "name": "headers",
- "description": "HTTP request headers.",
- "$ref": "Headers"
+ "name": "cookie",
+ "description": "The cookie object representing the cookie which was not sent.",
+ "$ref": "Cookie"
+ },
+ {
+ "name": "blockedReasons",
+ "description": "The reason(s) the cookie was blocked. If empty means the cookie is included.",
+ "type": "array",
+ "items": {
+ "$ref": "CookieBlockedReason"
+ }
+ },
+ {
+ "name": "exemptionReason",
+ "description": "The reason the cookie should have been blocked by 3PCD but is exempted. A cookie could\nonly have at most one exemption reason.",
+ "optional": true,
+ "$ref": "CookieExemptionReason"
}
]
},
{
- "id": "WebSocketResponse",
- "description": "WebSocket response data.",
+ "id": "CookieParam",
+ "description": "Cookie parameter object",
"type": "object",
"properties": [
{
- "name": "status",
- "description": "HTTP response status code.",
- "type": "integer"
+ "name": "name",
+ "description": "Cookie name.",
+ "type": "string"
+ },
+ {
+ "name": "value",
+ "description": "Cookie value.",
+ "type": "string"
+ },
+ {
+ "name": "url",
+ "description": "The request-URI to associate with the setting of the cookie. This value can affect the\ndefault domain, path, source port, and source scheme values of the created cookie.",
+ "optional": true,
+ "type": "string"
+ },
+ {
+ "name": "domain",
+ "description": "Cookie domain.",
+ "optional": true,
+ "type": "string"
},
{
- "name": "statusText",
- "description": "HTTP response status text.",
+ "name": "path",
+ "description": "Cookie path.",
+ "optional": true,
"type": "string"
},
{
- "name": "headers",
- "description": "HTTP response headers.",
- "$ref": "Headers"
+ "name": "secure",
+ "description": "True if cookie is secure.",
+ "optional": true,
+ "type": "boolean"
},
{
- "name": "headersText",
- "description": "HTTP response headers text.",
+ "name": "httpOnly",
+ "description": "True if cookie is http-only.",
"optional": true,
- "type": "string"
+ "type": "boolean"
},
{
- "name": "requestHeaders",
- "description": "HTTP request headers.",
+ "name": "sameSite",
+ "description": "Cookie SameSite type.",
"optional": true,
- "$ref": "Headers"
+ "$ref": "CookieSameSite"
},
{
- "name": "requestHeadersText",
- "description": "HTTP request headers text.",
+ "name": "expires",
+ "description": "Cookie expiration date, session cookie if not set",
"optional": true,
- "type": "string"
- }
- ]
- },
- {
- "id": "WebSocketFrame",
- "description": "WebSocket message data. This represents an entire WebSocket message, not just a fragmented frame as the name suggests.",
- "type": "object",
- "properties": [
+ "$ref": "TimeSinceEpoch"
+ },
{
- "name": "opcode",
- "description": "WebSocket message opcode.",
- "type": "number"
+ "name": "priority",
+ "description": "Cookie Priority.",
+ "experimental": true,
+ "optional": true,
+ "$ref": "CookiePriority"
},
{
- "name": "mask",
- "description": "WebSocket message mask.",
- "type": "boolean"
+ "name": "sourceScheme",
+ "description": "Cookie source scheme type.",
+ "experimental": true,
+ "optional": true,
+ "$ref": "CookieSourceScheme"
},
{
- "name": "payloadData",
- "description": "WebSocket message payload data.\nIf the opcode is 1, this is a text message and payloadData is a UTF-8 string.\nIf the opcode isn't 1, then payloadData is a base64 encoded string representing binary data.",
- "type": "string"
+ "name": "sourcePort",
+ "description": "Cookie source port. Valid values are {-1, [1, 65535]}, -1 indicates an unspecified port.\nAn unspecified port value allows protocol clients to emulate legacy cookie scope for the port.\nThis is a temporary ability and it will be removed in the future.",
+ "experimental": true,
+ "optional": true,
+ "type": "integer"
+ },
+ {
+ "name": "partitionKey",
+ "description": "Cookie partition key. If not set, the cookie will be set as not partitioned.",
+ "experimental": true,
+ "optional": true,
+ "$ref": "CookiePartitionKey"
}
]
},
{
- "id": "CachedResource",
- "description": "Information about the cached resource.",
+ "id": "AuthChallenge",
+ "description": "Authorization challenge for HTTP status code 401 or 407.",
+ "experimental": true,
"type": "object",
"properties": [
{
- "name": "url",
- "description": "Resource URL. This is the url of the original network request.",
- "type": "string"
+ "name": "source",
+ "description": "Source of the authentication challenge.",
+ "optional": true,
+ "type": "string",
+ "enum": [
+ "Server",
+ "Proxy"
+ ]
},
{
- "name": "type",
- "description": "Type of this resource.",
- "$ref": "ResourceType"
+ "name": "origin",
+ "description": "Origin of the challenger.",
+ "type": "string"
},
{
- "name": "response",
- "description": "Cached response data.",
- "optional": true,
- "$ref": "Response"
+ "name": "scheme",
+ "description": "The authentication scheme used, such as basic or digest",
+ "type": "string"
},
{
- "name": "bodySize",
- "description": "Cached response body size.",
- "type": "number"
+ "name": "realm",
+ "description": "The realm of the challenge. May be empty.",
+ "type": "string"
}
]
},
{
- "id": "Initiator",
- "description": "Information about the request initiator.",
+ "id": "AuthChallengeResponse",
+ "description": "Response to an AuthChallenge.",
+ "experimental": true,
"type": "object",
"properties": [
{
- "name": "type",
- "description": "Type of this initiator.",
+ "name": "response",
+ "description": "The decision on what to do in response to the authorization challenge. Default means\ndeferring to the default behavior of the net stack, which will likely either the Cancel\nauthentication or display a popup dialog box.",
"type": "string",
"enum": [
- "parser",
- "script",
- "preload",
- "SignedExchange",
- "preflight",
- "other"
+ "Default",
+ "CancelAuth",
+ "ProvideCredentials"
]
},
{
- "name": "stack",
- "description": "Initiator JavaScript stack trace, set for Script only.\nRequires the Debugger domain to be enabled.",
- "optional": true,
- "$ref": "Runtime.StackTrace"
- },
- {
- "name": "url",
- "description": "Initiator URL, set for Parser type or for Script type (when script is importing module) or for SignedExchange type.",
+ "name": "username",
+ "description": "The username to provide, possibly empty. Should only be set if response is\nProvideCredentials.",
"optional": true,
"type": "string"
},
{
- "name": "lineNumber",
- "description": "Initiator line number, set for Parser type or for Script type (when script is importing\nmodule) (0-based).",
- "optional": true,
- "type": "number"
- },
- {
- "name": "columnNumber",
- "description": "Initiator column number, set for Parser type or for Script type (when script is importing\nmodule) (0-based).",
- "optional": true,
- "type": "number"
- },
- {
- "name": "requestId",
- "description": "Set if another request triggered this request (e.g. preflight).",
+ "name": "password",
+ "description": "The password to provide, possibly empty. Should only be set if response is\nProvideCredentials.",
"optional": true,
- "$ref": "RequestId"
+ "type": "string"
}
]
},
{
- "id": "CookiePartitionKey",
- "description": "cookiePartitionKey object\nThe representation of the components of the key that are created by the cookiePartitionKey class contained in net/cookies/cookie_partition_key.h.",
+ "id": "InterceptionStage",
+ "description": "Stages of the interception to begin intercepting. Request will intercept before the request is\nsent. Response will intercept after the response is received.",
+ "experimental": true,
+ "type": "string",
+ "enum": [
+ "Request",
+ "HeadersReceived"
+ ]
+ },
+ {
+ "id": "RequestPattern",
+ "description": "Request pattern for interception.",
"experimental": true,
"type": "object",
"properties": [
{
- "name": "topLevelSite",
- "description": "The site of the top-level URL the browser was visiting at the start\nof the request to the endpoint that set the cookie.",
+ "name": "urlPattern",
+ "description": "Wildcards (`'*'` -> zero or more, `'?'` -> exactly one) are allowed. Escape character is\nbackslash. Omitting is equivalent to `\"*\"`.",
+ "optional": true,
"type": "string"
},
{
- "name": "hasCrossSiteAncestor",
- "description": "Indicates if the cookie has any ancestors that are cross-site to the topLevelSite.",
- "type": "boolean"
+ "name": "resourceType",
+ "description": "If set, only requests for matching resource types will be intercepted.",
+ "optional": true,
+ "$ref": "ResourceType"
+ },
+ {
+ "name": "interceptionStage",
+ "description": "Stage at which to begin intercepting requests. Default is Request.",
+ "optional": true,
+ "$ref": "InterceptionStage"
}
]
},
{
- "id": "Cookie",
- "description": "Cookie object",
+ "id": "SignedExchangeSignature",
+ "description": "Information about a signed exchange signature.\nhttps://wicg.github.io/webpackage/draft-yasskin-httpbis-origin-signed-exchanges-impl.html#rfc.section.3.1",
+ "experimental": true,
"type": "object",
"properties": [
{
- "name": "name",
- "description": "Cookie name.",
+ "name": "label",
+ "description": "Signed exchange signature label.",
"type": "string"
},
{
- "name": "value",
- "description": "Cookie value.",
+ "name": "signature",
+ "description": "The hex string of signed exchange signature.",
"type": "string"
},
{
- "name": "domain",
- "description": "Cookie domain.",
+ "name": "integrity",
+ "description": "Signed exchange signature integrity.",
"type": "string"
},
{
- "name": "path",
- "description": "Cookie path.",
+ "name": "certUrl",
+ "description": "Signed exchange signature cert Url.",
+ "optional": true,
"type": "string"
},
{
- "name": "expires",
- "description": "Cookie expiration date as the number of seconds since the UNIX epoch.",
- "type": "number"
- },
- {
- "name": "size",
- "description": "Cookie size.",
- "type": "integer"
+ "name": "certSha256",
+ "description": "The hex string of signed exchange signature cert sha256.",
+ "optional": true,
+ "type": "string"
},
{
- "name": "httpOnly",
- "description": "True if cookie is http-only.",
- "type": "boolean"
+ "name": "validityUrl",
+ "description": "Signed exchange signature validity Url.",
+ "type": "string"
},
{
- "name": "secure",
- "description": "True if cookie is secure.",
- "type": "boolean"
+ "name": "date",
+ "description": "Signed exchange signature date.",
+ "type": "integer"
},
{
- "name": "session",
- "description": "True in case of session cookie.",
- "type": "boolean"
+ "name": "expires",
+ "description": "Signed exchange signature expires.",
+ "type": "integer"
},
{
- "name": "sameSite",
- "description": "Cookie SameSite type.",
+ "name": "certificates",
+ "description": "The encoded certificates.",
"optional": true,
- "$ref": "CookieSameSite"
- },
- {
- "name": "priority",
- "description": "Cookie Priority",
- "experimental": true,
- "$ref": "CookiePriority"
- },
+ "type": "array",
+ "items": {
+ "type": "string"
+ }
+ }
+ ]
+ },
+ {
+ "id": "SignedExchangeHeader",
+ "description": "Information about a signed exchange header.\nhttps://wicg.github.io/webpackage/draft-yasskin-httpbis-origin-signed-exchanges-impl.html#cbor-representation",
+ "experimental": true,
+ "type": "object",
+ "properties": [
{
- "name": "sameParty",
- "description": "True if cookie is SameParty.",
- "experimental": true,
- "deprecated": true,
- "type": "boolean"
+ "name": "requestUrl",
+ "description": "Signed exchange request URL.",
+ "type": "string"
},
{
- "name": "sourceScheme",
- "description": "Cookie source scheme type.",
- "experimental": true,
- "$ref": "CookieSourceScheme"
+ "name": "responseCode",
+ "description": "Signed exchange response code.",
+ "type": "integer"
},
{
- "name": "sourcePort",
- "description": "Cookie source port. Valid values are {-1, [1, 65535]}, -1 indicates an unspecified port.\nAn unspecified port value allows protocol clients to emulate legacy cookie scope for the port.\nThis is a temporary ability and it will be removed in the future.",
- "experimental": true,
- "type": "integer"
+ "name": "responseHeaders",
+ "description": "Signed exchange response headers.",
+ "$ref": "Headers"
},
{
- "name": "partitionKey",
- "description": "Cookie partition key.",
- "experimental": true,
- "optional": true,
- "$ref": "CookiePartitionKey"
+ "name": "signatures",
+ "description": "Signed exchange response signature.",
+ "type": "array",
+ "items": {
+ "$ref": "SignedExchangeSignature"
+ }
},
{
- "name": "partitionKeyOpaque",
- "description": "True if cookie partition key is opaque.",
- "experimental": true,
- "optional": true,
- "type": "boolean"
+ "name": "headerIntegrity",
+ "description": "Signed exchange header integrity hash in the form of `sha256-`.",
+ "type": "string"
}
]
},
{
- "id": "SetCookieBlockedReason",
- "description": "Types of reasons why a cookie may not be stored from a response.",
- "experimental": true,
- "type": "string",
- "enum": [
- "SecureOnly",
- "SameSiteStrict",
- "SameSiteLax",
- "SameSiteUnspecifiedTreatedAsLax",
- "SameSiteNoneInsecure",
- "UserPreferences",
- "ThirdPartyPhaseout",
- "ThirdPartyBlockedInFirstPartySet",
- "SyntaxError",
- "SchemeNotSupported",
- "OverwriteSecure",
- "InvalidDomain",
- "InvalidPrefix",
- "UnknownError",
- "SchemefulSameSiteStrict",
- "SchemefulSameSiteLax",
- "SchemefulSameSiteUnspecifiedTreatedAsLax",
- "SamePartyFromCrossPartyContext",
- "SamePartyConflictsWithOtherAttributes",
- "NameValuePairExceedsMaxSize",
- "DisallowedCharacter",
- "NoCookieContent"
- ]
- },
- {
- "id": "CookieBlockedReason",
- "description": "Types of reasons why a cookie may not be sent with a request.",
+ "id": "SignedExchangeErrorField",
+ "description": "Field type for a signed exchange related error.",
"experimental": true,
"type": "string",
"enum": [
- "SecureOnly",
- "NotOnPath",
- "DomainMismatch",
- "SameSiteStrict",
- "SameSiteLax",
- "SameSiteUnspecifiedTreatedAsLax",
- "SameSiteNoneInsecure",
- "UserPreferences",
- "ThirdPartyPhaseout",
- "ThirdPartyBlockedInFirstPartySet",
- "UnknownError",
- "SchemefulSameSiteStrict",
- "SchemefulSameSiteLax",
- "SchemefulSameSiteUnspecifiedTreatedAsLax",
- "SamePartyFromCrossPartyContext",
- "NameValuePairExceedsMaxSize",
- "PortMismatch",
- "SchemeMismatch"
+ "signatureSig",
+ "signatureIntegrity",
+ "signatureCertUrl",
+ "signatureCertSha256",
+ "signatureValidityUrl",
+ "signatureTimestamps"
]
},
{
- "id": "CookieExemptionReason",
- "description": "Types of reasons why a cookie should have been blocked by 3PCD but is exempted for the request.",
+ "id": "SignedExchangeError",
+ "description": "Information about a signed exchange response.",
"experimental": true,
- "type": "string",
- "enum": [
- "None",
- "UserSetting",
- "TPCDMetadata",
- "TPCDDeprecationTrial",
- "TopLevelTPCDDeprecationTrial",
- "TPCDHeuristics",
- "EnterprisePolicy",
- "StorageAccess",
- "TopLevelStorageAccess",
- "Scheme",
- "SameSiteNoneCookiesInSandbox"
+ "type": "object",
+ "properties": [
+ {
+ "name": "message",
+ "description": "Error message.",
+ "type": "string"
+ },
+ {
+ "name": "signatureIndex",
+ "description": "The index of the signature which caused the error.",
+ "optional": true,
+ "type": "integer"
+ },
+ {
+ "name": "errorField",
+ "description": "The field which caused the error.",
+ "optional": true,
+ "$ref": "SignedExchangeErrorField"
+ }
]
},
{
- "id": "BlockedSetCookieWithReason",
- "description": "A cookie which was not stored from a response with the corresponding reason.",
+ "id": "SignedExchangeInfo",
+ "description": "Information about a signed exchange response.",
"experimental": true,
"type": "object",
"properties": [
{
- "name": "blockedReasons",
- "description": "The reason(s) this cookie was blocked.",
- "type": "array",
- "items": {
- "$ref": "SetCookieBlockedReason"
- }
+ "name": "outerResponse",
+ "description": "The outer response of signed HTTP exchange which was received from network.",
+ "$ref": "Response"
},
{
- "name": "cookieLine",
- "description": "The string representing this individual cookie as it would appear in the header.\nThis is not the entire \"cookie\" or \"set-cookie\" header which could have multiple cookies.",
- "type": "string"
+ "name": "hasExtraInfo",
+ "description": "Whether network response for the signed exchange was accompanied by\nextra headers.",
+ "type": "boolean"
},
{
- "name": "cookie",
- "description": "The cookie object which represents the cookie which was not stored. It is optional because\nsometimes complete cookie information is not available, such as in the case of parsing\nerrors.",
+ "name": "header",
+ "description": "Information about the signed exchange header.",
"optional": true,
- "$ref": "Cookie"
+ "$ref": "SignedExchangeHeader"
+ },
+ {
+ "name": "securityDetails",
+ "description": "Security details for the signed exchange header.",
+ "optional": true,
+ "$ref": "SecurityDetails"
+ },
+ {
+ "name": "errors",
+ "description": "Errors occurred while handling the signed exchange.",
+ "optional": true,
+ "type": "array",
+ "items": {
+ "$ref": "SignedExchangeError"
+ }
}
]
},
{
- "id": "ExemptedSetCookieWithReason",
- "description": "A cookie should have been blocked by 3PCD but is exempted and stored from a response with the\ncorresponding reason. A cookie could only have at most one exemption reason.",
+ "id": "ContentEncoding",
+ "description": "List of content encodings supported by the backend.",
+ "experimental": true,
+ "type": "string",
+ "enum": [
+ "deflate",
+ "gzip",
+ "br",
+ "zstd"
+ ]
+ },
+ {
+ "id": "NetworkConditions",
"experimental": true,
"type": "object",
"properties": [
{
- "name": "exemptionReason",
- "description": "The reason the cookie was exempted.",
- "$ref": "CookieExemptionReason"
+ "name": "urlPattern",
+ "description": "Only matching requests will be affected by these conditions. Patterns use the URLPattern constructor string\nsyntax (https://urlpattern.spec.whatwg.org/) and must be absolute. If the pattern is empty, all requests are\nmatched (including p2p connections).",
+ "type": "string"
},
{
- "name": "cookieLine",
- "description": "The string representing this individual cookie as it would appear in the header.",
- "type": "string"
+ "name": "latency",
+ "description": "Minimum latency from request sent to response headers received (ms).",
+ "type": "number"
},
{
- "name": "cookie",
- "description": "The cookie object representing the cookie.",
- "$ref": "Cookie"
+ "name": "downloadThroughput",
+ "description": "Maximal aggregated download throughput (bytes/sec). -1 disables download throttling.",
+ "type": "number"
+ },
+ {
+ "name": "uploadThroughput",
+ "description": "Maximal aggregated upload throughput (bytes/sec). -1 disables upload throttling.",
+ "type": "number"
+ },
+ {
+ "name": "connectionType",
+ "description": "Connection type if known.",
+ "optional": true,
+ "$ref": "ConnectionType"
+ },
+ {
+ "name": "packetLoss",
+ "description": "WebRTC packet loss (percent, 0-100). 0 disables packet loss emulation, 100 drops all the packets.",
+ "optional": true,
+ "type": "number"
+ },
+ {
+ "name": "packetQueueLength",
+ "description": "WebRTC packet queue length (packet). 0 removes any queue length limitations.",
+ "optional": true,
+ "type": "integer"
+ },
+ {
+ "name": "packetReordering",
+ "description": "WebRTC packetReordering feature.",
+ "optional": true,
+ "type": "boolean"
}
]
},
{
- "id": "AssociatedCookie",
- "description": "A cookie associated with the request which may or may not be sent with it.\nIncludes the cookies itself and reasons for blocking or exemption.",
+ "id": "BlockPattern",
"experimental": true,
"type": "object",
"properties": [
{
- "name": "cookie",
- "description": "The cookie object representing the cookie which was not sent.",
- "$ref": "Cookie"
- },
- {
- "name": "blockedReasons",
- "description": "The reason(s) the cookie was blocked. If empty means the cookie is included.",
- "type": "array",
- "items": {
- "$ref": "CookieBlockedReason"
- }
+ "name": "urlPattern",
+ "description": "URL pattern to match. Patterns use the URLPattern constructor string syntax\n(https://urlpattern.spec.whatwg.org/) and must be absolute. Example: `*://*:*/*.css`.",
+ "type": "string"
},
{
- "name": "exemptionReason",
- "description": "The reason the cookie should have been blocked by 3PCD but is exempted. A cookie could\nonly have at most one exemption reason.",
- "optional": true,
- "$ref": "CookieExemptionReason"
+ "name": "block",
+ "description": "Whether or not to block the pattern. If false, a matching request will not be blocked even if it matches a later\n`BlockPattern`.",
+ "type": "boolean"
}
]
},
{
- "id": "CookieParam",
- "description": "Cookie parameter object",
+ "id": "DirectSocketDnsQueryType",
+ "experimental": true,
+ "type": "string",
+ "enum": [
+ "ipv4",
+ "ipv6"
+ ]
+ },
+ {
+ "id": "DirectTCPSocketOptions",
+ "experimental": true,
"type": "object",
"properties": [
{
- "name": "name",
- "description": "Cookie name.",
- "type": "string"
+ "name": "noDelay",
+ "description": "TCP_NODELAY option",
+ "type": "boolean"
},
{
- "name": "value",
- "description": "Cookie value.",
- "type": "string"
+ "name": "keepAliveDelay",
+ "description": "Expected to be unsigned integer.",
+ "optional": true,
+ "type": "number"
},
{
- "name": "url",
- "description": "The request-URI to associate with the setting of the cookie. This value can affect the\ndefault domain, path, source port, and source scheme values of the created cookie.",
+ "name": "sendBufferSize",
+ "description": "Expected to be unsigned integer.",
"optional": true,
- "type": "string"
+ "type": "number"
},
{
- "name": "domain",
- "description": "Cookie domain.",
+ "name": "receiveBufferSize",
+ "description": "Expected to be unsigned integer.",
"optional": true,
- "type": "string"
+ "type": "number"
},
{
- "name": "path",
- "description": "Cookie path.",
+ "name": "dnsQueryType",
+ "optional": true,
+ "$ref": "DirectSocketDnsQueryType"
+ }
+ ]
+ },
+ {
+ "id": "DirectUDPSocketOptions",
+ "experimental": true,
+ "type": "object",
+ "properties": [
+ {
+ "name": "remoteAddr",
"optional": true,
"type": "string"
},
{
- "name": "secure",
- "description": "True if cookie is secure.",
+ "name": "remotePort",
+ "description": "Unsigned int 16.",
"optional": true,
- "type": "boolean"
+ "type": "integer"
},
{
- "name": "httpOnly",
- "description": "True if cookie is http-only.",
+ "name": "localAddr",
"optional": true,
- "type": "boolean"
+ "type": "string"
},
{
- "name": "sameSite",
- "description": "Cookie SameSite type.",
+ "name": "localPort",
+ "description": "Unsigned int 16.",
"optional": true,
- "$ref": "CookieSameSite"
+ "type": "integer"
},
{
- "name": "expires",
- "description": "Cookie expiration date, session cookie if not set",
+ "name": "dnsQueryType",
"optional": true,
- "$ref": "TimeSinceEpoch"
+ "$ref": "DirectSocketDnsQueryType"
},
{
- "name": "priority",
- "description": "Cookie Priority.",
- "experimental": true,
+ "name": "sendBufferSize",
+ "description": "Expected to be unsigned integer.",
"optional": true,
- "$ref": "CookiePriority"
+ "type": "number"
},
{
- "name": "sameParty",
- "description": "True if cookie is SameParty.",
- "experimental": true,
+ "name": "receiveBufferSize",
+ "description": "Expected to be unsigned integer.",
"optional": true,
- "type": "boolean"
+ "type": "number"
},
{
- "name": "sourceScheme",
- "description": "Cookie source scheme type.",
- "experimental": true,
+ "name": "multicastLoopback",
"optional": true,
- "$ref": "CookieSourceScheme"
+ "type": "boolean"
},
{
- "name": "sourcePort",
- "description": "Cookie source port. Valid values are {-1, [1, 65535]}, -1 indicates an unspecified port.\nAn unspecified port value allows protocol clients to emulate legacy cookie scope for the port.\nThis is a temporary ability and it will be removed in the future.",
- "experimental": true,
+ "name": "multicastTimeToLive",
+ "description": "Unsigned int 8.",
"optional": true,
"type": "integer"
},
{
- "name": "partitionKey",
- "description": "Cookie partition key. If not set, the cookie will be set as not partitioned.",
- "experimental": true,
+ "name": "multicastAllowAddressSharing",
"optional": true,
- "$ref": "CookiePartitionKey"
+ "type": "boolean"
}
]
},
{
- "id": "AuthChallenge",
- "description": "Authorization challenge for HTTP status code 401 or 407.",
+ "id": "DirectUDPMessage",
"experimental": true,
"type": "object",
"properties": [
{
- "name": "source",
- "description": "Source of the authentication challenge.",
- "optional": true,
- "type": "string",
- "enum": [
- "Server",
- "Proxy"
- ]
- },
- {
- "name": "origin",
- "description": "Origin of the challenger.",
+ "name": "data",
"type": "string"
},
{
- "name": "scheme",
- "description": "The authentication scheme used, such as basic or digest",
+ "name": "remoteAddr",
+ "description": "Null for connected mode.",
+ "optional": true,
"type": "string"
},
{
- "name": "realm",
- "description": "The realm of the challenge. May be empty.",
- "type": "string"
+ "name": "remotePort",
+ "description": "Null for connected mode.\nExpected to be unsigned integer.",
+ "optional": true,
+ "type": "integer"
}
]
},
{
- "id": "AuthChallengeResponse",
- "description": "Response to an AuthChallenge.",
+ "id": "LocalNetworkAccessRequestPolicy",
"experimental": true,
- "type": "object",
- "properties": [
- {
- "name": "response",
- "description": "The decision on what to do in response to the authorization challenge. Default means\ndeferring to the default behavior of the net stack, which will likely either the Cancel\nauthentication or display a popup dialog box.",
- "type": "string",
- "enum": [
- "Default",
- "CancelAuth",
- "ProvideCredentials"
- ]
- },
- {
- "name": "username",
- "description": "The username to provide, possibly empty. Should only be set if response is\nProvideCredentials.",
- "optional": true,
- "type": "string"
- },
- {
- "name": "password",
- "description": "The password to provide, possibly empty. Should only be set if response is\nProvideCredentials.",
- "optional": true,
- "type": "string"
- }
+ "type": "string",
+ "enum": [
+ "Allow",
+ "BlockFromInsecureToMorePrivate",
+ "WarnFromInsecureToMorePrivate",
+ "PermissionBlock",
+ "PermissionWarn"
]
},
{
- "id": "InterceptionStage",
- "description": "Stages of the interception to begin intercepting. Request will intercept before the request is\nsent. Response will intercept after the response is received.",
+ "id": "IPAddressSpace",
"experimental": true,
"type": "string",
"enum": [
- "Request",
- "HeadersReceived"
+ "Loopback",
+ "Local",
+ "Public",
+ "Unknown"
]
},
{
- "id": "RequestPattern",
- "description": "Request pattern for interception.",
+ "id": "ConnectTiming",
"experimental": true,
"type": "object",
"properties": [
{
- "name": "urlPattern",
- "description": "Wildcards (`'*'` -> zero or more, `'?'` -> exactly one) are allowed. Escape character is\nbackslash. Omitting is equivalent to `\"*\"`.",
- "optional": true,
- "type": "string"
+ "name": "requestTime",
+ "description": "Timing's requestTime is a baseline in seconds, while the other numbers are ticks in\nmilliseconds relatively to this requestTime. Matches ResourceTiming's requestTime for\nthe same request (but not for redirected requests).",
+ "type": "number"
+ }
+ ]
+ },
+ {
+ "id": "ClientSecurityState",
+ "experimental": true,
+ "type": "object",
+ "properties": [
+ {
+ "name": "initiatorIsSecureContext",
+ "type": "boolean"
},
{
- "name": "resourceType",
- "description": "If set, only requests for matching resource types will be intercepted.",
- "optional": true,
- "$ref": "ResourceType"
+ "name": "initiatorIPAddressSpace",
+ "$ref": "IPAddressSpace"
},
{
- "name": "interceptionStage",
- "description": "Stage at which to begin intercepting requests. Default is Request.",
- "optional": true,
- "$ref": "InterceptionStage"
+ "name": "localNetworkAccessRequestPolicy",
+ "$ref": "LocalNetworkAccessRequestPolicy"
}
]
},
{
- "id": "SignedExchangeSignature",
- "description": "Information about a signed exchange signature.\nhttps://wicg.github.io/webpackage/draft-yasskin-httpbis-origin-signed-exchanges-impl.html#rfc.section.3.1",
+ "id": "AdScriptIdentifier",
+ "description": "Identifies the script on the stack that caused a resource or element to be\nlabeled as an ad. For resources, this indicates the context that triggered\nthe fetch. For elements, this indicates the context that caused the element\nto be appended to the DOM.",
"experimental": true,
"type": "object",
"properties": [
{
- "name": "label",
- "description": "Signed exchange signature label.",
- "type": "string"
+ "name": "scriptId",
+ "description": "The script's V8 identifier.",
+ "$ref": "Runtime.ScriptId"
},
{
- "name": "signature",
- "description": "The hex string of signed exchange signature.",
- "type": "string"
+ "name": "debuggerId",
+ "description": "V8's debugging ID for the v8::Context.",
+ "$ref": "Runtime.UniqueDebuggerId"
},
{
- "name": "integrity",
- "description": "Signed exchange signature integrity.",
+ "name": "name",
+ "description": "The script's url (or generated name based on id if inline script).",
"type": "string"
+ }
+ ]
+ },
+ {
+ "id": "AdAncestry",
+ "description": "Encapsulates the script ancestry and the root script filter list rule that\ncaused the resource or element to be labeled as an ad.",
+ "experimental": true,
+ "type": "object",
+ "properties": [
+ {
+ "name": "ancestryChain",
+ "description": "A chain of `AdScriptIdentifier`s representing the ancestry of an ad\nscript that led to the creation of a resource or element. The chain is\nordered from the script itself (lowest level) up to its root ancestor\nthat was flagged by a filter list.",
+ "type": "array",
+ "items": {
+ "$ref": "AdScriptIdentifier"
+ }
},
{
- "name": "certUrl",
- "description": "Signed exchange signature cert Url.",
+ "name": "rootScriptFilterlistRule",
+ "description": "The filter list rule that caused the root (last) script in\n`ancestryChain` to be tagged as an ad.",
"optional": true,
"type": "string"
- },
+ }
+ ]
+ },
+ {
+ "id": "AdProvenance",
+ "description": "Represents the provenance of an ad resource or element. Only one of\n`filterlistRule` or `adScriptAncestry` can be set. If `filterlistRule`\nis provided, the resource URL directly matches a filter list rule. If\n`adScriptAncestry` is provided, an ad script initiated the resource fetch or\nappended the element to the DOM. If neither is provided, the entity is\nknown to be an ad, but provenance tracking information is unavailable.",
+ "experimental": true,
+ "type": "object",
+ "properties": [
{
- "name": "certSha256",
- "description": "The hex string of signed exchange signature cert sha256.",
+ "name": "filterlistRule",
+ "description": "The filterlist rule that matched, if any.",
"optional": true,
"type": "string"
},
{
- "name": "validityUrl",
- "description": "Signed exchange signature validity Url.",
- "type": "string"
+ "name": "adScriptAncestry",
+ "description": "The script ancestry that created the ad, if any.",
+ "optional": true,
+ "$ref": "AdAncestry"
+ }
+ ]
+ },
+ {
+ "id": "CrossOriginOpenerPolicyValue",
+ "experimental": true,
+ "type": "string",
+ "enum": [
+ "SameOrigin",
+ "SameOriginAllowPopups",
+ "RestrictProperties",
+ "UnsafeNone",
+ "SameOriginPlusCoep",
+ "RestrictPropertiesPlusCoep",
+ "NoopenerAllowPopups"
+ ]
+ },
+ {
+ "id": "CrossOriginOpenerPolicyStatus",
+ "experimental": true,
+ "type": "object",
+ "properties": [
+ {
+ "name": "value",
+ "$ref": "CrossOriginOpenerPolicyValue"
},
{
- "name": "date",
- "description": "Signed exchange signature date.",
- "type": "integer"
+ "name": "reportOnlyValue",
+ "$ref": "CrossOriginOpenerPolicyValue"
},
{
- "name": "expires",
- "description": "Signed exchange signature expires.",
- "type": "integer"
+ "name": "reportingEndpoint",
+ "optional": true,
+ "type": "string"
},
{
- "name": "certificates",
- "description": "The encoded certificates.",
+ "name": "reportOnlyReportingEndpoint",
"optional": true,
- "type": "array",
- "items": {
- "type": "string"
- }
+ "type": "string"
}
]
},
{
- "id": "SignedExchangeHeader",
- "description": "Information about a signed exchange header.\nhttps://wicg.github.io/webpackage/draft-yasskin-httpbis-origin-signed-exchanges-impl.html#cbor-representation",
+ "id": "CrossOriginEmbedderPolicyValue",
+ "experimental": true,
+ "type": "string",
+ "enum": [
+ "None",
+ "Credentialless",
+ "RequireCorp"
+ ]
+ },
+ {
+ "id": "CrossOriginEmbedderPolicyStatus",
"experimental": true,
"type": "object",
"properties": [
{
- "name": "requestUrl",
- "description": "Signed exchange request URL.",
- "type": "string"
- },
- {
- "name": "responseCode",
- "description": "Signed exchange response code.",
- "type": "integer"
+ "name": "value",
+ "$ref": "CrossOriginEmbedderPolicyValue"
},
{
- "name": "responseHeaders",
- "description": "Signed exchange response headers.",
- "$ref": "Headers"
+ "name": "reportOnlyValue",
+ "$ref": "CrossOriginEmbedderPolicyValue"
},
{
- "name": "signatures",
- "description": "Signed exchange response signature.",
- "type": "array",
- "items": {
- "$ref": "SignedExchangeSignature"
- }
+ "name": "reportingEndpoint",
+ "optional": true,
+ "type": "string"
},
{
- "name": "headerIntegrity",
- "description": "Signed exchange header integrity hash in the form of `sha256-`.",
+ "name": "reportOnlyReportingEndpoint",
+ "optional": true,
"type": "string"
}
]
},
{
- "id": "SignedExchangeErrorField",
- "description": "Field type for a signed exchange related error.",
+ "id": "ContentSecurityPolicySource",
"experimental": true,
"type": "string",
"enum": [
- "signatureSig",
- "signatureIntegrity",
- "signatureCertUrl",
- "signatureCertSha256",
- "signatureValidityUrl",
- "signatureTimestamps"
+ "HTTP",
+ "Meta"
]
},
{
- "id": "SignedExchangeError",
- "description": "Information about a signed exchange response.",
+ "id": "ContentSecurityPolicyStatus",
"experimental": true,
"type": "object",
"properties": [
{
- "name": "message",
- "description": "Error message.",
+ "name": "effectiveDirectives",
"type": "string"
},
{
- "name": "signatureIndex",
- "description": "The index of the signature which caused the error.",
- "optional": true,
- "type": "integer"
+ "name": "isEnforced",
+ "type": "boolean"
},
{
- "name": "errorField",
- "description": "The field which caused the error.",
- "optional": true,
- "$ref": "SignedExchangeErrorField"
+ "name": "source",
+ "$ref": "ContentSecurityPolicySource"
}
]
},
{
- "id": "SignedExchangeInfo",
- "description": "Information about a signed exchange response.",
+ "id": "SecurityIsolationStatus",
"experimental": true,
"type": "object",
"properties": [
{
- "name": "outerResponse",
- "description": "The outer response of signed HTTP exchange which was received from network.",
- "$ref": "Response"
- },
- {
- "name": "header",
- "description": "Information about the signed exchange header.",
+ "name": "coop",
"optional": true,
- "$ref": "SignedExchangeHeader"
+ "$ref": "CrossOriginOpenerPolicyStatus"
},
{
- "name": "securityDetails",
- "description": "Security details for the signed exchange header.",
+ "name": "coep",
"optional": true,
- "$ref": "SecurityDetails"
+ "$ref": "CrossOriginEmbedderPolicyStatus"
},
{
- "name": "errors",
- "description": "Errors occurred while handling the signed exchange.",
+ "name": "csp",
"optional": true,
"type": "array",
"items": {
- "$ref": "SignedExchangeError"
+ "$ref": "ContentSecurityPolicyStatus"
}
}
]
},
{
- "id": "ContentEncoding",
- "description": "List of content encodings supported by the backend.",
+ "id": "ReportStatus",
+ "description": "The status of a Reporting API report.",
"experimental": true,
"type": "string",
"enum": [
- "deflate",
- "gzip",
- "br",
- "zstd"
+ "Queued",
+ "Pending",
+ "MarkedForRemoval",
+ "Success"
]
},
{
- "id": "DirectSocketDnsQueryType",
+ "id": "ReportId",
"experimental": true,
- "type": "string",
- "enum": [
- "ipv4",
- "ipv6"
- ]
+ "type": "string"
},
{
- "id": "DirectTCPSocketOptions",
+ "id": "ReportingApiReport",
+ "description": "An object representing a report generated by the Reporting API.",
"experimental": true,
"type": "object",
"properties": [
{
- "name": "noDelay",
- "description": "TCP_NODELAY option",
- "type": "boolean"
+ "name": "id",
+ "$ref": "ReportId"
},
{
- "name": "keepAliveDelay",
- "description": "Expected to be unsigned integer.",
- "optional": true,
- "type": "number"
+ "name": "initiatorUrl",
+ "description": "The URL of the document that triggered the report.",
+ "type": "string"
},
{
- "name": "sendBufferSize",
- "description": "Expected to be unsigned integer.",
- "optional": true,
- "type": "number"
+ "name": "destination",
+ "description": "The name of the endpoint group that should be used to deliver the report.",
+ "type": "string"
},
{
- "name": "receiveBufferSize",
- "description": "Expected to be unsigned integer.",
- "optional": true,
- "type": "number"
+ "name": "type",
+ "description": "The type of the report (specifies the set of data that is contained in the report body).",
+ "type": "string"
},
{
- "name": "dnsQueryType",
- "optional": true,
- "$ref": "DirectSocketDnsQueryType"
+ "name": "timestamp",
+ "description": "When the report was generated.",
+ "$ref": "Network.TimeSinceEpoch"
+ },
+ {
+ "name": "depth",
+ "description": "How many uploads deep the related request was.",
+ "type": "integer"
+ },
+ {
+ "name": "completedAttempts",
+ "description": "The number of delivery attempts made so far, not including an active attempt.",
+ "type": "integer"
+ },
+ {
+ "name": "body",
+ "type": "object"
+ },
+ {
+ "name": "status",
+ "$ref": "ReportStatus"
}
]
},
{
- "id": "PrivateNetworkRequestPolicy",
- "experimental": true,
- "type": "string",
- "enum": [
- "Allow",
- "BlockFromInsecureToMorePrivate",
- "WarnFromInsecureToMorePrivate",
- "PreflightBlock",
- "PreflightWarn",
- "PermissionBlock"
- ]
- },
- {
- "id": "IPAddressSpace",
- "experimental": true,
- "type": "string",
- "enum": [
- "Local",
- "Private",
- "Public",
- "Unknown"
- ]
- },
- {
- "id": "ConnectTiming",
+ "id": "ReportingApiEndpoint",
"experimental": true,
"type": "object",
"properties": [
{
- "name": "requestTime",
- "description": "Timing's requestTime is a baseline in seconds, while the other numbers are ticks in\nmilliseconds relatively to this requestTime. Matches ResourceTiming's requestTime for\nthe same request (but not for redirected requests).",
- "type": "number"
+ "name": "url",
+ "description": "The URL of the endpoint to which reports may be delivered.",
+ "type": "string"
+ },
+ {
+ "name": "groupName",
+ "description": "Name of the endpoint group.",
+ "type": "string"
}
]
},
{
- "id": "ClientSecurityState",
+ "id": "DeviceBoundSessionKey",
+ "description": "Unique identifier for a device bound session.",
"experimental": true,
"type": "object",
"properties": [
{
- "name": "initiatorIsSecureContext",
- "type": "boolean"
- },
- {
- "name": "initiatorIPAddressSpace",
- "$ref": "IPAddressSpace"
+ "name": "site",
+ "description": "The site the session is set up for.",
+ "type": "string"
},
{
- "name": "privateNetworkRequestPolicy",
- "$ref": "PrivateNetworkRequestPolicy"
+ "name": "id",
+ "description": "The id of the session.",
+ "type": "string"
}
]
},
{
- "id": "CrossOriginOpenerPolicyValue",
+ "id": "DeviceBoundSessionWithUsage",
+ "description": "How a device bound session was used during a request.",
"experimental": true,
- "type": "string",
- "enum": [
- "SameOrigin",
- "SameOriginAllowPopups",
- "RestrictProperties",
- "UnsafeNone",
- "SameOriginPlusCoep",
- "RestrictPropertiesPlusCoep",
- "NoopenerAllowPopups"
+ "type": "object",
+ "properties": [
+ {
+ "name": "sessionKey",
+ "description": "The key for the session.",
+ "$ref": "DeviceBoundSessionKey"
+ },
+ {
+ "name": "usage",
+ "description": "How the session was used (or not used).",
+ "type": "string",
+ "enum": [
+ "NotInScope",
+ "InScopeRefreshNotYetNeeded",
+ "InScopeRefreshNotAllowed",
+ "ProactiveRefreshNotPossible",
+ "ProactiveRefreshAttempted",
+ "Deferred"
+ ]
+ }
]
},
{
- "id": "CrossOriginOpenerPolicyStatus",
+ "id": "DeviceBoundSessionCookieCraving",
+ "description": "A device bound session's cookie craving.",
"experimental": true,
"type": "object",
"properties": [
{
- "name": "value",
- "$ref": "CrossOriginOpenerPolicyValue"
+ "name": "name",
+ "description": "The name of the craving.",
+ "type": "string"
+ },
+ {
+ "name": "domain",
+ "description": "The domain of the craving.",
+ "type": "string"
+ },
+ {
+ "name": "path",
+ "description": "The path of the craving.",
+ "type": "string"
},
{
- "name": "reportOnlyValue",
- "$ref": "CrossOriginOpenerPolicyValue"
+ "name": "secure",
+ "description": "The `Secure` attribute of the craving attributes.",
+ "type": "boolean"
},
{
- "name": "reportingEndpoint",
- "optional": true,
- "type": "string"
+ "name": "httpOnly",
+ "description": "The `HttpOnly` attribute of the craving attributes.",
+ "type": "boolean"
},
{
- "name": "reportOnlyReportingEndpoint",
+ "name": "sameSite",
+ "description": "The `SameSite` attribute of the craving attributes.",
"optional": true,
- "type": "string"
+ "$ref": "CookieSameSite"
}
]
},
{
- "id": "CrossOriginEmbedderPolicyValue",
- "experimental": true,
- "type": "string",
- "enum": [
- "None",
- "Credentialless",
- "RequireCorp"
- ]
- },
- {
- "id": "CrossOriginEmbedderPolicyStatus",
+ "id": "DeviceBoundSessionUrlRule",
+ "description": "A device bound session's inclusion URL rule.",
"experimental": true,
"type": "object",
"properties": [
{
- "name": "value",
- "$ref": "CrossOriginEmbedderPolicyValue"
- },
- {
- "name": "reportOnlyValue",
- "$ref": "CrossOriginEmbedderPolicyValue"
+ "name": "ruleType",
+ "description": "See comments on `net::device_bound_sessions::SessionInclusionRules::UrlRule::rule_type`.",
+ "type": "string",
+ "enum": [
+ "Exclude",
+ "Include"
+ ]
},
{
- "name": "reportingEndpoint",
- "optional": true,
+ "name": "hostPattern",
+ "description": "See comments on `net::device_bound_sessions::SessionInclusionRules::UrlRule::host_pattern`.",
"type": "string"
},
{
- "name": "reportOnlyReportingEndpoint",
- "optional": true,
+ "name": "pathPrefix",
+ "description": "See comments on `net::device_bound_sessions::SessionInclusionRules::UrlRule::path_prefix`.",
"type": "string"
}
]
},
{
- "id": "ContentSecurityPolicySource",
- "experimental": true,
- "type": "string",
- "enum": [
- "HTTP",
- "Meta"
- ]
- },
- {
- "id": "ContentSecurityPolicyStatus",
+ "id": "DeviceBoundSessionInclusionRules",
+ "description": "A device bound session's inclusion rules.",
"experimental": true,
"type": "object",
"properties": [
{
- "name": "effectiveDirectives",
+ "name": "origin",
+ "description": "See comments on `net::device_bound_sessions::SessionInclusionRules::origin_`.",
"type": "string"
},
{
- "name": "isEnforced",
+ "name": "includeSite",
+ "description": "Whether the whole site is included. See comments on\n`net::device_bound_sessions::SessionInclusionRules::include_site_` for more\ndetails; this boolean is true if that value is populated.",
"type": "boolean"
},
{
- "name": "source",
- "$ref": "ContentSecurityPolicySource"
+ "name": "urlRules",
+ "description": "See comments on `net::device_bound_sessions::SessionInclusionRules::url_rules_`.",
+ "type": "array",
+ "items": {
+ "$ref": "DeviceBoundSessionUrlRule"
+ }
}
]
},
{
- "id": "SecurityIsolationStatus",
+ "id": "DeviceBoundSession",
+ "description": "A device bound session.",
"experimental": true,
"type": "object",
"properties": [
{
- "name": "coop",
- "optional": true,
- "$ref": "CrossOriginOpenerPolicyStatus"
+ "name": "key",
+ "description": "The site and session ID of the session.",
+ "$ref": "DeviceBoundSessionKey"
},
{
- "name": "coep",
- "optional": true,
- "$ref": "CrossOriginEmbedderPolicyStatus"
+ "name": "refreshUrl",
+ "description": "See comments on `net::device_bound_sessions::Session::refresh_url_`.",
+ "type": "string"
},
{
- "name": "csp",
+ "name": "inclusionRules",
+ "description": "See comments on `net::device_bound_sessions::Session::inclusion_rules_`.",
+ "$ref": "DeviceBoundSessionInclusionRules"
+ },
+ {
+ "name": "cookieCravings",
+ "description": "See comments on `net::device_bound_sessions::Session::cookie_cravings_`.",
+ "type": "array",
+ "items": {
+ "$ref": "DeviceBoundSessionCookieCraving"
+ }
+ },
+ {
+ "name": "expiryDate",
+ "description": "See comments on `net::device_bound_sessions::Session::expiry_date_`.",
+ "$ref": "Network.TimeSinceEpoch"
+ },
+ {
+ "name": "cachedChallenge",
+ "description": "See comments on `net::device_bound_sessions::Session::cached_challenge__`.",
"optional": true,
+ "type": "string"
+ },
+ {
+ "name": "allowedRefreshInitiators",
+ "description": "See comments on `net::device_bound_sessions::Session::allowed_refresh_initiators_`.",
"type": "array",
"items": {
- "$ref": "ContentSecurityPolicyStatus"
+ "type": "string"
}
}
]
},
{
- "id": "ReportStatus",
- "description": "The status of a Reporting API report.",
- "experimental": true,
- "type": "string",
- "enum": [
- "Queued",
- "Pending",
- "MarkedForRemoval",
- "Success"
- ]
- },
- {
- "id": "ReportId",
+ "id": "DeviceBoundSessionEventId",
+ "description": "A unique identifier for a device bound session event.",
"experimental": true,
"type": "string"
},
{
- "id": "ReportingApiReport",
- "description": "An object representing a report generated by the Reporting API.",
+ "id": "DeviceBoundSessionFetchResult",
+ "description": "A fetch result for a device bound session creation or refresh.",
+ "experimental": true,
+ "type": "string",
+ "enum": [
+ "Success",
+ "KeyError",
+ "SigningError",
+ "ServerRequestedTermination",
+ "InvalidSessionId",
+ "InvalidChallenge",
+ "TooManyChallenges",
+ "InvalidFetcherUrl",
+ "InvalidRefreshUrl",
+ "TransientHttpError",
+ "ScopeOriginSameSiteMismatch",
+ "RefreshUrlSameSiteMismatch",
+ "MismatchedSessionId",
+ "MissingScope",
+ "NoCredentials",
+ "SubdomainRegistrationWellKnownUnavailable",
+ "SubdomainRegistrationUnauthorized",
+ "SubdomainRegistrationWellKnownMalformed",
+ "SessionProviderWellKnownUnavailable",
+ "RelyingPartyWellKnownUnavailable",
+ "FederatedKeyThumbprintMismatch",
+ "InvalidFederatedSessionUrl",
+ "InvalidFederatedKey",
+ "TooManyRelyingOriginLabels",
+ "BoundCookieSetForbidden",
+ "NetError",
+ "ProxyError",
+ "EmptySessionConfig",
+ "InvalidCredentialsConfig",
+ "InvalidCredentialsType",
+ "InvalidCredentialsEmptyName",
+ "InvalidCredentialsCookie",
+ "PersistentHttpError",
+ "RegistrationAttemptedChallenge",
+ "InvalidScopeOrigin",
+ "ScopeOriginContainsPath",
+ "RefreshInitiatorNotString",
+ "RefreshInitiatorInvalidHostPattern",
+ "InvalidScopeSpecification",
+ "MissingScopeSpecificationType",
+ "EmptyScopeSpecificationDomain",
+ "EmptyScopeSpecificationPath",
+ "InvalidScopeSpecificationType",
+ "InvalidScopeIncludeSite",
+ "MissingScopeIncludeSite",
+ "FederatedNotAuthorizedByProvider",
+ "FederatedNotAuthorizedByRelyingParty",
+ "SessionProviderWellKnownMalformed",
+ "SessionProviderWellKnownHasProviderOrigin",
+ "RelyingPartyWellKnownMalformed",
+ "RelyingPartyWellKnownHasRelyingOrigins",
+ "InvalidFederatedSessionProviderSessionMissing",
+ "InvalidFederatedSessionWrongProviderOrigin",
+ "InvalidCredentialsCookieCreationTime",
+ "InvalidCredentialsCookieName",
+ "InvalidCredentialsCookieParsing",
+ "InvalidCredentialsCookieUnpermittedAttribute",
+ "InvalidCredentialsCookieInvalidDomain",
+ "InvalidCredentialsCookiePrefix",
+ "InvalidScopeRulePath",
+ "InvalidScopeRuleHostPattern",
+ "ScopeRuleOriginScopedHostPatternMismatch",
+ "ScopeRuleSiteScopedHostPatternMismatch",
+ "SigningQuotaExceeded",
+ "InvalidConfigJson",
+ "InvalidFederatedSessionProviderFailedToRestoreKey",
+ "FailedToUnwrapKey",
+ "SessionDeletedDuringRefresh"
+ ]
+ },
+ {
+ "id": "DeviceBoundSessionFailedRequest",
+ "description": "Details about a failed device bound session network request.",
"experimental": true,
"type": "object",
"properties": [
{
- "name": "id",
- "$ref": "ReportId"
+ "name": "requestUrl",
+ "description": "The failed request URL.",
+ "type": "string"
},
{
- "name": "initiatorUrl",
- "description": "The URL of the document that triggered the report.",
+ "name": "netError",
+ "description": "The net error of the response if it was not OK.",
+ "optional": true,
"type": "string"
},
{
- "name": "destination",
- "description": "The name of the endpoint group that should be used to deliver the report.",
- "type": "string"
+ "name": "responseError",
+ "description": "The response code if the net error was OK and the response code was not\n200.",
+ "optional": true,
+ "type": "integer"
},
{
- "name": "type",
- "description": "The type of the report (specifies the set of data that is contained in the report body).",
+ "name": "responseErrorBody",
+ "description": "The body of the response if the net error was OK, the response code was\nnot 200, and the response body was not empty.",
+ "optional": true,
"type": "string"
+ }
+ ]
+ },
+ {
+ "id": "CreationEventDetails",
+ "description": "Session event details specific to creation.",
+ "experimental": true,
+ "type": "object",
+ "properties": [
+ {
+ "name": "fetchResult",
+ "description": "The result of the fetch attempt.",
+ "$ref": "DeviceBoundSessionFetchResult"
},
{
- "name": "timestamp",
- "description": "When the report was generated.",
- "$ref": "Network.TimeSinceEpoch"
+ "name": "newSession",
+ "description": "The session if there was a newly created session. This is populated for\nall successful creation events.",
+ "optional": true,
+ "$ref": "DeviceBoundSession"
},
{
- "name": "depth",
- "description": "How many uploads deep the related request was.",
- "type": "integer"
+ "name": "failedRequest",
+ "description": "Details about a failed device bound session network request if there was\none.",
+ "optional": true,
+ "$ref": "DeviceBoundSessionFailedRequest"
+ }
+ ]
+ },
+ {
+ "id": "RefreshEventDetails",
+ "description": "Session event details specific to refresh.",
+ "experimental": true,
+ "type": "object",
+ "properties": [
+ {
+ "name": "refreshResult",
+ "description": "The result of a refresh.",
+ "type": "string",
+ "enum": [
+ "Refreshed",
+ "InitializedService",
+ "Unreachable",
+ "ServerError",
+ "RefreshQuotaExceeded",
+ "FatalError",
+ "SigningQuotaExceeded"
+ ]
},
{
- "name": "completedAttempts",
- "description": "The number of delivery attempts made so far, not including an active attempt.",
- "type": "integer"
+ "name": "fetchResult",
+ "description": "If there was a fetch attempt, the result of that.",
+ "optional": true,
+ "$ref": "DeviceBoundSessionFetchResult"
},
{
- "name": "body",
- "type": "object"
+ "name": "newSession",
+ "description": "The session display if there was a newly created session. This is populated\nfor any refresh event that modifies the session config.",
+ "optional": true,
+ "$ref": "DeviceBoundSession"
},
{
- "name": "status",
- "$ref": "ReportStatus"
+ "name": "wasFullyProactiveRefresh",
+ "description": "See comments on `net::device_bound_sessions::RefreshEventResult::was_fully_proactive_refresh`.",
+ "type": "boolean"
+ },
+ {
+ "name": "failedRequest",
+ "description": "Details about a failed device bound session network request if there was\none.",
+ "optional": true,
+ "$ref": "DeviceBoundSessionFailedRequest"
}
]
},
{
- "id": "ReportingApiEndpoint",
+ "id": "TerminationEventDetails",
+ "description": "Session event details specific to termination.",
"experimental": true,
"type": "object",
"properties": [
{
- "name": "url",
- "description": "The URL of the endpoint to which reports may be delivered.",
- "type": "string"
+ "name": "deletionReason",
+ "description": "The reason for a session being deleted.",
+ "type": "string",
+ "enum": [
+ "Expired",
+ "FailedToRestoreKey",
+ "FailedToUnwrapKey",
+ "StoragePartitionCleared",
+ "ClearBrowsingData",
+ "ServerRequested",
+ "InvalidSessionParams",
+ "RefreshFatalError"
+ ]
+ }
+ ]
+ },
+ {
+ "id": "ChallengeEventDetails",
+ "description": "Session event details specific to challenges.",
+ "experimental": true,
+ "type": "object",
+ "properties": [
+ {
+ "name": "challengeResult",
+ "description": "The result of a challenge.",
+ "type": "string",
+ "enum": [
+ "Success",
+ "NoSessionId",
+ "NoSessionMatch",
+ "CantSetBoundCookie"
+ ]
},
{
- "name": "groupName",
- "description": "Name of the endpoint group.",
+ "name": "challenge",
+ "description": "The challenge set.",
"type": "string"
}
]
@@ -14959,12 +18159,97 @@
]
},
{
- "name": "disable",
- "description": "Disables network tracking, prevents network events from being sent to the client."
- },
- {
- "name": "emulateNetworkConditions",
- "description": "Activates emulation of network conditions.",
+ "name": "disable",
+ "description": "Disables network tracking, prevents network events from being sent to the client."
+ },
+ {
+ "name": "emulateNetworkConditions",
+ "description": "Activates emulation of network conditions. This command is deprecated in favor of the emulateNetworkConditionsByRule\nand overrideNetworkState commands, which can be used together to the same effect.",
+ "deprecated": true,
+ "parameters": [
+ {
+ "name": "offline",
+ "description": "True to emulate internet disconnection.",
+ "type": "boolean"
+ },
+ {
+ "name": "latency",
+ "description": "Minimum latency from request sent to response headers received (ms).",
+ "type": "number"
+ },
+ {
+ "name": "downloadThroughput",
+ "description": "Maximal aggregated download throughput (bytes/sec). -1 disables download throttling.",
+ "type": "number"
+ },
+ {
+ "name": "uploadThroughput",
+ "description": "Maximal aggregated upload throughput (bytes/sec). -1 disables upload throttling.",
+ "type": "number"
+ },
+ {
+ "name": "connectionType",
+ "description": "Connection type if known.",
+ "optional": true,
+ "$ref": "ConnectionType"
+ },
+ {
+ "name": "packetLoss",
+ "description": "WebRTC packet loss (percent, 0-100). 0 disables packet loss emulation, 100 drops all the packets.",
+ "experimental": true,
+ "optional": true,
+ "type": "number"
+ },
+ {
+ "name": "packetQueueLength",
+ "description": "WebRTC packet queue length (packet). 0 removes any queue length limitations.",
+ "experimental": true,
+ "optional": true,
+ "type": "integer"
+ },
+ {
+ "name": "packetReordering",
+ "description": "WebRTC packetReordering feature.",
+ "experimental": true,
+ "optional": true,
+ "type": "boolean"
+ }
+ ]
+ },
+ {
+ "name": "emulateNetworkConditionsByRule",
+ "description": "Activates emulation of network conditions for individual requests using URL match patterns. Unlike the deprecated\nNetwork.emulateNetworkConditions this method does not affect `navigator` state. Use Network.overrideNetworkState to\nexplicitly modify `navigator` behavior.",
+ "experimental": true,
+ "parameters": [
+ {
+ "name": "offline",
+ "description": "True to emulate internet disconnection.",
+ "type": "boolean"
+ },
+ {
+ "name": "matchedNetworkConditions",
+ "description": "Configure conditions for matching requests. If multiple entries match a request, the first entry wins. Global\nconditions can be configured by leaving the urlPattern for the conditions empty. These global conditions are\nalso applied for throttling of p2p connections.",
+ "type": "array",
+ "items": {
+ "$ref": "NetworkConditions"
+ }
+ }
+ ],
+ "returns": [
+ {
+ "name": "ruleIds",
+ "description": "An id for each entry in matchedNetworkConditions. The id will be included in the requestWillBeSentExtraInfo for\nrequests affected by a rule.",
+ "type": "array",
+ "items": {
+ "type": "string"
+ }
+ }
+ ]
+ },
+ {
+ "name": "overrideNetworkState",
+ "description": "Override the state of navigator.onLine and navigator.connection.",
+ "experimental": true,
"parameters": [
{
"name": "offline",
@@ -14991,24 +18276,43 @@
"description": "Connection type if known.",
"optional": true,
"$ref": "ConnectionType"
- },
+ }
+ ]
+ },
+ {
+ "name": "enable",
+ "description": "Enables network tracking, network events will now be delivered to the client.",
+ "parameters": [
{
- "name": "packetLoss",
- "description": "WebRTC packet loss (percent, 0-100). 0 disables packet loss emulation, 100 drops all the packets.",
+ "name": "maxTotalBufferSize",
+ "description": "Buffer size in bytes to use when preserving network payloads (XHRs, etc).\nThis is the maximum number of bytes that will be collected by this\nDevTools session.",
"experimental": true,
"optional": true,
- "type": "number"
+ "type": "integer"
},
{
- "name": "packetQueueLength",
- "description": "WebRTC packet queue length (packet). 0 removes any queue length limitations.",
+ "name": "maxResourceBufferSize",
+ "description": "Per-resource buffer size in bytes to use when preserving network payloads (XHRs, etc).",
"experimental": true,
"optional": true,
"type": "integer"
},
{
- "name": "packetReordering",
- "description": "WebRTC packetReordering feature.",
+ "name": "maxPostDataSize",
+ "description": "Longest post body size (in bytes) that would be included in requestWillBeSent notification",
+ "optional": true,
+ "type": "integer"
+ },
+ {
+ "name": "reportDirectSocketTraffic",
+ "description": "Whether DirectSocket chunk send/receive events should be reported.",
+ "experimental": true,
+ "optional": true,
+ "type": "boolean"
+ },
+ {
+ "name": "enableDurableMessages",
+ "description": "Enable storing response bodies outside of renderer, so that these survive\na cross-process navigation. Requires maxTotalBufferSize to be set.\nCurrently defaults to false. This field is being deprecated in favor of the dedicated\nconfigureDurableMessages command, due to the possibility of deadlocks when awaiting\nNetwork.enable before issuing Runtime.runIfWaitingForDebugger.",
"experimental": true,
"optional": true,
"type": "boolean"
@@ -15016,26 +18320,19 @@
]
},
{
- "name": "enable",
- "description": "Enables network tracking, network events will now be delivered to the client.",
+ "name": "configureDurableMessages",
+ "description": "Configures storing response bodies outside of renderer, so that these survive\na cross-process navigation.\nIf maxTotalBufferSize is not set, durable messages are disabled.",
+ "experimental": true,
"parameters": [
{
"name": "maxTotalBufferSize",
"description": "Buffer size in bytes to use when preserving network payloads (XHRs, etc).",
- "experimental": true,
"optional": true,
"type": "integer"
},
{
"name": "maxResourceBufferSize",
"description": "Per-resource buffer size in bytes to use when preserving network payloads (XHRs, etc).",
- "experimental": true,
- "optional": true,
- "type": "integer"
- },
- {
- "name": "maxPostDataSize",
- "description": "Longest post body size (in bytes) that would be included in requestWillBeSent notification",
"optional": true,
"type": "integer"
}
@@ -15140,6 +18437,11 @@
"name": "postData",
"description": "Request body string, omitting files from multipart requests",
"type": "string"
+ },
+ {
+ "name": "base64Encoded",
+ "description": "True, if content was sent as base64.",
+ "type": "boolean"
}
]
},
@@ -15240,9 +18542,20 @@
"description": "Blocks URLs from loading.",
"experimental": true,
"parameters": [
+ {
+ "name": "urlPatterns",
+ "description": "Patterns to match in the order in which they are given. These patterns\nalso take precedence over any wildcard patterns defined in `urls`.",
+ "optional": true,
+ "type": "array",
+ "items": {
+ "$ref": "BlockPattern"
+ }
+ },
{
"name": "urls",
"description": "URL patterns to block. Wildcards ('*') are allowed.",
+ "deprecated": true,
+ "optional": true,
"type": "array",
"items": {
"type": "string"
@@ -15335,13 +18648,6 @@
"optional": true,
"$ref": "CookiePriority"
},
- {
- "name": "sameParty",
- "description": "True if cookie is SameParty.",
- "experimental": true,
- "optional": true,
- "type": "boolean"
- },
{
"name": "sourceScheme",
"description": "Cookie source scheme type.",
@@ -15507,6 +18813,37 @@
}
]
},
+ {
+ "name": "enableDeviceBoundSessions",
+ "description": "Sets up tracking device bound sessions and fetching of initial set of sessions.",
+ "experimental": true,
+ "parameters": [
+ {
+ "name": "enable",
+ "description": "Whether to enable or disable events.",
+ "type": "boolean"
+ }
+ ]
+ },
+ {
+ "name": "fetchSchemefulSite",
+ "description": "Fetches the schemeful site for a specific origin.",
+ "experimental": true,
+ "parameters": [
+ {
+ "name": "origin",
+ "description": "The URL origin.",
+ "type": "string"
+ }
+ ],
+ "returns": [
+ {
+ "name": "schemefulSite",
+ "description": "The corresponding schemeful site.",
+ "type": "string"
+ }
+ ]
+ },
{
"name": "loadNetworkResource",
"description": "Fetches the resource and returns the content.",
@@ -15538,7 +18875,7 @@
},
{
"name": "setCookieControls",
- "description": "Sets Controls for third-party cookie access\nPage reload is required before the new cookie bahavior will be observed",
+ "description": "Sets Controls for third-party cookie access\nPage reload is required before the new cookie behavior will be observed",
"experimental": true,
"parameters": [
{
@@ -15842,6 +19179,13 @@
"description": "Whether the request is initiated by a user gesture. Defaults to false.",
"optional": true,
"type": "boolean"
+ },
+ {
+ "name": "renderBlockingBehavior",
+ "description": "The render-blocking behavior of the request.",
+ "experimental": true,
+ "optional": true,
+ "$ref": "RenderBlockingBehavior"
}
]
},
@@ -16018,125 +19362,278 @@
},
{
"name": "timestamp",
- "description": "Timestamp.",
+ "description": "Timestamp.",
+ "$ref": "MonotonicTime"
+ },
+ {
+ "name": "response",
+ "description": "WebSocket response data.",
+ "$ref": "WebSocketFrame"
+ }
+ ]
+ },
+ {
+ "name": "webSocketHandshakeResponseReceived",
+ "description": "Fired when WebSocket handshake response becomes available.",
+ "parameters": [
+ {
+ "name": "requestId",
+ "description": "Request identifier.",
+ "$ref": "RequestId"
+ },
+ {
+ "name": "timestamp",
+ "description": "Timestamp.",
+ "$ref": "MonotonicTime"
+ },
+ {
+ "name": "response",
+ "description": "WebSocket response data.",
+ "$ref": "WebSocketResponse"
+ }
+ ]
+ },
+ {
+ "name": "webSocketWillSendHandshakeRequest",
+ "description": "Fired when WebSocket is about to initiate handshake.",
+ "parameters": [
+ {
+ "name": "requestId",
+ "description": "Request identifier.",
+ "$ref": "RequestId"
+ },
+ {
+ "name": "timestamp",
+ "description": "Timestamp.",
+ "$ref": "MonotonicTime"
+ },
+ {
+ "name": "wallTime",
+ "description": "UTC Timestamp.",
+ "$ref": "TimeSinceEpoch"
+ },
+ {
+ "name": "request",
+ "description": "WebSocket request data.",
+ "$ref": "WebSocketRequest"
+ }
+ ]
+ },
+ {
+ "name": "webTransportCreated",
+ "description": "Fired upon WebTransport creation.",
+ "parameters": [
+ {
+ "name": "transportId",
+ "description": "WebTransport identifier.",
+ "$ref": "RequestId"
+ },
+ {
+ "name": "url",
+ "description": "WebTransport request URL.",
+ "type": "string"
+ },
+ {
+ "name": "timestamp",
+ "description": "Timestamp.",
+ "$ref": "MonotonicTime"
+ },
+ {
+ "name": "initiator",
+ "description": "Request initiator.",
+ "optional": true,
+ "$ref": "Initiator"
+ }
+ ]
+ },
+ {
+ "name": "webTransportConnectionEstablished",
+ "description": "Fired when WebTransport handshake is finished.",
+ "parameters": [
+ {
+ "name": "transportId",
+ "description": "WebTransport identifier.",
+ "$ref": "RequestId"
+ },
+ {
+ "name": "timestamp",
+ "description": "Timestamp.",
+ "$ref": "MonotonicTime"
+ }
+ ]
+ },
+ {
+ "name": "webTransportClosed",
+ "description": "Fired when WebTransport is disposed.",
+ "parameters": [
+ {
+ "name": "transportId",
+ "description": "WebTransport identifier.",
+ "$ref": "RequestId"
+ },
+ {
+ "name": "timestamp",
+ "description": "Timestamp.",
+ "$ref": "MonotonicTime"
+ }
+ ]
+ },
+ {
+ "name": "directTCPSocketCreated",
+ "description": "Fired upon direct_socket.TCPSocket creation.",
+ "experimental": true,
+ "parameters": [
+ {
+ "name": "identifier",
+ "$ref": "RequestId"
+ },
+ {
+ "name": "remoteAddr",
+ "type": "string"
+ },
+ {
+ "name": "remotePort",
+ "description": "Unsigned int 16.",
+ "type": "integer"
+ },
+ {
+ "name": "options",
+ "$ref": "DirectTCPSocketOptions"
+ },
+ {
+ "name": "timestamp",
+ "$ref": "MonotonicTime"
+ },
+ {
+ "name": "initiator",
+ "optional": true,
+ "$ref": "Initiator"
+ }
+ ]
+ },
+ {
+ "name": "directTCPSocketOpened",
+ "description": "Fired when direct_socket.TCPSocket connection is opened.",
+ "experimental": true,
+ "parameters": [
+ {
+ "name": "identifier",
+ "$ref": "RequestId"
+ },
+ {
+ "name": "remoteAddr",
+ "type": "string"
+ },
+ {
+ "name": "remotePort",
+ "description": "Expected to be unsigned integer.",
+ "type": "integer"
+ },
+ {
+ "name": "timestamp",
"$ref": "MonotonicTime"
},
{
- "name": "response",
- "description": "WebSocket response data.",
- "$ref": "WebSocketFrame"
+ "name": "localAddr",
+ "optional": true,
+ "type": "string"
+ },
+ {
+ "name": "localPort",
+ "description": "Expected to be unsigned integer.",
+ "optional": true,
+ "type": "integer"
}
]
},
{
- "name": "webSocketHandshakeResponseReceived",
- "description": "Fired when WebSocket handshake response becomes available.",
+ "name": "directTCPSocketAborted",
+ "description": "Fired when direct_socket.TCPSocket is aborted.",
+ "experimental": true,
"parameters": [
{
- "name": "requestId",
- "description": "Request identifier.",
+ "name": "identifier",
"$ref": "RequestId"
},
{
- "name": "timestamp",
- "description": "Timestamp.",
- "$ref": "MonotonicTime"
+ "name": "errorMessage",
+ "type": "string"
},
{
- "name": "response",
- "description": "WebSocket response data.",
- "$ref": "WebSocketResponse"
+ "name": "timestamp",
+ "$ref": "MonotonicTime"
}
]
},
{
- "name": "webSocketWillSendHandshakeRequest",
- "description": "Fired when WebSocket is about to initiate handshake.",
+ "name": "directTCPSocketClosed",
+ "description": "Fired when direct_socket.TCPSocket is closed.",
+ "experimental": true,
"parameters": [
{
- "name": "requestId",
- "description": "Request identifier.",
+ "name": "identifier",
"$ref": "RequestId"
},
{
"name": "timestamp",
- "description": "Timestamp.",
"$ref": "MonotonicTime"
- },
- {
- "name": "wallTime",
- "description": "UTC Timestamp.",
- "$ref": "TimeSinceEpoch"
- },
- {
- "name": "request",
- "description": "WebSocket request data.",
- "$ref": "WebSocketRequest"
}
]
},
{
- "name": "webTransportCreated",
- "description": "Fired upon WebTransport creation.",
+ "name": "directTCPSocketChunkSent",
+ "description": "Fired when data is sent to tcp direct socket stream.",
+ "experimental": true,
"parameters": [
{
- "name": "transportId",
- "description": "WebTransport identifier.",
+ "name": "identifier",
"$ref": "RequestId"
},
{
- "name": "url",
- "description": "WebTransport request URL.",
+ "name": "data",
"type": "string"
},
{
"name": "timestamp",
- "description": "Timestamp.",
"$ref": "MonotonicTime"
- },
- {
- "name": "initiator",
- "description": "Request initiator.",
- "optional": true,
- "$ref": "Initiator"
}
]
},
{
- "name": "webTransportConnectionEstablished",
- "description": "Fired when WebTransport handshake is finished.",
+ "name": "directTCPSocketChunkReceived",
+ "description": "Fired when data is received from tcp direct socket stream.",
+ "experimental": true,
"parameters": [
{
- "name": "transportId",
- "description": "WebTransport identifier.",
+ "name": "identifier",
"$ref": "RequestId"
},
+ {
+ "name": "data",
+ "type": "string"
+ },
{
"name": "timestamp",
- "description": "Timestamp.",
"$ref": "MonotonicTime"
}
]
},
{
- "name": "webTransportClosed",
- "description": "Fired when WebTransport is disposed.",
+ "name": "directUDPSocketJoinedMulticastGroup",
+ "experimental": true,
"parameters": [
{
- "name": "transportId",
- "description": "WebTransport identifier.",
+ "name": "identifier",
"$ref": "RequestId"
},
{
- "name": "timestamp",
- "description": "Timestamp.",
- "$ref": "MonotonicTime"
+ "name": "IPAddress",
+ "type": "string"
}
]
},
{
- "name": "directTCPSocketCreated",
- "description": "Fired upon direct_socket.TCPSocket creation.",
+ "name": "directUDPSocketLeftMulticastGroup",
"experimental": true,
"parameters": [
{
@@ -16144,17 +19641,23 @@
"$ref": "RequestId"
},
{
- "name": "remoteAddr",
+ "name": "IPAddress",
"type": "string"
- },
+ }
+ ]
+ },
+ {
+ "name": "directUDPSocketCreated",
+ "description": "Fired upon direct_socket.UDPSocket creation.",
+ "experimental": true,
+ "parameters": [
{
- "name": "remotePort",
- "description": "Unsigned int 16.",
- "type": "integer"
+ "name": "identifier",
+ "$ref": "RequestId"
},
{
"name": "options",
- "$ref": "DirectTCPSocketOptions"
+ "$ref": "DirectUDPSocketOptions"
},
{
"name": "timestamp",
@@ -16168,8 +19671,8 @@
]
},
{
- "name": "directTCPSocketOpened",
- "description": "Fired when direct_socket.TCPSocket connection is opened.",
+ "name": "directUDPSocketOpened",
+ "description": "Fired when direct_socket.UDPSocket connection is opened.",
"experimental": true,
"parameters": [
{
@@ -16177,11 +19680,11 @@
"$ref": "RequestId"
},
{
- "name": "remoteAddr",
+ "name": "localAddr",
"type": "string"
},
{
- "name": "remotePort",
+ "name": "localPort",
"description": "Expected to be unsigned integer.",
"type": "integer"
},
@@ -16190,12 +19693,12 @@
"$ref": "MonotonicTime"
},
{
- "name": "localAddr",
+ "name": "remoteAddr",
"optional": true,
"type": "string"
},
{
- "name": "localPort",
+ "name": "remotePort",
"description": "Expected to be unsigned integer.",
"optional": true,
"type": "integer"
@@ -16203,8 +19706,8 @@
]
},
{
- "name": "directTCPSocketAborted",
- "description": "Fired when direct_socket.TCPSocket is aborted.",
+ "name": "directUDPSocketAborted",
+ "description": "Fired when direct_socket.UDPSocket is aborted.",
"experimental": true,
"parameters": [
{
@@ -16222,14 +19725,52 @@
]
},
{
- "name": "directTCPSocketClosed",
- "description": "Fired when direct_socket.TCPSocket is closed.",
+ "name": "directUDPSocketClosed",
+ "description": "Fired when direct_socket.UDPSocket is closed.",
+ "experimental": true,
+ "parameters": [
+ {
+ "name": "identifier",
+ "$ref": "RequestId"
+ },
+ {
+ "name": "timestamp",
+ "$ref": "MonotonicTime"
+ }
+ ]
+ },
+ {
+ "name": "directUDPSocketChunkSent",
+ "description": "Fired when message is sent to udp direct socket stream.",
+ "experimental": true,
+ "parameters": [
+ {
+ "name": "identifier",
+ "$ref": "RequestId"
+ },
+ {
+ "name": "message",
+ "$ref": "DirectUDPMessage"
+ },
+ {
+ "name": "timestamp",
+ "$ref": "MonotonicTime"
+ }
+ ]
+ },
+ {
+ "name": "directUDPSocketChunkReceived",
+ "description": "Fired when message is received from udp direct socket stream.",
"experimental": true,
"parameters": [
{
"name": "identifier",
"$ref": "RequestId"
},
+ {
+ "name": "message",
+ "$ref": "DirectUDPMessage"
+ },
{
"name": "timestamp",
"$ref": "MonotonicTime"
@@ -16265,6 +19806,15 @@
"experimental": true,
"$ref": "ConnectTiming"
},
+ {
+ "name": "deviceBoundSessionUsages",
+ "description": "How the request site's device bound sessions were used during this request.",
+ "optional": true,
+ "type": "array",
+ "items": {
+ "$ref": "DeviceBoundSessionWithUsage"
+ }
+ },
{
"name": "clientSecurityState",
"description": "The client security state set for the request.",
@@ -16276,6 +19826,12 @@
"description": "Whether the site has partitioned cookies stored in a partition different than the current one.",
"optional": true,
"type": "boolean"
+ },
+ {
+ "name": "appliedNetworkConditionsId",
+ "description": "The network conditions id if this request was affected by network conditions configured via\nemulateNetworkConditionsByRule.",
+ "optional": true,
+ "type": "string"
}
]
},
@@ -16418,129 +19974,105 @@
"experimental": true
},
{
- "name": "subresourceWebBundleMetadataReceived",
- "description": "Fired once when parsing the .wbn file has succeeded.\nThe event contains the information about the web bundle contents.",
+ "name": "reportingApiReportAdded",
+ "description": "Is sent whenever a new report is added.\nAnd after 'enableReportingApi' for all existing reports.",
"experimental": true,
"parameters": [
{
- "name": "requestId",
- "description": "Request identifier. Used to match this information to another event.",
- "$ref": "RequestId"
- },
- {
- "name": "urls",
- "description": "A list of URLs of resources in the subresource Web Bundle.",
- "type": "array",
- "items": {
- "type": "string"
- }
+ "name": "report",
+ "$ref": "ReportingApiReport"
}
]
},
{
- "name": "subresourceWebBundleMetadataError",
- "description": "Fired once when parsing the .wbn file has failed.",
+ "name": "reportingApiReportUpdated",
"experimental": true,
"parameters": [
{
- "name": "requestId",
- "description": "Request identifier. Used to match this information to another event.",
- "$ref": "RequestId"
- },
- {
- "name": "errorMessage",
- "description": "Error message",
- "type": "string"
+ "name": "report",
+ "$ref": "ReportingApiReport"
}
]
},
{
- "name": "subresourceWebBundleInnerResponseParsed",
- "description": "Fired when handling requests for resources within a .wbn file.\nNote: this will only be fired for resources that are requested by the webpage.",
+ "name": "reportingApiEndpointsChangedForOrigin",
"experimental": true,
"parameters": [
{
- "name": "innerRequestId",
- "description": "Request identifier of the subresource request",
- "$ref": "RequestId"
- },
- {
- "name": "innerRequestURL",
- "description": "URL of the subresource resource.",
+ "name": "origin",
+ "description": "Origin of the document(s) which configured the endpoints.",
"type": "string"
},
{
- "name": "bundleRequestId",
- "description": "Bundle request identifier. Used to match this information to another event.\nThis made be absent in case when the instrumentation was enabled only\nafter webbundle was parsed.",
- "optional": true,
- "$ref": "RequestId"
+ "name": "endpoints",
+ "type": "array",
+ "items": {
+ "$ref": "ReportingApiEndpoint"
+ }
}
]
},
{
- "name": "subresourceWebBundleInnerResponseError",
- "description": "Fired when request for resources within a .wbn file failed.",
+ "name": "deviceBoundSessionsAdded",
+ "description": "Triggered when the initial set of device bound sessions is added.",
"experimental": true,
"parameters": [
{
- "name": "innerRequestId",
- "description": "Request identifier of the subresource request",
- "$ref": "RequestId"
- },
- {
- "name": "innerRequestURL",
- "description": "URL of the subresource resource.",
- "type": "string"
- },
- {
- "name": "errorMessage",
- "description": "Error message",
- "type": "string"
- },
- {
- "name": "bundleRequestId",
- "description": "Bundle request identifier. Used to match this information to another event.\nThis made be absent in case when the instrumentation was enabled only\nafter webbundle was parsed.",
- "optional": true,
- "$ref": "RequestId"
+ "name": "sessions",
+ "description": "The device bound sessions.",
+ "type": "array",
+ "items": {
+ "$ref": "DeviceBoundSession"
+ }
}
]
},
{
- "name": "reportingApiReportAdded",
- "description": "Is sent whenever a new report is added.\nAnd after 'enableReportingApi' for all existing reports.",
+ "name": "deviceBoundSessionEventOccurred",
+ "description": "Triggered when a device bound session event occurs.",
"experimental": true,
"parameters": [
{
- "name": "report",
- "$ref": "ReportingApiReport"
- }
- ]
- },
- {
- "name": "reportingApiReportUpdated",
- "experimental": true,
- "parameters": [
+ "name": "eventId",
+ "description": "A unique identifier for this session event.",
+ "$ref": "DeviceBoundSessionEventId"
+ },
{
- "name": "report",
- "$ref": "ReportingApiReport"
- }
- ]
- },
- {
- "name": "reportingApiEndpointsChangedForOrigin",
- "experimental": true,
- "parameters": [
+ "name": "site",
+ "description": "The site this session event is associated with.",
+ "type": "string"
+ },
{
- "name": "origin",
- "description": "Origin of the document(s) which configured the endpoints.",
+ "name": "succeeded",
+ "description": "Whether this event was considered successful.",
+ "type": "boolean"
+ },
+ {
+ "name": "sessionId",
+ "description": "The session ID this event is associated with. May not be populated for\nfailed events.",
+ "optional": true,
"type": "string"
},
{
- "name": "endpoints",
- "type": "array",
- "items": {
- "$ref": "ReportingApiEndpoint"
- }
+ "name": "creationEventDetails",
+ "description": "The below are the different session event type details. Exactly one is populated.",
+ "optional": true,
+ "$ref": "CreationEventDetails"
+ },
+ {
+ "name": "refreshEventDetails",
+ "optional": true,
+ "$ref": "RefreshEventDetails"
+ },
+ {
+ "name": "terminationEventDetails",
+ "optional": true,
+ "$ref": "TerminationEventDetails"
+ },
+ {
+ "name": "challengeEventDetails",
+ "optional": true,
+ "$ref": "ChallengeEventDetails"
}
]
}
@@ -17170,9 +20702,26 @@
"searchForNode",
"searchForUAShadowDOM",
"captureAreaScreenshot",
- "showDistances",
"none"
]
+ },
+ {
+ "id": "InspectedElementAnchorConfig",
+ "type": "object",
+ "properties": [
+ {
+ "name": "nodeId",
+ "description": "Identifier of the node to highlight.",
+ "optional": true,
+ "$ref": "DOM.NodeId"
+ },
+ {
+ "name": "backendNodeId",
+ "description": "Identifier of the backend node to highlight.",
+ "optional": true,
+ "$ref": "DOM.BackendNodeId"
+ }
+ ]
}
],
"commands": [
@@ -17353,7 +20902,7 @@
},
{
"name": "highlightRect",
- "description": "Highlights given rectangle. Coordinates are absolute with respect to the main frame viewport.",
+ "description": "Highlights given rectangle. Coordinates are absolute with respect to the main frame viewport.\nIssue: the method does not handle device pixel ratio (DPR) correctly.\nThe coordinates currently have to be adjusted by the client\nif DPR is not 1 (see crbug.com/437807128).",
"parameters": [
{
"name": "x",
@@ -17532,6 +21081,16 @@
}
]
},
+ {
+ "name": "setShowInspectedElementAnchor",
+ "parameters": [
+ {
+ "name": "inspectedElementAnchorConfig",
+ "description": "Node identifier for which to show an anchor for.",
+ "$ref": "InspectedElementAnchorConfig"
+ }
+ ]
+ },
{
"name": "setShowPaintRects",
"description": "Requests that backend shows paint rectangles",
@@ -17671,12 +21230,222 @@
}
]
},
+ {
+ "name": "inspectPanelShowRequested",
+ "description": "Fired when user asks to show the Inspect panel.",
+ "parameters": [
+ {
+ "name": "backendNodeId",
+ "description": "Id of the node to show in the panel.",
+ "$ref": "DOM.BackendNodeId"
+ }
+ ]
+ },
+ {
+ "name": "inspectedElementWindowRestored",
+ "description": "Fired when user asks to restore the Inspected Element floating window.",
+ "parameters": [
+ {
+ "name": "backendNodeId",
+ "description": "Id of the node to restore the floating window for.",
+ "$ref": "DOM.BackendNodeId"
+ }
+ ]
+ },
{
"name": "inspectModeCanceled",
"description": "Fired when user cancels the inspect mode."
}
]
},
+ {
+ "domain": "PWA",
+ "description": "This domain allows interacting with the browser to control PWAs.",
+ "experimental": true,
+ "types": [
+ {
+ "id": "FileHandlerAccept",
+ "description": "The following types are the replica of\nhttps://crsrc.org/c/chrome/browser/web_applications/proto/web_app_os_integration_state.proto;drc=9910d3be894c8f142c977ba1023f30a656bc13fc;l=67",
+ "type": "object",
+ "properties": [
+ {
+ "name": "mediaType",
+ "description": "New name of the mimetype according to\nhttps://www.iana.org/assignments/media-types/media-types.xhtml",
+ "type": "string"
+ },
+ {
+ "name": "fileExtensions",
+ "type": "array",
+ "items": {
+ "type": "string"
+ }
+ }
+ ]
+ },
+ {
+ "id": "FileHandler",
+ "type": "object",
+ "properties": [
+ {
+ "name": "action",
+ "type": "string"
+ },
+ {
+ "name": "accepts",
+ "type": "array",
+ "items": {
+ "$ref": "FileHandlerAccept"
+ }
+ },
+ {
+ "name": "displayName",
+ "type": "string"
+ }
+ ]
+ },
+ {
+ "id": "DisplayMode",
+ "description": "If user prefers opening the app in browser or an app window.",
+ "type": "string",
+ "enum": [
+ "standalone",
+ "browser"
+ ]
+ }
+ ],
+ "commands": [
+ {
+ "name": "getOsAppState",
+ "description": "Returns the following OS state for the given manifest id.",
+ "parameters": [
+ {
+ "name": "manifestId",
+ "description": "The id from the webapp's manifest file, commonly it's the url of the\nsite installing the webapp. See\nhttps://web.dev/learn/pwa/web-app-manifest.",
+ "type": "string"
+ }
+ ],
+ "returns": [
+ {
+ "name": "badgeCount",
+ "type": "integer"
+ },
+ {
+ "name": "fileHandlers",
+ "type": "array",
+ "items": {
+ "$ref": "FileHandler"
+ }
+ }
+ ]
+ },
+ {
+ "name": "install",
+ "description": "Installs the given manifest identity, optionally using the given installUrlOrBundleUrl\n\nIWA-specific install description:\nmanifestId corresponds to isolated-app:// + web_package::SignedWebBundleId\n\nFile installation mode:\nThe installUrlOrBundleUrl can be either file:// or http(s):// pointing\nto a signed web bundle (.swbn). In this case SignedWebBundleId must correspond to\nThe .swbn file's signing key.\n\nDev proxy installation mode:\ninstallUrlOrBundleUrl must be http(s):// that serves dev mode IWA.\nweb_package::SignedWebBundleId must be of type dev proxy.\n\nThe advantage of dev proxy mode is that all changes to IWA\nautomatically will be reflected in the running app without\nreinstallation.\n\nTo generate bundle id for proxy mode:\n1. Generate 32 random bytes.\n2. Add a specific suffix at the end following the documentation\n https://github.com/WICG/isolated-web-apps/blob/main/Scheme.md#suffix\n3. Encode the entire sequence using Base32 without padding.\n\nIf Chrome is not in IWA dev\nmode, the installation will fail, regardless of the state of the allowlist.",
+ "parameters": [
+ {
+ "name": "manifestId",
+ "type": "string"
+ },
+ {
+ "name": "installUrlOrBundleUrl",
+ "description": "The location of the app or bundle overriding the one derived from the\nmanifestId.",
+ "optional": true,
+ "type": "string"
+ }
+ ]
+ },
+ {
+ "name": "uninstall",
+ "description": "Uninstalls the given manifest_id and closes any opened app windows.",
+ "parameters": [
+ {
+ "name": "manifestId",
+ "type": "string"
+ }
+ ]
+ },
+ {
+ "name": "launch",
+ "description": "Launches the installed web app, or an url in the same web app instead of the\ndefault start url if it is provided. Returns a page Target.TargetID which\ncan be used to attach to via Target.attachToTarget or similar APIs.",
+ "parameters": [
+ {
+ "name": "manifestId",
+ "type": "string"
+ },
+ {
+ "name": "url",
+ "optional": true,
+ "type": "string"
+ }
+ ],
+ "returns": [
+ {
+ "name": "targetId",
+ "description": "ID of the tab target created as a result.",
+ "$ref": "Target.TargetID"
+ }
+ ]
+ },
+ {
+ "name": "launchFilesInApp",
+ "description": "Opens one or more local files from an installed web app identified by its\nmanifestId. The web app needs to have file handlers registered to process\nthe files. The API returns one or more page Target.TargetIDs which can be\nused to attach to via Target.attachToTarget or similar APIs.\nIf some files in the parameters cannot be handled by the web app, they will\nbe ignored. If none of the files can be handled, this API returns an error.\nIf no files are provided as the parameter, this API also returns an error.\n\nAccording to the definition of the file handlers in the manifest file, one\nTarget.TargetID may represent a page handling one or more files. The order\nof the returned Target.TargetIDs is not guaranteed.\n\nTODO(crbug.com/339454034): Check the existences of the input files.",
+ "parameters": [
+ {
+ "name": "manifestId",
+ "type": "string"
+ },
+ {
+ "name": "files",
+ "type": "array",
+ "items": {
+ "type": "string"
+ }
+ }
+ ],
+ "returns": [
+ {
+ "name": "targetIds",
+ "description": "IDs of the tab targets created as the result.",
+ "type": "array",
+ "items": {
+ "$ref": "Target.TargetID"
+ }
+ }
+ ]
+ },
+ {
+ "name": "openCurrentPageInApp",
+ "description": "Opens the current page in its web app identified by the manifest id, needs\nto be called on a page target. This function returns immediately without\nwaiting for the app to finish loading.",
+ "parameters": [
+ {
+ "name": "manifestId",
+ "type": "string"
+ }
+ ]
+ },
+ {
+ "name": "changeAppUserSettings",
+ "description": "Changes user settings of the web app identified by its manifestId. If the\napp was not installed, this command returns an error. Unset parameters will\nbe ignored; unrecognized values will cause an error.\n\nUnlike the ones defined in the manifest files of the web apps, these\nsettings are provided by the browser and controlled by the users, they\nimpact the way the browser handling the web apps.\n\nSee the comment of each parameter.",
+ "parameters": [
+ {
+ "name": "manifestId",
+ "type": "string"
+ },
+ {
+ "name": "linkCapturing",
+ "description": "If user allows the links clicked on by the user in the app's scope, or\nextended scope if the manifest has scope extensions and the flags\n`DesktopPWAsLinkCapturingWithScopeExtensions` and\n`WebAppEnableScopeExtensions` are enabled.\n\nNote, the API does not support resetting the linkCapturing to the\ninitial value, uninstalling and installing the web app again will reset\nit.\n\nTODO(crbug.com/339453269): Setting this value on ChromeOS is not\nsupported yet.",
+ "optional": true,
+ "type": "boolean"
+ },
+ {
+ "name": "displayMode",
+ "optional": true,
+ "$ref": "DisplayMode"
+ }
+ ]
+ }
+ ]
+ },
{
"domain": "Page",
"description": "Actions and events related to the inspected page belong to the page domain.",
@@ -17734,24 +21503,6 @@
}
]
},
- {
- "id": "AdScriptId",
- "description": "Identifies the bottom-most script which caused the frame to be labelled\nas an ad.",
- "experimental": true,
- "type": "object",
- "properties": [
- {
- "name": "scriptId",
- "description": "Script Id of the bottom-most script which caused the frame to be labelled\nas an ad.",
- "$ref": "Runtime.ScriptId"
- },
- {
- "name": "debuggerId",
- "description": "Id of adScriptId's debugger.",
- "$ref": "Runtime.UniqueDebuggerId"
- }
- ]
- },
{
"id": "SecureContextType",
"description": "Indicates whether the frame is a secure context and why it is the case.",
@@ -17788,14 +21539,16 @@
},
{
"id": "PermissionsPolicyFeature",
- "description": "All Permissions Policy features. This enum should match the one defined\nin services/network/public/cpp/permissions_policy/permissions_policy_features.json5.",
+ "description": "All Permissions Policy features. This enum should match the one defined\nin services/network/public/cpp/permissions_policy/permissions_policy_features.json5.\nLINT.IfChange(PermissionsPolicyFeature)",
"experimental": true,
"type": "string",
"enum": [
"accelerometer",
"all-screens-capture",
"ambient-light-sensor",
+ "aria-notify",
"attribution-reporting",
+ "autofill",
"autoplay",
"bluetooth",
"browsing-topics",
@@ -17832,8 +21585,11 @@
"cross-origin-isolated",
"deferred-fetch",
"deferred-fetch-minimal",
+ "device-attributes",
+ "digital-credentials-create",
"digital-credentials-get",
"direct-sockets",
+ "direct-sockets-multicast",
"direct-sockets-private",
"display-capture",
"document-domain",
@@ -17853,31 +21609,40 @@
"interest-cohort",
"join-ad-interest-group",
"keyboard-map",
+ "language-detector",
+ "language-model",
"local-fonts",
+ "local-network",
+ "local-network-access",
+ "loopback-network",
"magnetometer",
+ "manual-text",
"media-playback-while-not-visible",
"microphone",
"midi",
+ "on-device-speech-recognition",
"otp-credentials",
"payment",
"picture-in-picture",
- "popins",
"private-aggregation",
"private-state-token-issuance",
"private-state-token-redemption",
"publickey-credentials-create",
"publickey-credentials-get",
+ "record-ad-auction-events",
+ "rewriter",
"run-ad-auction",
"screen-wake-lock",
"serial",
- "shared-autofill",
"shared-storage",
"shared-storage-select-url",
"smart-card",
"speaker-selection",
"storage-access",
"sub-apps",
+ "summarizer",
"sync-xhr",
+ "translator",
"unload",
"usb",
"usb-unrestricted",
@@ -17886,6 +21651,7 @@
"web-printing",
"web-share",
"window-management",
+ "writer",
"xr-spatial-tracking"
]
},
@@ -19075,19 +22841,7 @@
"name": "themeColor",
"optional": true,
"type": "string"
- }
- ]
- },
- {
- "id": "AutoResponseMode",
- "description": "Enum of possible auto-response for permission / prompt dialogs.",
- "experimental": true,
- "type": "string",
- "enum": [
- "none",
- "autoAccept",
- "autoReject",
- "autoOptOut"
+ }
]
},
{
@@ -19146,6 +22900,7 @@
"BackForwardCacheDisabledForPrerender",
"UserAgentOverrideDiffers",
"ForegroundCacheLimit",
+ "ForwardCacheDisabled",
"BrowsingInstanceNotSwapped",
"BackForwardCacheDisabledForDelegate",
"UnloadHandlerExistsInMainFrame",
@@ -19186,8 +22941,12 @@
"BroadcastChannel",
"WebXR",
"SharedWorker",
+ "SharedWorkerMessage",
+ "SharedWorkerWithNoActiveClient",
"WebLocks",
+ "WebLocksContention",
"WebHID",
+ "WebBluetooth",
"WebShare",
"RequestedStorageAccessGrant",
"WebNfc",
@@ -19210,9 +22969,9 @@
"IndexedDBEvent",
"Dummy",
"JsNetworkRequestReceivedCacheControlNoStoreResource",
- "WebRTCSticky",
- "WebTransportSticky",
- "WebSocketSticky",
+ "WebRTCUsedWithCCNS",
+ "WebTransportUsedWithCCNS",
+ "WebSocketUsedWithCCNS",
"SmartCard",
"LiveMediaStreamTrack",
"UnloadHandler",
@@ -19245,7 +23004,9 @@
"EmbedderExtensionSentMessageToCachedFrame",
"RequestedByWebViewClient",
"PostMessageByWebViewClient",
- "CacheControlNoStoreDeviceBoundSessionTerminated"
+ "CacheControlNoStoreDeviceBoundSessionTerminated",
+ "CacheLimitPrunedOnModerateMemoryPressure",
+ "CacheLimitPrunedOnCriticalMemoryPressure"
]
},
{
@@ -19666,7 +23427,7 @@
]
},
{
- "name": "getAdScriptId",
+ "name": "getAdScriptAncestry",
"experimental": true,
"parameters": [
{
@@ -19676,10 +23437,10 @@
],
"returns": [
{
- "name": "adScriptId",
- "description": "Identifies the bottom-most script which caused the frame to be labelled\nas an ad. Only sent if frame is labelled as an ad and id is available.",
+ "name": "adScriptAncestry",
+ "description": "The ancestry chain of ad script identifiers leading to this frame's\ncreation, along with the root script's filterlist rule. The ancestry\nchain is ordered from the most immediate script (in the frame creation\nstack) to more distant ancestors (that created the immediately preceding\nscript). Only sent if frame is labelled as an ad and ids are available.",
"optional": true,
- "$ref": "AdScriptId"
+ "$ref": "Network.AdAncestry"
}
]
},
@@ -19866,6 +23627,13 @@
"description": "User friendly error message, present if and only if navigation has failed.",
"optional": true,
"type": "string"
+ },
+ {
+ "name": "isDownload",
+ "description": "Whether the navigation resulted in a download.",
+ "experimental": true,
+ "optional": true,
+ "type": "boolean"
}
]
},
@@ -20527,7 +24295,14 @@
"parameters": [
{
"name": "mode",
- "$ref": "AutoResponseMode"
+ "type": "string",
+ "enum": [
+ "none",
+ "autoAccept",
+ "autoChooseToAuthAnotherWay",
+ "autoReject",
+ "autoOptOut"
+ ]
}
]
},
@@ -20538,7 +24313,12 @@
"parameters": [
{
"name": "mode",
- "$ref": "AutoResponseMode"
+ "type": "string",
+ "enum": [
+ "none",
+ "autoAccept",
+ "autoReject"
+ ]
}
]
},
@@ -20572,6 +24352,13 @@
{
"name": "enabled",
"type": "boolean"
+ },
+ {
+ "name": "cancel",
+ "description": "If true, cancels the dialog by emitting relevant events (if any)\nin addition to not showing it if the interception is enabled\n(default: false).",
+ "experimental": true,
+ "optional": true,
+ "type": "boolean"
}
]
},
@@ -20585,6 +24372,26 @@
"type": "boolean"
}
]
+ },
+ {
+ "name": "getAnnotatedPageContent",
+ "description": "Get the annotated page content for the main frame.\nThis is an experimental command that is subject to change.",
+ "experimental": true,
+ "parameters": [
+ {
+ "name": "includeActionableInformation",
+ "description": "Whether to include actionable information. Defaults to true.",
+ "optional": true,
+ "type": "boolean"
+ }
+ ],
+ "returns": [
+ {
+ "name": "content",
+ "description": "The annotated page content as a base64 encoded protobuf.\nThe format is defined by the `AnnotatedPageContent` message in\ncomponents/optimization_guide/proto/features/common_quality_data.proto (Encoded as a base64 string when passed over JSON)",
+ "type": "string"
+ }
+ ]
}
],
"events": [
@@ -20910,6 +24717,12 @@
"name": "javascriptDialogClosed",
"description": "Fired when a JavaScript initiated dialog (alert, confirm, prompt, or onbeforeunload) has been\nclosed.",
"parameters": [
+ {
+ "name": "frameId",
+ "description": "Frame id.",
+ "experimental": true,
+ "$ref": "FrameId"
+ },
{
"name": "result",
"description": "Whether dialog was confirmed.",
@@ -20931,6 +24744,12 @@
"description": "Frame url.",
"type": "string"
},
+ {
+ "name": "frameId",
+ "description": "Frame id.",
+ "experimental": true,
+ "$ref": "FrameId"
+ },
{
"name": "message",
"description": "Message that will be displayed by the dialog.",
@@ -21072,302 +24891,129 @@
"description": "Fired when the page with currently enabled screencast was shown or hidden `.",
"experimental": true,
"parameters": [
- {
- "name": "visible",
- "description": "True if the page is visible.",
- "type": "boolean"
- }
- ]
- },
- {
- "name": "windowOpen",
- "description": "Fired when a new window is going to be opened, via window.open(), link click, form submission,\netc.",
- "parameters": [
- {
- "name": "url",
- "description": "The URL for the new window.",
- "type": "string"
- },
- {
- "name": "windowName",
- "description": "Window name.",
- "type": "string"
- },
- {
- "name": "windowFeatures",
- "description": "An array of enabled window features.",
- "type": "array",
- "items": {
- "type": "string"
- }
- },
- {
- "name": "userGesture",
- "description": "Whether or not it was triggered by user gesture.",
- "type": "boolean"
- }
- ]
- },
- {
- "name": "compilationCacheProduced",
- "description": "Issued for every compilation cache generated. Is only available\nif Page.setGenerateCompilationCache is enabled.",
- "experimental": true,
- "parameters": [
- {
- "name": "url",
- "type": "string"
- },
- {
- "name": "data",
- "description": "Base64-encoded data (Encoded as a base64 string when passed over JSON)",
- "type": "string"
- }
- ]
- }
- ]
- },
- {
- "domain": "Performance",
- "types": [
- {
- "id": "Metric",
- "description": "Run-time execution metric.",
- "type": "object",
- "properties": [
- {
- "name": "name",
- "description": "Metric name.",
- "type": "string"
- },
- {
- "name": "value",
- "description": "Metric value.",
- "type": "number"
- }
- ]
- }
- ],
- "commands": [
- {
- "name": "disable",
- "description": "Disable collecting and reporting metrics."
- },
- {
- "name": "enable",
- "description": "Enable collecting and reporting metrics.",
- "parameters": [
- {
- "name": "timeDomain",
- "description": "Time domain to use for collecting and reporting duration metrics.",
- "optional": true,
- "type": "string",
- "enum": [
- "timeTicks",
- "threadTicks"
- ]
- }
- ]
- },
- {
- "name": "setTimeDomain",
- "description": "Sets time domain to use for collecting and reporting duration metrics.\nNote that this must be called before enabling metrics collection. Calling\nthis method while metrics collection is enabled returns an error.",
- "experimental": true,
- "deprecated": true,
- "parameters": [
- {
- "name": "timeDomain",
- "description": "Time domain",
- "type": "string",
- "enum": [
- "timeTicks",
- "threadTicks"
- ]
- }
- ]
- },
- {
- "name": "getMetrics",
- "description": "Retrieve current values of run-time metrics.",
- "returns": [
- {
- "name": "metrics",
- "description": "Current values for run-time metrics.",
- "type": "array",
- "items": {
- "$ref": "Metric"
- }
- }
- ]
- }
- ],
- "events": [
- {
- "name": "metrics",
- "description": "Current values of the metrics.",
- "parameters": [
- {
- "name": "metrics",
- "description": "Current values of the metrics.",
- "type": "array",
- "items": {
- "$ref": "Metric"
- }
- },
- {
- "name": "title",
- "description": "Timestamp title.",
- "type": "string"
- }
- ]
- }
- ]
- },
- {
- "domain": "PerformanceTimeline",
- "description": "Reporting of performance timeline events, as specified in\nhttps://w3c.github.io/performance-timeline/#dom-performanceobserver.",
- "experimental": true,
- "dependencies": [
- "DOM",
- "Network"
- ],
- "types": [
- {
- "id": "LargestContentfulPaint",
- "description": "See https://github.com/WICG/LargestContentfulPaint and largest_contentful_paint.idl",
- "type": "object",
- "properties": [
- {
- "name": "renderTime",
- "$ref": "Network.TimeSinceEpoch"
- },
- {
- "name": "loadTime",
- "$ref": "Network.TimeSinceEpoch"
- },
- {
- "name": "size",
- "description": "The number of pixels being painted.",
- "type": "number"
- },
- {
- "name": "elementId",
- "description": "The id attribute of the element, if available.",
- "optional": true,
- "type": "string"
- },
- {
- "name": "url",
- "description": "The URL of the image (may be trimmed).",
- "optional": true,
- "type": "string"
- },
- {
- "name": "nodeId",
- "optional": true,
- "$ref": "DOM.BackendNodeId"
- }
- ]
- },
- {
- "id": "LayoutShiftAttribution",
- "type": "object",
- "properties": [
- {
- "name": "previousRect",
- "$ref": "DOM.Rect"
- },
- {
- "name": "currentRect",
- "$ref": "DOM.Rect"
- },
- {
- "name": "nodeId",
- "optional": true,
- "$ref": "DOM.BackendNodeId"
+ {
+ "name": "visible",
+ "description": "True if the page is visible.",
+ "type": "boolean"
}
]
},
{
- "id": "LayoutShift",
- "description": "See https://wicg.github.io/layout-instability/#sec-layout-shift and layout_shift.idl",
- "type": "object",
- "properties": [
- {
- "name": "value",
- "description": "Score increment produced by this event.",
- "type": "number"
- },
+ "name": "windowOpen",
+ "description": "Fired when a new window is going to be opened, via window.open(), link click, form submission,\netc.",
+ "parameters": [
{
- "name": "hadRecentInput",
- "type": "boolean"
+ "name": "url",
+ "description": "The URL for the new window.",
+ "type": "string"
},
{
- "name": "lastInputTime",
- "$ref": "Network.TimeSinceEpoch"
+ "name": "windowName",
+ "description": "Window name.",
+ "type": "string"
},
{
- "name": "sources",
+ "name": "windowFeatures",
+ "description": "An array of enabled window features.",
"type": "array",
"items": {
- "$ref": "LayoutShiftAttribution"
+ "type": "string"
}
+ },
+ {
+ "name": "userGesture",
+ "description": "Whether or not it was triggered by user gesture.",
+ "type": "boolean"
}
]
},
{
- "id": "TimelineEvent",
- "type": "object",
- "properties": [
+ "name": "compilationCacheProduced",
+ "description": "Issued for every compilation cache generated.",
+ "experimental": true,
+ "parameters": [
{
- "name": "frameId",
- "description": "Identifies the frame that this event is related to. Empty for non-frame targets.",
- "$ref": "Page.FrameId"
+ "name": "url",
+ "type": "string"
},
{
- "name": "type",
- "description": "The event type, as specified in https://w3c.github.io/performance-timeline/#dom-performanceentry-entrytype\nThis determines which of the optional \"details\" fields is present.",
+ "name": "data",
+ "description": "Base64-encoded data (Encoded as a base64 string when passed over JSON)",
"type": "string"
- },
+ }
+ ]
+ }
+ ]
+ },
+ {
+ "domain": "Performance",
+ "types": [
+ {
+ "id": "Metric",
+ "description": "Run-time execution metric.",
+ "type": "object",
+ "properties": [
{
"name": "name",
- "description": "Name may be empty depending on the type.",
+ "description": "Metric name.",
"type": "string"
},
{
- "name": "time",
- "description": "Time in seconds since Epoch, monotonically increasing within document lifetime.",
- "$ref": "Network.TimeSinceEpoch"
- },
- {
- "name": "duration",
- "description": "Event duration, if applicable.",
- "optional": true,
+ "name": "value",
+ "description": "Metric value.",
"type": "number"
- },
- {
- "name": "lcpDetails",
- "optional": true,
- "$ref": "LargestContentfulPaint"
- },
- {
- "name": "layoutShiftDetails",
- "optional": true,
- "$ref": "LayoutShift"
}
]
}
],
"commands": [
+ {
+ "name": "disable",
+ "description": "Disable collecting and reporting metrics."
+ },
{
"name": "enable",
- "description": "Previously buffered events would be reported before method returns.\nSee also: timelineEventAdded",
+ "description": "Enable collecting and reporting metrics.",
"parameters": [
{
- "name": "eventTypes",
- "description": "The types of event to report, as specified in\nhttps://w3c.github.io/performance-timeline/#dom-performanceentry-entrytype\nThe specified filter overrides any previous filters, passing empty\nfilter disables recording.\nNote that not all types exposed to the web platform are currently supported.",
+ "name": "timeDomain",
+ "description": "Time domain to use for collecting and reporting duration metrics.",
+ "optional": true,
+ "type": "string",
+ "enum": [
+ "timeTicks",
+ "threadTicks"
+ ]
+ }
+ ]
+ },
+ {
+ "name": "setTimeDomain",
+ "description": "Sets time domain to use for collecting and reporting duration metrics.\nNote that this must be called before enabling metrics collection. Calling\nthis method while metrics collection is enabled returns an error.",
+ "experimental": true,
+ "deprecated": true,
+ "parameters": [
+ {
+ "name": "timeDomain",
+ "description": "Time domain",
+ "type": "string",
+ "enum": [
+ "timeTicks",
+ "threadTicks"
+ ]
+ }
+ ]
+ },
+ {
+ "name": "getMetrics",
+ "description": "Retrieve current values of run-time metrics.",
+ "returns": [
+ {
+ "name": "metrics",
+ "description": "Current values for run-time metrics.",
"type": "array",
"items": {
- "type": "string"
+ "$ref": "Metric"
}
}
]
@@ -21375,742 +25021,633 @@
],
"events": [
{
- "name": "timelineEventAdded",
- "description": "Sent when a performance timeline event is added. See reportPerformanceTimeline method.",
+ "name": "metrics",
+ "description": "Current values of the metrics.",
"parameters": [
{
- "name": "event",
- "$ref": "TimelineEvent"
+ "name": "metrics",
+ "description": "Current values of the metrics.",
+ "type": "array",
+ "items": {
+ "$ref": "Metric"
+ }
+ },
+ {
+ "name": "title",
+ "description": "Timestamp title.",
+ "type": "string"
}
]
}
]
},
{
- "domain": "Security",
- "description": "Security",
+ "domain": "PerformanceTimeline",
+ "description": "Reporting of performance timeline events, as specified in\nhttps://w3c.github.io/performance-timeline/#dom-performanceobserver.",
+ "experimental": true,
+ "dependencies": [
+ "DOM",
+ "Network"
+ ],
"types": [
{
- "id": "CertificateId",
- "description": "An internal certificate ID value.",
- "type": "integer"
- },
- {
- "id": "MixedContentType",
- "description": "A description of mixed content (HTTP resources on HTTPS pages), as defined by\nhttps://www.w3.org/TR/mixed-content/#categories",
- "type": "string",
- "enum": [
- "blockable",
- "optionally-blockable",
- "none"
- ]
- },
- {
- "id": "SecurityState",
- "description": "The security level of a page or resource.",
- "type": "string",
- "enum": [
- "unknown",
- "neutral",
- "insecure",
- "secure",
- "info",
- "insecure-broken"
- ]
- },
- {
- "id": "CertificateSecurityState",
- "description": "Details about the security state of the page certificate.",
- "experimental": true,
- "type": "object",
- "properties": [
- {
- "name": "protocol",
- "description": "Protocol name (e.g. \"TLS 1.2\" or \"QUIC\").",
- "type": "string"
- },
- {
- "name": "keyExchange",
- "description": "Key Exchange used by the connection, or the empty string if not applicable.",
- "type": "string"
- },
- {
- "name": "keyExchangeGroup",
- "description": "(EC)DH group used by the connection, if applicable.",
- "optional": true,
- "type": "string"
- },
- {
- "name": "cipher",
- "description": "Cipher name.",
- "type": "string"
- },
- {
- "name": "mac",
- "description": "TLS MAC. Note that AEAD ciphers do not have separate MACs.",
- "optional": true,
- "type": "string"
- },
- {
- "name": "certificate",
- "description": "Page certificate.",
- "type": "array",
- "items": {
- "type": "string"
- }
- },
- {
- "name": "subjectName",
- "description": "Certificate subject name.",
- "type": "string"
- },
- {
- "name": "issuer",
- "description": "Name of the issuing CA.",
- "type": "string"
- },
- {
- "name": "validFrom",
- "description": "Certificate valid from date.",
- "$ref": "Network.TimeSinceEpoch"
- },
- {
- "name": "validTo",
- "description": "Certificate valid to (expiration) date",
- "$ref": "Network.TimeSinceEpoch"
- },
- {
- "name": "certificateNetworkError",
- "description": "The highest priority network error code, if the certificate has an error.",
- "optional": true,
- "type": "string"
- },
- {
- "name": "certificateHasWeakSignature",
- "description": "True if the certificate uses a weak signature algorithm.",
- "type": "boolean"
- },
+ "id": "LargestContentfulPaint",
+ "description": "See https://github.com/WICG/LargestContentfulPaint and largest_contentful_paint.idl",
+ "type": "object",
+ "properties": [
{
- "name": "certificateHasSha1Signature",
- "description": "True if the certificate has a SHA1 signature in the chain.",
- "type": "boolean"
+ "name": "renderTime",
+ "$ref": "Network.TimeSinceEpoch"
},
{
- "name": "modernSSL",
- "description": "True if modern SSL",
- "type": "boolean"
+ "name": "loadTime",
+ "$ref": "Network.TimeSinceEpoch"
},
{
- "name": "obsoleteSslProtocol",
- "description": "True if the connection is using an obsolete SSL protocol.",
- "type": "boolean"
+ "name": "size",
+ "description": "The number of pixels being painted.",
+ "type": "number"
},
{
- "name": "obsoleteSslKeyExchange",
- "description": "True if the connection is using an obsolete SSL key exchange.",
- "type": "boolean"
+ "name": "elementId",
+ "description": "The id attribute of the element, if available.",
+ "optional": true,
+ "type": "string"
},
{
- "name": "obsoleteSslCipher",
- "description": "True if the connection is using an obsolete SSL cipher.",
- "type": "boolean"
+ "name": "url",
+ "description": "The URL of the image (may be trimmed).",
+ "optional": true,
+ "type": "string"
},
{
- "name": "obsoleteSslSignature",
- "description": "True if the connection is using an obsolete SSL signature.",
- "type": "boolean"
+ "name": "nodeId",
+ "optional": true,
+ "$ref": "DOM.BackendNodeId"
}
]
},
{
- "id": "SafetyTipStatus",
- "experimental": true,
- "type": "string",
- "enum": [
- "badReputation",
- "lookalike"
- ]
- },
- {
- "id": "SafetyTipInfo",
- "experimental": true,
+ "id": "LayoutShiftAttribution",
"type": "object",
"properties": [
{
- "name": "safetyTipStatus",
- "description": "Describes whether the page triggers any safety tips or reputation warnings. Default is unknown.",
- "$ref": "SafetyTipStatus"
+ "name": "previousRect",
+ "$ref": "DOM.Rect"
},
{
- "name": "safeUrl",
- "description": "The URL the safety tip suggested (\"Did you mean?\"). Only filled in for lookalike matches.",
+ "name": "currentRect",
+ "$ref": "DOM.Rect"
+ },
+ {
+ "name": "nodeId",
"optional": true,
- "type": "string"
+ "$ref": "DOM.BackendNodeId"
}
]
},
{
- "id": "VisibleSecurityState",
- "description": "Security state information about the page.",
- "experimental": true,
+ "id": "LayoutShift",
+ "description": "See https://wicg.github.io/layout-instability/#sec-layout-shift and layout_shift.idl",
"type": "object",
"properties": [
{
- "name": "securityState",
- "description": "The security level of the page.",
- "$ref": "SecurityState"
+ "name": "value",
+ "description": "Score increment produced by this event.",
+ "type": "number"
},
{
- "name": "certificateSecurityState",
- "description": "Security state details about the page certificate.",
- "optional": true,
- "$ref": "CertificateSecurityState"
+ "name": "hadRecentInput",
+ "type": "boolean"
},
{
- "name": "safetyTipInfo",
- "description": "The type of Safety Tip triggered on the page. Note that this field will be set even if the Safety Tip UI was not actually shown.",
- "optional": true,
- "$ref": "SafetyTipInfo"
+ "name": "lastInputTime",
+ "$ref": "Network.TimeSinceEpoch"
},
{
- "name": "securityStateIssueIds",
- "description": "Array of security state issues ids.",
+ "name": "sources",
"type": "array",
"items": {
- "type": "string"
+ "$ref": "LayoutShiftAttribution"
}
}
]
},
{
- "id": "SecurityStateExplanation",
- "description": "An explanation of an factor contributing to the security state.",
+ "id": "TimelineEvent",
"type": "object",
"properties": [
{
- "name": "securityState",
- "description": "Security state representing the severity of the factor being explained.",
- "$ref": "SecurityState"
+ "name": "frameId",
+ "description": "Identifies the frame that this event is related to. Empty for non-frame targets.",
+ "$ref": "Page.FrameId"
},
{
- "name": "title",
- "description": "Title describing the type of factor.",
+ "name": "type",
+ "description": "The event type, as specified in https://w3c.github.io/performance-timeline/#dom-performanceentry-entrytype\nThis determines which of the optional \"details\" fields is present.",
"type": "string"
},
{
- "name": "summary",
- "description": "Short phrase describing the type of factor.",
+ "name": "name",
+ "description": "Name may be empty depending on the type.",
"type": "string"
},
{
- "name": "description",
- "description": "Full text explanation of the factor.",
- "type": "string"
+ "name": "time",
+ "description": "Time in seconds since Epoch, monotonically increasing within document lifetime.",
+ "$ref": "Network.TimeSinceEpoch"
},
{
- "name": "mixedContentType",
- "description": "The type of mixed content described by the explanation.",
- "$ref": "MixedContentType"
+ "name": "duration",
+ "description": "Event duration, if applicable.",
+ "optional": true,
+ "type": "number"
},
{
- "name": "certificate",
- "description": "Page certificate.",
- "type": "array",
- "items": {
- "type": "string"
- }
+ "name": "lcpDetails",
+ "optional": true,
+ "$ref": "LargestContentfulPaint"
},
{
- "name": "recommendations",
- "description": "Recommendations to fix any issues.",
+ "name": "layoutShiftDetails",
"optional": true,
+ "$ref": "LayoutShift"
+ }
+ ]
+ }
+ ],
+ "commands": [
+ {
+ "name": "enable",
+ "description": "Previously buffered events would be reported before method returns.\nSee also: timelineEventAdded",
+ "parameters": [
+ {
+ "name": "eventTypes",
+ "description": "The types of event to report, as specified in\nhttps://w3c.github.io/performance-timeline/#dom-performanceentry-entrytype\nThe specified filter overrides any previous filters, passing empty\nfilter disables recording.\nNote that not all types exposed to the web platform are currently supported.",
"type": "array",
"items": {
"type": "string"
}
}
]
+ }
+ ],
+ "events": [
+ {
+ "name": "timelineEventAdded",
+ "description": "Sent when a performance timeline event is added. See reportPerformanceTimeline method.",
+ "parameters": [
+ {
+ "name": "event",
+ "$ref": "TimelineEvent"
+ }
+ ]
+ }
+ ]
+ },
+ {
+ "domain": "Preload",
+ "experimental": true,
+ "types": [
+ {
+ "id": "RuleSetId",
+ "description": "Unique id",
+ "type": "string"
},
{
- "id": "InsecureContentStatus",
- "description": "Information about insecure content on the page.",
- "deprecated": true,
+ "id": "RuleSet",
+ "description": "Corresponds to SpeculationRuleSet",
"type": "object",
"properties": [
{
- "name": "ranMixedContent",
- "description": "Always false.",
- "type": "boolean"
- },
- {
- "name": "displayedMixedContent",
- "description": "Always false.",
- "type": "boolean"
- },
- {
- "name": "containedMixedForm",
- "description": "Always false.",
- "type": "boolean"
- },
- {
- "name": "ranContentWithCertErrors",
- "description": "Always false.",
- "type": "boolean"
+ "name": "id",
+ "$ref": "RuleSetId"
},
{
- "name": "displayedContentWithCertErrors",
- "description": "Always false.",
- "type": "boolean"
+ "name": "loaderId",
+ "description": "Identifies a document which the rule set is associated with.",
+ "$ref": "Network.LoaderId"
},
{
- "name": "ranInsecureContentStyle",
- "description": "Always set to unknown.",
- "$ref": "SecurityState"
+ "name": "sourceText",
+ "description": "Source text of JSON representing the rule set. If it comes from\n`