parsek-cdp 0.1.0__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (242) hide show
  1. parsek_cdp/__init__.py +55 -0
  2. parsek_cdp/_logging.py +49 -0
  3. parsek_cdp/cdp/__init__.py +247 -0
  4. parsek_cdp/cdp/accessibility/__init__.py +15 -0
  5. parsek_cdp/cdp/accessibility/events.py +35 -0
  6. parsek_cdp/cdp/accessibility/functions.py +202 -0
  7. parsek_cdp/cdp/accessibility/types.py +235 -0
  8. parsek_cdp/cdp/animation/__init__.py +15 -0
  9. parsek_cdp/cdp/animation/events.py +52 -0
  10. parsek_cdp/cdp/animation/functions.py +140 -0
  11. parsek_cdp/cdp/animation/types.py +113 -0
  12. parsek_cdp/cdp/audits/__init__.py +15 -0
  13. parsek_cdp/cdp/audits/events.py +21 -0
  14. parsek_cdp/cdp/audits/functions.py +95 -0
  15. parsek_cdp/cdp/audits/types.py +1051 -0
  16. parsek_cdp/cdp/autofill/__init__.py +15 -0
  17. parsek_cdp/cdp/autofill/events.py +27 -0
  18. parsek_cdp/cdp/autofill/functions.py +64 -0
  19. parsek_cdp/cdp/autofill/types.py +108 -0
  20. parsek_cdp/cdp/backgroundservice/__init__.py +15 -0
  21. parsek_cdp/cdp/backgroundservice/events.py +40 -0
  22. parsek_cdp/cdp/backgroundservice/functions.py +59 -0
  23. parsek_cdp/cdp/backgroundservice/types.py +63 -0
  24. parsek_cdp/cdp/bluetoothemulation/__init__.py +15 -0
  25. parsek_cdp/cdp/bluetoothemulation/events.py +70 -0
  26. parsek_cdp/cdp/bluetoothemulation/functions.py +247 -0
  27. parsek_cdp/cdp/bluetoothemulation/types.py +120 -0
  28. parsek_cdp/cdp/browser/__init__.py +15 -0
  29. parsek_cdp/cdp/browser/events.py +46 -0
  30. parsek_cdp/cdp/browser/functions.py +350 -0
  31. parsek_cdp/cdp/browser/types.py +158 -0
  32. parsek_cdp/cdp/cachestorage/__init__.py +15 -0
  33. parsek_cdp/cdp/cachestorage/events.py +13 -0
  34. parsek_cdp/cdp/cachestorage/functions.py +126 -0
  35. parsek_cdp/cdp/cachestorage/types.py +89 -0
  36. parsek_cdp/cdp/cast/__init__.py +15 -0
  37. parsek_cdp/cdp/cast/events.py +38 -0
  38. parsek_cdp/cdp/cast/functions.py +77 -0
  39. parsek_cdp/cdp/cast/types.py +23 -0
  40. parsek_cdp/cdp/console/__init__.py +15 -0
  41. parsek_cdp/cdp/console/events.py +22 -0
  42. parsek_cdp/cdp/console/functions.py +36 -0
  43. parsek_cdp/cdp/console/types.py +30 -0
  44. parsek_cdp/cdp/css/__init__.py +15 -0
  45. parsek_cdp/cdp/css/events.py +79 -0
  46. parsek_cdp/cdp/css/functions.py +788 -0
  47. parsek_cdp/cdp/css/types.py +742 -0
  48. parsek_cdp/cdp/debugger/__init__.py +15 -0
  49. parsek_cdp/cdp/debugger/events.py +164 -0
  50. parsek_cdp/cdp/debugger/functions.py +663 -0
  51. parsek_cdp/cdp/debugger/types.py +171 -0
  52. parsek_cdp/cdp/deviceaccess/__init__.py +15 -0
  53. parsek_cdp/cdp/deviceaccess/events.py +30 -0
  54. parsek_cdp/cdp/deviceaccess/functions.py +54 -0
  55. parsek_cdp/cdp/deviceaccess/types.py +28 -0
  56. parsek_cdp/cdp/deviceorientation/__init__.py +15 -0
  57. parsek_cdp/cdp/deviceorientation/events.py +13 -0
  58. parsek_cdp/cdp/deviceorientation/functions.py +35 -0
  59. parsek_cdp/cdp/deviceorientation/types.py +10 -0
  60. parsek_cdp/cdp/dom/__init__.py +15 -0
  61. parsek_cdp/cdp/dom/events.py +228 -0
  62. parsek_cdp/cdp/dom/functions.py +1033 -0
  63. parsek_cdp/cdp/dom/types.py +293 -0
  64. parsek_cdp/cdp/domdebugger/__init__.py +15 -0
  65. parsek_cdp/cdp/domdebugger/events.py +13 -0
  66. parsek_cdp/cdp/domdebugger/functions.py +155 -0
  67. parsek_cdp/cdp/domdebugger/types.py +57 -0
  68. parsek_cdp/cdp/domsnapshot/__init__.py +15 -0
  69. parsek_cdp/cdp/domsnapshot/events.py +13 -0
  70. parsek_cdp/cdp/domsnapshot/functions.py +111 -0
  71. parsek_cdp/cdp/domsnapshot/types.py +312 -0
  72. parsek_cdp/cdp/domstorage/__init__.py +15 -0
  73. parsek_cdp/cdp/domstorage/events.py +60 -0
  74. parsek_cdp/cdp/domstorage/functions.py +79 -0
  75. parsek_cdp/cdp/domstorage/types.py +30 -0
  76. parsek_cdp/cdp/emulation/__init__.py +15 -0
  77. parsek_cdp/cdp/emulation/events.py +17 -0
  78. parsek_cdp/cdp/emulation/functions.py +688 -0
  79. parsek_cdp/cdp/emulation/types.py +305 -0
  80. parsek_cdp/cdp/eventbreakpoints/__init__.py +15 -0
  81. parsek_cdp/cdp/eventbreakpoints/events.py +13 -0
  82. parsek_cdp/cdp/eventbreakpoints/functions.py +41 -0
  83. parsek_cdp/cdp/eventbreakpoints/types.py +10 -0
  84. parsek_cdp/cdp/extensions/__init__.py +15 -0
  85. parsek_cdp/cdp/extensions/events.py +13 -0
  86. parsek_cdp/cdp/extensions/functions.py +118 -0
  87. parsek_cdp/cdp/extensions/types.py +19 -0
  88. parsek_cdp/cdp/fedcm/__init__.py +15 -0
  89. parsek_cdp/cdp/fedcm/events.py +45 -0
  90. parsek_cdp/cdp/fedcm/functions.py +93 -0
  91. parsek_cdp/cdp/fedcm/types.py +72 -0
  92. parsek_cdp/cdp/fetch/__init__.py +15 -0
  93. parsek_cdp/cdp/fetch/events.py +82 -0
  94. parsek_cdp/cdp/fetch/functions.py +215 -0
  95. parsek_cdp/cdp/fetch/types.py +81 -0
  96. parsek_cdp/cdp/filesystem/__init__.py +15 -0
  97. parsek_cdp/cdp/filesystem/events.py +13 -0
  98. parsek_cdp/cdp/filesystem/functions.py +36 -0
  99. parsek_cdp/cdp/filesystem/types.py +54 -0
  100. parsek_cdp/cdp/headlessexperimental/__init__.py +15 -0
  101. parsek_cdp/cdp/headlessexperimental/events.py +13 -0
  102. parsek_cdp/cdp/headlessexperimental/functions.py +77 -0
  103. parsek_cdp/cdp/headlessexperimental/types.py +24 -0
  104. parsek_cdp/cdp/heapprofiler/__init__.py +15 -0
  105. parsek_cdp/cdp/heapprofiler/events.py +65 -0
  106. parsek_cdp/cdp/heapprofiler/functions.py +193 -0
  107. parsek_cdp/cdp/heapprofiler/types.py +57 -0
  108. parsek_cdp/cdp/indexeddb/__init__.py +15 -0
  109. parsek_cdp/cdp/indexeddb/events.py +13 -0
  110. parsek_cdp/cdp/indexeddb/functions.py +232 -0
  111. parsek_cdp/cdp/indexeddb/types.py +120 -0
  112. parsek_cdp/cdp/input/__init__.py +15 -0
  113. parsek_cdp/cdp/input/events.py +25 -0
  114. parsek_cdp/cdp/input/functions.py +361 -0
  115. parsek_cdp/cdp/input/types.py +87 -0
  116. parsek_cdp/cdp/inspector/__init__.py +15 -0
  117. parsek_cdp/cdp/inspector/events.py +41 -0
  118. parsek_cdp/cdp/inspector/functions.py +27 -0
  119. parsek_cdp/cdp/inspector/types.py +10 -0
  120. parsek_cdp/cdp/io/__init__.py +15 -0
  121. parsek_cdp/cdp/io/events.py +13 -0
  122. parsek_cdp/cdp/io/functions.py +77 -0
  123. parsek_cdp/cdp/io/types.py +13 -0
  124. parsek_cdp/cdp/layertree/__init__.py +15 -0
  125. parsek_cdp/cdp/layertree/events.py +36 -0
  126. parsek_cdp/cdp/layertree/functions.py +178 -0
  127. parsek_cdp/cdp/layertree/types.py +104 -0
  128. parsek_cdp/cdp/log/__init__.py +15 -0
  129. parsek_cdp/cdp/log/events.py +22 -0
  130. parsek_cdp/cdp/log/functions.py +54 -0
  131. parsek_cdp/cdp/log/types.py +57 -0
  132. parsek_cdp/cdp/media/__init__.py +15 -0
  133. parsek_cdp/cdp/media/events.py +87 -0
  134. parsek_cdp/cdp/media/functions.py +27 -0
  135. parsek_cdp/cdp/media/types.py +101 -0
  136. parsek_cdp/cdp/memory/__init__.py +15 -0
  137. parsek_cdp/cdp/memory/events.py +13 -0
  138. parsek_cdp/cdp/memory/functions.py +164 -0
  139. parsek_cdp/cdp/memory/types.py +71 -0
  140. parsek_cdp/cdp/mixins/__init__.py +21 -0
  141. parsek_cdp/cdp/mixins/datatype.py +123 -0
  142. parsek_cdp/cdp/mixins/event.py +78 -0
  143. parsek_cdp/cdp/mixins/namespace.py +31 -0
  144. parsek_cdp/cdp/network/__init__.py +15 -0
  145. parsek_cdp/cdp/network/events.py +726 -0
  146. parsek_cdp/cdp/network/functions.py +734 -0
  147. parsek_cdp/cdp/network/types.py +1247 -0
  148. parsek_cdp/cdp/overlay/__init__.py +15 -0
  149. parsek_cdp/cdp/overlay/events.py +54 -0
  150. parsek_cdp/cdp/overlay/functions.py +407 -0
  151. parsek_cdp/cdp/overlay/types.py +328 -0
  152. parsek_cdp/cdp/page/__init__.py +15 -0
  153. parsek_cdp/cdp/page/events.py +416 -0
  154. parsek_cdp/cdp/page/functions.py +1081 -0
  155. parsek_cdp/cdp/page/types.py +1088 -0
  156. parsek_cdp/cdp/performance/__init__.py +15 -0
  157. parsek_cdp/cdp/performance/events.py +24 -0
  158. parsek_cdp/cdp/performance/functions.py +63 -0
  159. parsek_cdp/cdp/performance/types.py +22 -0
  160. parsek_cdp/cdp/performancetimeline/__init__.py +15 -0
  161. parsek_cdp/cdp/performancetimeline/events.py +22 -0
  162. parsek_cdp/cdp/performancetimeline/functions.py +30 -0
  163. parsek_cdp/cdp/performancetimeline/types.py +85 -0
  164. parsek_cdp/cdp/preload/__init__.py +15 -0
  165. parsek_cdp/cdp/preload/events.py +116 -0
  166. parsek_cdp/cdp/preload/functions.py +25 -0
  167. parsek_cdp/cdp/preload/types.py +267 -0
  168. parsek_cdp/cdp/profiler/__init__.py +15 -0
  169. parsek_cdp/cdp/profiler/events.py +64 -0
  170. parsek_cdp/cdp/profiler/functions.py +134 -0
  171. parsek_cdp/cdp/profiler/types.py +105 -0
  172. parsek_cdp/cdp/pwa/__init__.py +15 -0
  173. parsek_cdp/cdp/pwa/events.py +13 -0
  174. parsek_cdp/cdp/pwa/functions.py +196 -0
  175. parsek_cdp/cdp/pwa/types.py +45 -0
  176. parsek_cdp/cdp/runtime/__init__.py +15 -0
  177. parsek_cdp/cdp/runtime/events.py +123 -0
  178. parsek_cdp/cdp/runtime/functions.py +552 -0
  179. parsek_cdp/cdp/runtime/types.py +319 -0
  180. parsek_cdp/cdp/schema/__init__.py +15 -0
  181. parsek_cdp/cdp/schema/events.py +13 -0
  182. parsek_cdp/cdp/schema/functions.py +32 -0
  183. parsek_cdp/cdp/schema/types.py +22 -0
  184. parsek_cdp/cdp/security/__init__.py +15 -0
  185. parsek_cdp/cdp/security/events.py +64 -0
  186. parsek_cdp/cdp/security/functions.py +66 -0
  187. parsek_cdp/cdp/security/types.py +168 -0
  188. parsek_cdp/cdp/serviceworker/__init__.py +15 -0
  189. parsek_cdp/cdp/serviceworker/events.py +43 -0
  190. parsek_cdp/cdp/serviceworker/functions.py +115 -0
  191. parsek_cdp/cdp/serviceworker/types.py +95 -0
  192. parsek_cdp/cdp/storage/__init__.py +15 -0
  193. parsek_cdp/cdp/storage/events.py +288 -0
  194. parsek_cdp/cdp/storage/functions.py +571 -0
  195. parsek_cdp/cdp/storage/types.py +656 -0
  196. parsek_cdp/cdp/systeminfo/__init__.py +15 -0
  197. parsek_cdp/cdp/systeminfo/events.py +13 -0
  198. parsek_cdp/cdp/systeminfo/functions.py +75 -0
  199. parsek_cdp/cdp/systeminfo/types.py +132 -0
  200. parsek_cdp/cdp/target/__init__.py +15 -0
  201. parsek_cdp/cdp/target/events.py +109 -0
  202. parsek_cdp/cdp/target/functions.py +424 -0
  203. parsek_cdp/cdp/target/types.py +83 -0
  204. parsek_cdp/cdp/tethering/__init__.py +15 -0
  205. parsek_cdp/cdp/tethering/events.py +22 -0
  206. parsek_cdp/cdp/tethering/functions.py +35 -0
  207. parsek_cdp/cdp/tethering/types.py +10 -0
  208. parsek_cdp/cdp/tracing/__init__.py +15 -0
  209. parsek_cdp/cdp/tracing/events.py +61 -0
  210. parsek_cdp/cdp/tracing/functions.py +119 -0
  211. parsek_cdp/cdp/tracing/types.py +81 -0
  212. parsek_cdp/cdp/webaudio/__init__.py +15 -0
  213. parsek_cdp/cdp/webaudio/events.py +184 -0
  214. parsek_cdp/cdp/webaudio/functions.py +51 -0
  215. parsek_cdp/cdp/webaudio/types.py +155 -0
  216. parsek_cdp/cdp/webauthn/__init__.py +15 -0
  217. parsek_cdp/cdp/webauthn/events.py +69 -0
  218. parsek_cdp/cdp/webauthn/functions.py +214 -0
  219. parsek_cdp/cdp/webauthn/types.py +96 -0
  220. parsek_cdp/core/__init__.py +18 -0
  221. parsek_cdp/core/browser.py +240 -0
  222. parsek_cdp/core/browser_context.py +58 -0
  223. parsek_cdp/core/element.py +405 -0
  224. parsek_cdp/core/feature.py +376 -0
  225. parsek_cdp/core/frame.py +351 -0
  226. parsek_cdp/core/pagable.py +175 -0
  227. parsek_cdp/core/page.py +163 -0
  228. parsek_cdp/core/target.py +490 -0
  229. parsek_cdp/features/__init__.py +14 -0
  230. parsek_cdp/features/request_listener/__init__.py +256 -0
  231. parsek_cdp/features/request_listener/events.py +48 -0
  232. parsek_cdp/features/request_listener/types.py +235 -0
  233. parsek_cdp/generate.py +642 -0
  234. parsek_cdp/parsek/__init__.py +18 -0
  235. parsek_cdp/parsek/events.py +38 -0
  236. parsek_cdp/parsek/types.py +36 -0
  237. parsek_cdp/py.typed +0 -0
  238. parsek_cdp-0.1.0.dist-info/METADATA +277 -0
  239. parsek_cdp-0.1.0.dist-info/RECORD +242 -0
  240. parsek_cdp-0.1.0.dist-info/WHEEL +5 -0
  241. parsek_cdp-0.1.0.dist-info/licenses/LICENSE +201 -0
  242. parsek_cdp-0.1.0.dist-info/top_level.txt +1 -0
@@ -0,0 +1,267 @@
1
+ """Custom types and enums for the Preload domain (generated)."""
2
+ from __future__ import annotations
3
+
4
+ from dataclasses import dataclass
5
+ from enum import Enum
6
+ from typing import TYPE_CHECKING, Any, ClassVar, Dict, List, Literal, Optional
7
+
8
+ from ..mixins.datatype import DataType, FieldMeta, register
9
+
10
+ if TYPE_CHECKING:
11
+ from ..dom.types import BackendNodeId as DOM_BackendNodeId
12
+ from ..network.types import LoaderId as Network_LoaderId
13
+ from ..network.types import RequestId as Network_RequestId
14
+
15
+ type RuleSetId = str # Unique id
16
+
17
+
18
+ @register("Preload.RuleSet")
19
+ @dataclass
20
+ class RuleSet(DataType):
21
+ """Corresponds to SpeculationRuleSet"""
22
+ id: RuleSetId
23
+ loader_id: Network_LoaderId
24
+ source_text: str
25
+ backend_node_id: Optional[DOM_BackendNodeId] = None
26
+ url: Optional[str] = None
27
+ request_id: Optional[Network_RequestId] = None
28
+ error_type: Optional[RuleSetErrorType] = None
29
+ error_message: Optional[str] = None
30
+ tag: Optional[str] = None
31
+ __FIELDS__: ClassVar[tuple] = (
32
+ FieldMeta('id', 'id', False, 'primitive'),
33
+ FieldMeta('loader_id', 'loaderId', False, 'primitive'),
34
+ FieldMeta('source_text', 'sourceText', False, 'primitive'),
35
+ FieldMeta('backend_node_id', 'backendNodeId', True, 'primitive'),
36
+ FieldMeta('url', 'url', True, 'primitive'),
37
+ FieldMeta('request_id', 'requestId', True, 'primitive'),
38
+ FieldMeta('error_type', 'errorType', True, 'enum', ref='Preload.RuleSetErrorType'),
39
+ FieldMeta('error_message', 'errorMessage', True, 'primitive'),
40
+ FieldMeta('tag', 'tag', True, 'primitive'),
41
+ )
42
+
43
+
44
+ @register("Preload.RuleSetErrorType")
45
+ class RuleSetErrorType(str, Enum):
46
+ SOURCEISNOTJSONOBJECT = 'SourceIsNotJsonObject'
47
+ INVALIDRULESSKIPPED = 'InvalidRulesSkipped'
48
+ INVALIDRULESETLEVELTAG = 'InvalidRulesetLevelTag'
49
+
50
+
51
+ @register("Preload.SpeculationAction")
52
+ class SpeculationAction(str, Enum):
53
+ """
54
+ The type of preloading attempted. It corresponds to
55
+ mojom::SpeculationAction (although PrefetchWithSubresources is omitted as it
56
+ isn't being used by clients).
57
+ """
58
+ PREFETCH = 'Prefetch'
59
+ PRERENDER = 'Prerender'
60
+ PRERENDERUNTILSCRIPT = 'PrerenderUntilScript'
61
+
62
+
63
+ @register("Preload.SpeculationTargetHint")
64
+ class SpeculationTargetHint(str, Enum):
65
+ """
66
+ Corresponds to mojom::SpeculationTargetHint.
67
+ See https://github.com/WICG/nav-speculation/blob/main/triggers.md#window-name-targeting-hints
68
+ """
69
+ BLANK = 'Blank'
70
+ SELF = 'Self'
71
+
72
+
73
+ @register("Preload.PreloadingAttemptKey")
74
+ @dataclass
75
+ class PreloadingAttemptKey(DataType):
76
+ """
77
+ A key that identifies a preloading attempt.
78
+
79
+ The url used is the url specified by the trigger (i.e. the initial URL), and
80
+ not the final url that is navigated to. For example, prerendering allows
81
+ same-origin main frame navigations during the attempt, but the attempt is
82
+ still keyed with the initial URL.
83
+ """
84
+ loader_id: Network_LoaderId
85
+ action: SpeculationAction
86
+ url: str
87
+ target_hint: Optional[SpeculationTargetHint] = None
88
+ __FIELDS__: ClassVar[tuple] = (
89
+ FieldMeta('loader_id', 'loaderId', False, 'primitive'),
90
+ FieldMeta('action', 'action', False, 'enum', ref='Preload.SpeculationAction'),
91
+ FieldMeta('url', 'url', False, 'primitive'),
92
+ FieldMeta('target_hint', 'targetHint', True, 'enum', ref='Preload.SpeculationTargetHint'),
93
+ )
94
+
95
+
96
+ @register("Preload.PreloadingAttemptSource")
97
+ @dataclass
98
+ class PreloadingAttemptSource(DataType):
99
+ """
100
+ Lists sources for a preloading attempt, specifically the ids of rule sets
101
+ that had a speculation rule that triggered the attempt, and the
102
+ BackendNodeIds of <a href> or <area href> elements that triggered the
103
+ attempt (in the case of attempts triggered by a document rule). It is
104
+ possible for multiple rule sets and links to trigger a single attempt.
105
+ """
106
+ key: PreloadingAttemptKey
107
+ rule_set_ids: List[RuleSetId]
108
+ node_ids: List[DOM_BackendNodeId]
109
+ __FIELDS__: ClassVar[tuple] = (
110
+ FieldMeta('key', 'key', False, 'object', ref='Preload.PreloadingAttemptKey'),
111
+ FieldMeta('rule_set_ids', 'ruleSetIds', False, 'array', inner=FieldMeta('', '', False, 'primitive')),
112
+ FieldMeta('node_ids', 'nodeIds', False, 'array', inner=FieldMeta('', '', False, 'primitive')),
113
+ )
114
+
115
+
116
+ type PreloadPipelineId = str # Chrome manages different types of preloads together using a
117
+
118
+
119
+ @register("Preload.PrerenderFinalStatus")
120
+ class PrerenderFinalStatus(str, Enum):
121
+ """List of FinalStatus reasons for Prerender2."""
122
+ ACTIVATED = 'Activated'
123
+ DESTROYED = 'Destroyed'
124
+ LOWENDDEVICE = 'LowEndDevice'
125
+ INVALIDSCHEMEREDIRECT = 'InvalidSchemeRedirect'
126
+ INVALIDSCHEMENAVIGATION = 'InvalidSchemeNavigation'
127
+ NAVIGATIONREQUESTBLOCKEDBYCSP = 'NavigationRequestBlockedByCsp'
128
+ MOJOBINDERPOLICY = 'MojoBinderPolicy'
129
+ RENDERERPROCESSCRASHED = 'RendererProcessCrashed'
130
+ RENDERERPROCESSKILLED = 'RendererProcessKilled'
131
+ DOWNLOAD = 'Download'
132
+ TRIGGERDESTROYED = 'TriggerDestroyed'
133
+ NAVIGATIONNOTCOMMITTED = 'NavigationNotCommitted'
134
+ NAVIGATIONBADHTTPSTATUS = 'NavigationBadHttpStatus'
135
+ CLIENTCERTREQUESTED = 'ClientCertRequested'
136
+ NAVIGATIONREQUESTNETWORKERROR = 'NavigationRequestNetworkError'
137
+ CANCELALLHOSTSFORTESTING = 'CancelAllHostsForTesting'
138
+ DIDFAILLOAD = 'DidFailLoad'
139
+ STOP = 'Stop'
140
+ SSLCERTIFICATEERROR = 'SslCertificateError'
141
+ LOGINAUTHREQUESTED = 'LoginAuthRequested'
142
+ UACHANGEREQUIRESRELOAD = 'UaChangeRequiresReload'
143
+ BLOCKEDBYCLIENT = 'BlockedByClient'
144
+ AUDIOOUTPUTDEVICEREQUESTED = 'AudioOutputDeviceRequested'
145
+ MIXEDCONTENT = 'MixedContent'
146
+ TRIGGERBACKGROUNDED = 'TriggerBackgrounded'
147
+ MEMORYLIMITEXCEEDED = 'MemoryLimitExceeded'
148
+ DATASAVERENABLED = 'DataSaverEnabled'
149
+ TRIGGERURLHASEFFECTIVEURL = 'TriggerUrlHasEffectiveUrl'
150
+ ACTIVATEDBEFORESTARTED = 'ActivatedBeforeStarted'
151
+ INACTIVEPAGERESTRICTION = 'InactivePageRestriction'
152
+ STARTFAILED = 'StartFailed'
153
+ TIMEOUTBACKGROUNDED = 'TimeoutBackgrounded'
154
+ CROSSSITEREDIRECTININITIALNAVIGATION = 'CrossSiteRedirectInInitialNavigation'
155
+ CROSSSITENAVIGATIONININITIALNAVIGATION = 'CrossSiteNavigationInInitialNavigation'
156
+ SAMESITECROSSORIGINREDIRECTNOTOPTINININITIALNAVIGATION = 'SameSiteCrossOriginRedirectNotOptInInInitialNavigation'
157
+ SAMESITECROSSORIGINNAVIGATIONNOTOPTINININITIALNAVIGATION = 'SameSiteCrossOriginNavigationNotOptInInInitialNavigation'
158
+ ACTIVATIONNAVIGATIONPARAMETERMISMATCH = 'ActivationNavigationParameterMismatch'
159
+ ACTIVATEDINBACKGROUND = 'ActivatedInBackground'
160
+ EMBEDDERHOSTDISALLOWED = 'EmbedderHostDisallowed'
161
+ ACTIVATIONNAVIGATIONDESTROYEDBEFORESUCCESS = 'ActivationNavigationDestroyedBeforeSuccess'
162
+ TABCLOSEDBYUSERGESTURE = 'TabClosedByUserGesture'
163
+ TABCLOSEDWITHOUTUSERGESTURE = 'TabClosedWithoutUserGesture'
164
+ PRIMARYMAINFRAMERENDERERPROCESSCRASHED = 'PrimaryMainFrameRendererProcessCrashed'
165
+ PRIMARYMAINFRAMERENDERERPROCESSKILLED = 'PrimaryMainFrameRendererProcessKilled'
166
+ ACTIVATIONFRAMEPOLICYNOTCOMPATIBLE = 'ActivationFramePolicyNotCompatible'
167
+ PRELOADINGDISABLED = 'PreloadingDisabled'
168
+ BATTERYSAVERENABLED = 'BatterySaverEnabled'
169
+ ACTIVATEDDURINGMAINFRAMENAVIGATION = 'ActivatedDuringMainFrameNavigation'
170
+ PRELOADINGUNSUPPORTEDBYWEBCONTENTS = 'PreloadingUnsupportedByWebContents'
171
+ CROSSSITEREDIRECTINMAINFRAMENAVIGATION = 'CrossSiteRedirectInMainFrameNavigation'
172
+ CROSSSITENAVIGATIONINMAINFRAMENAVIGATION = 'CrossSiteNavigationInMainFrameNavigation'
173
+ SAMESITECROSSORIGINREDIRECTNOTOPTININMAINFRAMENAVIGATION = 'SameSiteCrossOriginRedirectNotOptInInMainFrameNavigation'
174
+ SAMESITECROSSORIGINNAVIGATIONNOTOPTININMAINFRAMENAVIGATION = 'SameSiteCrossOriginNavigationNotOptInInMainFrameNavigation'
175
+ MEMORYPRESSUREONTRIGGER = 'MemoryPressureOnTrigger'
176
+ MEMORYPRESSUREAFTERTRIGGERED = 'MemoryPressureAfterTriggered'
177
+ PRERENDERINGDISABLEDBYDEVTOOLS = 'PrerenderingDisabledByDevTools'
178
+ SPECULATIONRULEREMOVED = 'SpeculationRuleRemoved'
179
+ ACTIVATEDWITHAUXILIARYBROWSINGCONTEXTS = 'ActivatedWithAuxiliaryBrowsingContexts'
180
+ MAXNUMOFRUNNINGEAGERPRERENDERSEXCEEDED = 'MaxNumOfRunningEagerPrerendersExceeded'
181
+ MAXNUMOFRUNNINGNONEAGERPRERENDERSEXCEEDED = 'MaxNumOfRunningNonEagerPrerendersExceeded'
182
+ MAXNUMOFRUNNINGEMBEDDERPRERENDERSEXCEEDED = 'MaxNumOfRunningEmbedderPrerendersExceeded'
183
+ PRERENDERINGURLHASEFFECTIVEURL = 'PrerenderingUrlHasEffectiveUrl'
184
+ REDIRECTEDPRERENDERINGURLHASEFFECTIVEURL = 'RedirectedPrerenderingUrlHasEffectiveUrl'
185
+ ACTIVATIONURLHASEFFECTIVEURL = 'ActivationUrlHasEffectiveUrl'
186
+ JAVASCRIPTINTERFACEADDED = 'JavaScriptInterfaceAdded'
187
+ JAVASCRIPTINTERFACEREMOVED = 'JavaScriptInterfaceRemoved'
188
+ ALLPRERENDERINGCANCELED = 'AllPrerenderingCanceled'
189
+ WINDOWCLOSED = 'WindowClosed'
190
+ SLOWNETWORK = 'SlowNetwork'
191
+ OTHERPRERENDEREDPAGEACTIVATED = 'OtherPrerenderedPageActivated'
192
+ V8OPTIMIZERDISABLED = 'V8OptimizerDisabled'
193
+ PRERENDERFAILEDDURINGPREFETCH = 'PrerenderFailedDuringPrefetch'
194
+ BROWSINGDATAREMOVED = 'BrowsingDataRemoved'
195
+ PRERENDERHOSTREUSED = 'PrerenderHostReused'
196
+
197
+
198
+ @register("Preload.PreloadingStatus")
199
+ class PreloadingStatus(str, Enum):
200
+ """
201
+ Preloading status values, see also PreloadingTriggeringOutcome. This
202
+ status is shared by prefetchStatusUpdated and prerenderStatusUpdated.
203
+ """
204
+ PENDING = 'Pending'
205
+ RUNNING = 'Running'
206
+ READY = 'Ready'
207
+ SUCCESS = 'Success'
208
+ FAILURE = 'Failure'
209
+ NOTSUPPORTED = 'NotSupported'
210
+
211
+
212
+ @register("Preload.PrefetchStatus")
213
+ class PrefetchStatus(str, Enum):
214
+ """
215
+ TODO(https://crbug.com/1384419): revisit the list of PrefetchStatus and
216
+ filter out the ones that aren't necessary to the developers.
217
+ """
218
+ PREFETCHALLOWED = 'PrefetchAllowed'
219
+ PREFETCHFAILEDINELIGIBLEREDIRECT = 'PrefetchFailedIneligibleRedirect'
220
+ PREFETCHFAILEDINVALIDREDIRECT = 'PrefetchFailedInvalidRedirect'
221
+ PREFETCHFAILEDMIMENOTSUPPORTED = 'PrefetchFailedMIMENotSupported'
222
+ PREFETCHFAILEDNETERROR = 'PrefetchFailedNetError'
223
+ PREFETCHFAILEDNON2XX = 'PrefetchFailedNon2XX'
224
+ PREFETCHEVICTEDAFTERBROWSINGDATAREMOVED = 'PrefetchEvictedAfterBrowsingDataRemoved'
225
+ PREFETCHEVICTEDAFTERCANDIDATEREMOVED = 'PrefetchEvictedAfterCandidateRemoved'
226
+ PREFETCHEVICTEDFORNEWERPREFETCH = 'PrefetchEvictedForNewerPrefetch'
227
+ PREFETCHHELDBACK = 'PrefetchHeldback'
228
+ PREFETCHINELIGIBLERETRYAFTER = 'PrefetchIneligibleRetryAfter'
229
+ PREFETCHISPRIVACYDECOY = 'PrefetchIsPrivacyDecoy'
230
+ PREFETCHISSTALE = 'PrefetchIsStale'
231
+ PREFETCHNOTELIGIBLEBROWSERCONTEXTOFFTHERECORD = 'PrefetchNotEligibleBrowserContextOffTheRecord'
232
+ PREFETCHNOTELIGIBLEDATASAVERENABLED = 'PrefetchNotEligibleDataSaverEnabled'
233
+ PREFETCHNOTELIGIBLEEXISTINGPROXY = 'PrefetchNotEligibleExistingProxy'
234
+ PREFETCHNOTELIGIBLEHOSTISNONUNIQUE = 'PrefetchNotEligibleHostIsNonUnique'
235
+ PREFETCHNOTELIGIBLENONDEFAULTSTORAGEPARTITION = 'PrefetchNotEligibleNonDefaultStoragePartition'
236
+ PREFETCHNOTELIGIBLESAMESITECROSSORIGINPREFETCHREQUIREDPROXY = 'PrefetchNotEligibleSameSiteCrossOriginPrefetchRequiredProxy'
237
+ PREFETCHNOTELIGIBLESCHEMEISNOTHTTPS = 'PrefetchNotEligibleSchemeIsNotHttps'
238
+ PREFETCHNOTELIGIBLEUSERHASCOOKIES = 'PrefetchNotEligibleUserHasCookies'
239
+ PREFETCHNOTELIGIBLEUSERHASSERVICEWORKER = 'PrefetchNotEligibleUserHasServiceWorker'
240
+ PREFETCHNOTELIGIBLEUSERHASSERVICEWORKERNOFETCHHANDLER = 'PrefetchNotEligibleUserHasServiceWorkerNoFetchHandler'
241
+ PREFETCHNOTELIGIBLEREDIRECTFROMSERVICEWORKER = 'PrefetchNotEligibleRedirectFromServiceWorker'
242
+ PREFETCHNOTELIGIBLEREDIRECTTOSERVICEWORKER = 'PrefetchNotEligibleRedirectToServiceWorker'
243
+ PREFETCHNOTELIGIBLEBATTERYSAVERENABLED = 'PrefetchNotEligibleBatterySaverEnabled'
244
+ PREFETCHNOTELIGIBLEPRELOADINGDISABLED = 'PrefetchNotEligiblePreloadingDisabled'
245
+ PREFETCHNOTFINISHEDINTIME = 'PrefetchNotFinishedInTime'
246
+ PREFETCHNOTSTARTED = 'PrefetchNotStarted'
247
+ PREFETCHNOTUSEDCOOKIESCHANGED = 'PrefetchNotUsedCookiesChanged'
248
+ PREFETCHPROXYNOTAVAILABLE = 'PrefetchProxyNotAvailable'
249
+ PREFETCHRESPONSEUSED = 'PrefetchResponseUsed'
250
+ PREFETCHSUCCESSFULBUTNOTUSED = 'PrefetchSuccessfulButNotUsed'
251
+ PREFETCHNOTUSEDPROBEFAILED = 'PrefetchNotUsedProbeFailed'
252
+
253
+
254
+ @register("Preload.PrerenderMismatchedHeaders")
255
+ @dataclass
256
+ class PrerenderMismatchedHeaders(DataType):
257
+ """Information of headers to be displayed when the header mismatch occurred."""
258
+ header_name: str
259
+ initial_value: Optional[str] = None
260
+ activation_value: Optional[str] = None
261
+ __FIELDS__: ClassVar[tuple] = (
262
+ FieldMeta('header_name', 'headerName', False, 'primitive'),
263
+ FieldMeta('initial_value', 'initialValue', True, 'primitive'),
264
+ FieldMeta('activation_value', 'activationValue', True, 'primitive'),
265
+ )
266
+
267
+ __all__ = ["PrefetchStatus", "PreloadPipelineId", "PreloadingAttemptKey", "PreloadingAttemptSource", "PreloadingStatus", "PrerenderFinalStatus", "PrerenderMismatchedHeaders", "RuleSet", "RuleSetErrorType", "RuleSetId", "SpeculationAction", "SpeculationTargetHint"]
@@ -0,0 +1,15 @@
1
+ """The Profiler CDP domain (generated).
2
+
3
+ Importing ``Profiler`` from ``parsek_cdp.cdp`` gives a namespace with this
4
+ domain's events and types as attributes (``Profiler.SomeEvent`` /
5
+ ``Profiler.SomeType``); commands run on a target via ``page.cdp.Profiler``.
6
+ """
7
+ from . import events, functions, types
8
+ from .functions import Profiler
9
+ from .events import * # noqa: F401,F403 -- expose events on the namespace
10
+ from .types import * # noqa: F401,F403 -- expose types on the namespace
11
+
12
+ #: Protocol domain name (used by features that declare ``domains=(Profiler,)``).
13
+ DOMAIN = "Profiler"
14
+
15
+ __all__ = ["events", "functions", "types", "Profiler", "DOMAIN"]
@@ -0,0 +1,64 @@
1
+ """Events for the Profiler domain (generated)."""
2
+ from __future__ import annotations
3
+
4
+ from dataclasses import dataclass
5
+ from typing import TYPE_CHECKING, Any, ClassVar, Dict, List, Literal, Optional
6
+
7
+ from ..mixins.datatype import FieldMeta
8
+ from ..mixins.event import Event, register_event
9
+
10
+ if TYPE_CHECKING:
11
+ from .types import (
12
+ Profile,
13
+ ScriptCoverage,
14
+ )
15
+ from ..debugger.types import Location as Debugger_Location
16
+
17
+ @register_event("Profiler.consoleProfileFinished")
18
+ @dataclass
19
+ class ConsoleProfileFinished(Event):
20
+ id: str
21
+ location: Debugger_Location
22
+ profile: Profile
23
+ title: Optional[str] = None
24
+ __FIELDS__: ClassVar[tuple] = (
25
+ FieldMeta('id', 'id', False, 'primitive'),
26
+ FieldMeta('location', 'location', False, 'object', ref='Debugger.Location'),
27
+ FieldMeta('profile', 'profile', False, 'object', ref='Profiler.Profile'),
28
+ FieldMeta('title', 'title', True, 'primitive'),
29
+ )
30
+
31
+
32
+ @register_event("Profiler.consoleProfileStarted")
33
+ @dataclass
34
+ class ConsoleProfileStarted(Event):
35
+ """Sent when new profile recording is started using console.profile() call."""
36
+ id: str
37
+ location: Debugger_Location
38
+ title: Optional[str] = None
39
+ __FIELDS__: ClassVar[tuple] = (
40
+ FieldMeta('id', 'id', False, 'primitive'),
41
+ FieldMeta('location', 'location', False, 'object', ref='Debugger.Location'),
42
+ FieldMeta('title', 'title', True, 'primitive'),
43
+ )
44
+
45
+
46
+ @register_event("Profiler.preciseCoverageDeltaUpdate")
47
+ @dataclass
48
+ class PreciseCoverageDeltaUpdate(Event):
49
+ """
50
+ Reports coverage delta since the last poll (either from an event like this, or from
51
+ `takePreciseCoverage` for the current isolate. May only be sent if precise code
52
+ coverage has been started. This event can be trigged by the embedder to, for example,
53
+ trigger collection of coverage data immediately at a certain point in time.
54
+ """
55
+ timestamp: float
56
+ occasion: str
57
+ result: List[ScriptCoverage]
58
+ __FIELDS__: ClassVar[tuple] = (
59
+ FieldMeta('timestamp', 'timestamp', False, 'primitive'),
60
+ FieldMeta('occasion', 'occasion', False, 'primitive'),
61
+ FieldMeta('result', 'result', False, 'array', inner=FieldMeta('', '', False, 'object', ref='Profiler.ScriptCoverage')),
62
+ )
63
+
64
+ __all__ = ["ConsoleProfileFinished", "ConsoleProfileStarted", "PreciseCoverageDeltaUpdate"]
@@ -0,0 +1,134 @@
1
+ """Commands for the Profiler domain (generated)."""
2
+ from __future__ import annotations
3
+
4
+ from dataclasses import dataclass
5
+ from typing import TYPE_CHECKING, Any, ClassVar, Dict, List, Literal, Optional
6
+
7
+ from ..mixins.datatype import DataType, FieldMeta, encode
8
+
9
+ if TYPE_CHECKING:
10
+ from .types import (
11
+ Profile,
12
+ ScriptCoverage,
13
+ )
14
+
15
+ @dataclass
16
+ class GetBestEffortCoverageReturn(DataType):
17
+ """Return value of :meth:`Profiler.get_best_effort_coverage`."""
18
+ result: List[ScriptCoverage]
19
+ __FIELDS__: ClassVar[tuple] = (
20
+ FieldMeta('result', 'result', False, 'array', inner=FieldMeta('', '', False, 'object', ref='Profiler.ScriptCoverage')),
21
+ )
22
+
23
+
24
+ @dataclass
25
+ class StartPreciseCoverageReturn(DataType):
26
+ """Return value of :meth:`Profiler.start_precise_coverage`."""
27
+ timestamp: float
28
+ __FIELDS__: ClassVar[tuple] = (
29
+ FieldMeta('timestamp', 'timestamp', False, 'primitive'),
30
+ )
31
+
32
+
33
+ @dataclass
34
+ class StopReturn(DataType):
35
+ """Return value of :meth:`Profiler.stop`."""
36
+ profile: Profile
37
+ __FIELDS__: ClassVar[tuple] = (
38
+ FieldMeta('profile', 'profile', False, 'object', ref='Profiler.Profile'),
39
+ )
40
+
41
+
42
+ @dataclass
43
+ class TakePreciseCoverageReturn(DataType):
44
+ """Return value of :meth:`Profiler.take_precise_coverage`."""
45
+ result: List[ScriptCoverage]
46
+ timestamp: float
47
+ __FIELDS__: ClassVar[tuple] = (
48
+ FieldMeta('result', 'result', False, 'array', inner=FieldMeta('', '', False, 'object', ref='Profiler.ScriptCoverage')),
49
+ FieldMeta('timestamp', 'timestamp', False, 'primitive'),
50
+ )
51
+
52
+
53
+ class Profiler:
54
+ """Commands of the Profiler domain, bound to a target."""
55
+
56
+ def __init__(self, target: Any) -> None:
57
+ self._target = target
58
+
59
+
60
+ async def disable(self) -> None:
61
+ _params: Dict[str, Any] = {}
62
+ _result = await self._target.send('Profiler.disable', _params)
63
+ return None
64
+
65
+ async def enable(self) -> None:
66
+ _params: Dict[str, Any] = {}
67
+ _result = await self._target.send('Profiler.enable', _params)
68
+ return None
69
+
70
+ async def get_best_effort_coverage(self) -> GetBestEffortCoverageReturn:
71
+ """
72
+ Collect coverage data for the current isolate. The coverage data may be incomplete due to
73
+ garbage collection.
74
+ """
75
+ _params: Dict[str, Any] = {}
76
+ _result = await self._target.send('Profiler.getBestEffortCoverage', _params)
77
+ return GetBestEffortCoverageReturn.from_json(_result)
78
+
79
+ async def set_sampling_interval(self, *, interval: int) -> None:
80
+ """
81
+ Changes CPU profiler sampling interval. Must be called before CPU profiles recording started.
82
+ :param interval: New sampling interval in microseconds.
83
+ """
84
+ _params: Dict[str, Any] = {}
85
+ _params['interval'] = encode(FieldMeta('', '', False, 'primitive'), interval)
86
+ _result = await self._target.send('Profiler.setSamplingInterval', _params)
87
+ return None
88
+
89
+ async def start(self) -> None:
90
+ _params: Dict[str, Any] = {}
91
+ _result = await self._target.send('Profiler.start', _params)
92
+ return None
93
+
94
+ async def start_precise_coverage(self, *, call_count: Optional[bool] = None, detailed: Optional[bool] = None, allow_triggered_updates: Optional[bool] = None) -> StartPreciseCoverageReturn:
95
+ """
96
+ Enable precise code coverage. Coverage data for JavaScript executed before enabling precise code
97
+ coverage may be incomplete. Enabling prevents running optimized code and resets execution
98
+ counters.
99
+ :param call_count: Collect accurate call counts beyond simple 'covered' or 'not covered'.
100
+ :param detailed: Collect block-based coverage.
101
+ :param allow_triggered_updates: Allow the backend to send updates on its own initiative
102
+ """
103
+ _params: Dict[str, Any] = {}
104
+ if call_count is not None:
105
+ _params['callCount'] = encode(FieldMeta('', '', False, 'primitive'), call_count)
106
+ if detailed is not None:
107
+ _params['detailed'] = encode(FieldMeta('', '', False, 'primitive'), detailed)
108
+ if allow_triggered_updates is not None:
109
+ _params['allowTriggeredUpdates'] = encode(FieldMeta('', '', False, 'primitive'), allow_triggered_updates)
110
+ _result = await self._target.send('Profiler.startPreciseCoverage', _params)
111
+ return StartPreciseCoverageReturn.from_json(_result)
112
+
113
+ async def stop(self) -> StopReturn:
114
+ _params: Dict[str, Any] = {}
115
+ _result = await self._target.send('Profiler.stop', _params)
116
+ return StopReturn.from_json(_result)
117
+
118
+ async def stop_precise_coverage(self) -> None:
119
+ """
120
+ Disable precise code coverage. Disabling releases unnecessary execution count records and allows
121
+ executing optimized code.
122
+ """
123
+ _params: Dict[str, Any] = {}
124
+ _result = await self._target.send('Profiler.stopPreciseCoverage', _params)
125
+ return None
126
+
127
+ async def take_precise_coverage(self) -> TakePreciseCoverageReturn:
128
+ """
129
+ Collect coverage data for the current isolate, and resets execution counters. Precise code
130
+ coverage needs to have started.
131
+ """
132
+ _params: Dict[str, Any] = {}
133
+ _result = await self._target.send('Profiler.takePreciseCoverage', _params)
134
+ return TakePreciseCoverageReturn.from_json(_result)
@@ -0,0 +1,105 @@
1
+ """Custom types and enums for the Profiler domain (generated)."""
2
+ from __future__ import annotations
3
+
4
+ from dataclasses import dataclass
5
+ from enum import Enum
6
+ from typing import TYPE_CHECKING, Any, ClassVar, Dict, List, Literal, Optional
7
+
8
+ from ..mixins.datatype import DataType, FieldMeta, register
9
+
10
+ if TYPE_CHECKING:
11
+ from ..runtime.types import CallFrame as Runtime_CallFrame
12
+ from ..runtime.types import ScriptId as Runtime_ScriptId
13
+
14
+ @register("Profiler.ProfileNode")
15
+ @dataclass
16
+ class ProfileNode(DataType):
17
+ """Profile node. Holds callsite information, execution statistics and child nodes."""
18
+ id: int
19
+ call_frame: Runtime_CallFrame
20
+ hit_count: Optional[int] = None
21
+ children: Optional[List[int]] = None
22
+ deopt_reason: Optional[str] = None
23
+ position_ticks: Optional[List[PositionTickInfo]] = None
24
+ __FIELDS__: ClassVar[tuple] = (
25
+ FieldMeta('id', 'id', False, 'primitive'),
26
+ FieldMeta('call_frame', 'callFrame', False, 'object', ref='Runtime.CallFrame'),
27
+ FieldMeta('hit_count', 'hitCount', True, 'primitive'),
28
+ FieldMeta('children', 'children', True, 'array', inner=FieldMeta('', '', False, 'primitive')),
29
+ FieldMeta('deopt_reason', 'deoptReason', True, 'primitive'),
30
+ FieldMeta('position_ticks', 'positionTicks', True, 'array', inner=FieldMeta('', '', False, 'object', ref='Profiler.PositionTickInfo')),
31
+ )
32
+
33
+
34
+ @register("Profiler.Profile")
35
+ @dataclass
36
+ class Profile(DataType):
37
+ """Profile."""
38
+ nodes: List[ProfileNode]
39
+ start_time: float
40
+ end_time: float
41
+ samples: Optional[List[int]] = None
42
+ time_deltas: Optional[List[int]] = None
43
+ __FIELDS__: ClassVar[tuple] = (
44
+ FieldMeta('nodes', 'nodes', False, 'array', inner=FieldMeta('', '', False, 'object', ref='Profiler.ProfileNode')),
45
+ FieldMeta('start_time', 'startTime', False, 'primitive'),
46
+ FieldMeta('end_time', 'endTime', False, 'primitive'),
47
+ FieldMeta('samples', 'samples', True, 'array', inner=FieldMeta('', '', False, 'primitive')),
48
+ FieldMeta('time_deltas', 'timeDeltas', True, 'array', inner=FieldMeta('', '', False, 'primitive')),
49
+ )
50
+
51
+
52
+ @register("Profiler.PositionTickInfo")
53
+ @dataclass
54
+ class PositionTickInfo(DataType):
55
+ """Specifies a number of samples attributed to a certain source position."""
56
+ line: int
57
+ ticks: int
58
+ __FIELDS__: ClassVar[tuple] = (
59
+ FieldMeta('line', 'line', False, 'primitive'),
60
+ FieldMeta('ticks', 'ticks', False, 'primitive'),
61
+ )
62
+
63
+
64
+ @register("Profiler.CoverageRange")
65
+ @dataclass
66
+ class CoverageRange(DataType):
67
+ """Coverage data for a source range."""
68
+ start_offset: int
69
+ end_offset: int
70
+ count: int
71
+ __FIELDS__: ClassVar[tuple] = (
72
+ FieldMeta('start_offset', 'startOffset', False, 'primitive'),
73
+ FieldMeta('end_offset', 'endOffset', False, 'primitive'),
74
+ FieldMeta('count', 'count', False, 'primitive'),
75
+ )
76
+
77
+
78
+ @register("Profiler.FunctionCoverage")
79
+ @dataclass
80
+ class FunctionCoverage(DataType):
81
+ """Coverage data for a JavaScript function."""
82
+ function_name: str
83
+ ranges: List[CoverageRange]
84
+ is_block_coverage: bool
85
+ __FIELDS__: ClassVar[tuple] = (
86
+ FieldMeta('function_name', 'functionName', False, 'primitive'),
87
+ FieldMeta('ranges', 'ranges', False, 'array', inner=FieldMeta('', '', False, 'object', ref='Profiler.CoverageRange')),
88
+ FieldMeta('is_block_coverage', 'isBlockCoverage', False, 'primitive'),
89
+ )
90
+
91
+
92
+ @register("Profiler.ScriptCoverage")
93
+ @dataclass
94
+ class ScriptCoverage(DataType):
95
+ """Coverage data for a JavaScript script."""
96
+ script_id: Runtime_ScriptId
97
+ url: str
98
+ functions: List[FunctionCoverage]
99
+ __FIELDS__: ClassVar[tuple] = (
100
+ FieldMeta('script_id', 'scriptId', False, 'primitive'),
101
+ FieldMeta('url', 'url', False, 'primitive'),
102
+ FieldMeta('functions', 'functions', False, 'array', inner=FieldMeta('', '', False, 'object', ref='Profiler.FunctionCoverage')),
103
+ )
104
+
105
+ __all__ = ["CoverageRange", "FunctionCoverage", "PositionTickInfo", "Profile", "ProfileNode", "ScriptCoverage"]
@@ -0,0 +1,15 @@
1
+ """The PWA CDP domain (generated).
2
+
3
+ Importing ``PWA`` from ``parsek_cdp.cdp`` gives a namespace with this
4
+ domain's events and types as attributes (``PWA.SomeEvent`` /
5
+ ``PWA.SomeType``); commands run on a target via ``page.cdp.PWA``.
6
+ """
7
+ from . import events, functions, types
8
+ from .functions import PWA
9
+ from .events import * # noqa: F401,F403 -- expose events on the namespace
10
+ from .types import * # noqa: F401,F403 -- expose types on the namespace
11
+
12
+ #: Protocol domain name (used by features that declare ``domains=(PWA,)``).
13
+ DOMAIN = "PWA"
14
+
15
+ __all__ = ["events", "functions", "types", "PWA", "DOMAIN"]
@@ -0,0 +1,13 @@
1
+ """Events for the PWA domain (generated)."""
2
+ from __future__ import annotations
3
+
4
+ from dataclasses import dataclass
5
+ from typing import Any, ClassVar, Dict, List, Literal, Optional
6
+
7
+ from ..mixins.datatype import FieldMeta
8
+ from ..mixins.event import Event, register_event
9
+
10
+
11
+ # This domain defines no events.
12
+
13
+ __all__ = []