opal 1.6.1 → 1.7.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (212) hide show
  1. checksums.yaml +4 -4
  2. data/.github/workflows/build.yml +17 -0
  3. data/CHANGELOG.md +35 -1
  4. data/Gemfile +1 -0
  5. data/HACKING.md +47 -26
  6. data/benchmark/benchmarks +415 -103
  7. data/benchmark/bm_call_overhead.yml +28 -0
  8. data/benchmark/run.rb +61 -40
  9. data/docs/cdp_common.json +3364 -0
  10. data/docs/cdp_common.md +18 -0
  11. data/docs/{headless_chrome.md → headless_browsers.md} +31 -12
  12. data/lib/opal/ast/builder.rb +1 -1
  13. data/lib/opal/builder.rb +6 -1
  14. data/lib/opal/builder_processors.rb +5 -3
  15. data/lib/opal/cache.rb +1 -7
  16. data/lib/opal/cli_options.rb +72 -58
  17. data/lib/opal/cli_runners/chrome.rb +47 -9
  18. data/lib/opal/cli_runners/chrome_cdp_interface.rb +238 -112
  19. data/lib/opal/cli_runners/compiler.rb +146 -13
  20. data/lib/opal/cli_runners/deno.rb +32 -0
  21. data/lib/opal/cli_runners/firefox.rb +350 -0
  22. data/lib/opal/cli_runners/firefox_cdp_interface.rb +212 -0
  23. data/lib/opal/cli_runners/node_modules/.bin/chrome-remote-interface.cmd +17 -0
  24. data/lib/opal/cli_runners/node_modules/.bin/chrome-remote-interface.ps1 +28 -0
  25. data/lib/opal/cli_runners/node_modules/.package-lock.json +41 -0
  26. data/lib/opal/cli_runners/node_modules/chrome-remote-interface/LICENSE +1 -1
  27. data/lib/opal/cli_runners/node_modules/chrome-remote-interface/README.md +322 -182
  28. data/lib/opal/cli_runners/node_modules/chrome-remote-interface/bin/client.js +99 -114
  29. data/lib/opal/cli_runners/node_modules/chrome-remote-interface/chrome-remote-interface.js +1 -11
  30. data/lib/opal/cli_runners/node_modules/chrome-remote-interface/index.js +16 -11
  31. data/lib/opal/cli_runners/node_modules/chrome-remote-interface/lib/api.js +41 -33
  32. data/lib/opal/cli_runners/node_modules/chrome-remote-interface/lib/chrome.js +224 -214
  33. data/lib/opal/cli_runners/node_modules/chrome-remote-interface/lib/devtools.js +71 -191
  34. data/lib/opal/cli_runners/node_modules/chrome-remote-interface/lib/external-request.js +26 -6
  35. data/lib/opal/cli_runners/node_modules/chrome-remote-interface/lib/protocol.json +20788 -9049
  36. data/lib/opal/cli_runners/node_modules/chrome-remote-interface/lib/websocket-wrapper.js +10 -3
  37. data/lib/opal/cli_runners/node_modules/chrome-remote-interface/package.json +59 -123
  38. data/lib/opal/cli_runners/node_modules/chrome-remote-interface/webpack.config.js +25 -32
  39. data/lib/opal/cli_runners/node_modules/commander/History.md +298 -0
  40. data/lib/opal/cli_runners/node_modules/commander/LICENSE +22 -0
  41. data/lib/opal/cli_runners/node_modules/commander/Readme.md +217 -61
  42. data/lib/opal/cli_runners/node_modules/commander/index.js +431 -145
  43. data/lib/opal/cli_runners/node_modules/commander/package.json +16 -79
  44. data/lib/opal/cli_runners/node_modules/ws/README.md +334 -98
  45. data/lib/opal/cli_runners/node_modules/ws/browser.js +8 -0
  46. data/lib/opal/cli_runners/node_modules/ws/index.js +5 -10
  47. data/lib/opal/cli_runners/node_modules/ws/lib/buffer-util.js +129 -0
  48. data/lib/opal/cli_runners/node_modules/ws/lib/constants.js +10 -0
  49. data/lib/opal/cli_runners/node_modules/ws/lib/event-target.js +184 -0
  50. data/lib/opal/cli_runners/node_modules/ws/lib/extension.js +223 -0
  51. data/lib/opal/cli_runners/node_modules/ws/lib/limiter.js +55 -0
  52. data/lib/opal/cli_runners/node_modules/ws/lib/permessage-deflate.js +518 -0
  53. data/lib/opal/cli_runners/node_modules/ws/lib/receiver.js +607 -0
  54. data/lib/opal/cli_runners/node_modules/ws/lib/sender.js +409 -0
  55. data/lib/opal/cli_runners/node_modules/ws/lib/stream.js +180 -0
  56. data/lib/opal/cli_runners/node_modules/ws/lib/validation.js +104 -0
  57. data/lib/opal/cli_runners/node_modules/ws/lib/websocket-server.js +447 -0
  58. data/lib/opal/cli_runners/node_modules/ws/lib/websocket.js +1195 -0
  59. data/lib/opal/cli_runners/node_modules/ws/package.json +40 -106
  60. data/lib/opal/cli_runners/package-lock.json +62 -0
  61. data/lib/opal/cli_runners/package.json +1 -1
  62. data/lib/opal/cli_runners.rb +26 -4
  63. data/lib/opal/nodes/args/prepare_post_args.rb +2 -2
  64. data/lib/opal/nodes/def.rb +8 -8
  65. data/lib/opal/nodes/iter.rb +12 -12
  66. data/lib/opal/nodes/logic.rb +1 -1
  67. data/lib/opal/nodes/masgn.rb +2 -2
  68. data/lib/opal/parser/with_ruby_lexer.rb +1 -1
  69. data/lib/opal/paths.rb +14 -0
  70. data/lib/opal/rewriter.rb +2 -0
  71. data/lib/opal/rewriters/forward_args.rb +52 -4
  72. data/lib/opal/rewriters/targeted_patches.rb +94 -0
  73. data/lib/opal/version.rb +1 -1
  74. data/opal/corelib/basic_object.rb +1 -1
  75. data/opal/corelib/boolean.rb +2 -2
  76. data/opal/corelib/class.rb +11 -0
  77. data/opal/corelib/constants.rb +3 -3
  78. data/opal/corelib/enumerable.rb +4 -0
  79. data/opal/corelib/enumerator.rb +1 -1
  80. data/opal/corelib/hash.rb +2 -2
  81. data/opal/corelib/helpers.rb +1 -1
  82. data/opal/corelib/kernel.rb +3 -3
  83. data/opal/corelib/method.rb +1 -1
  84. data/opal/corelib/module.rb +29 -8
  85. data/opal/corelib/proc.rb +7 -5
  86. data/opal/corelib/runtime.js +141 -78
  87. data/opal/corelib/set.rb +252 -0
  88. data/opal/corelib/string.rb +2 -1
  89. data/opal/corelib/time.rb +2 -2
  90. data/opal/opal.rb +1 -0
  91. data/opal.gemspec +1 -0
  92. data/spec/filters/bugs/array.rb +22 -13
  93. data/spec/filters/bugs/base64.rb +5 -5
  94. data/spec/filters/bugs/basicobject.rb +16 -8
  95. data/spec/filters/bugs/bigdecimal.rb +161 -160
  96. data/spec/filters/bugs/binding.rb +10 -10
  97. data/spec/filters/bugs/class.rb +8 -8
  98. data/spec/filters/bugs/complex.rb +2 -1
  99. data/spec/filters/bugs/date.rb +79 -81
  100. data/spec/filters/bugs/datetime.rb +29 -29
  101. data/spec/filters/bugs/delegate.rb +1 -3
  102. data/spec/filters/bugs/encoding.rb +69 -69
  103. data/spec/filters/bugs/enumerable.rb +22 -20
  104. data/spec/filters/bugs/enumerator.rb +88 -85
  105. data/spec/filters/bugs/exception.rb +46 -40
  106. data/spec/filters/bugs/file.rb +32 -32
  107. data/spec/filters/bugs/float.rb +26 -21
  108. data/spec/filters/bugs/freeze.rb +88 -0
  109. data/spec/filters/bugs/hash.rb +39 -38
  110. data/spec/filters/bugs/integer.rb +57 -44
  111. data/spec/filters/bugs/io.rb +1 -1
  112. data/spec/filters/bugs/kernel.rb +349 -269
  113. data/spec/filters/bugs/language.rb +220 -188
  114. data/spec/filters/bugs/main.rb +5 -3
  115. data/spec/filters/bugs/marshal.rb +38 -38
  116. data/spec/filters/bugs/math.rb +2 -1
  117. data/spec/filters/bugs/method.rb +73 -62
  118. data/spec/filters/bugs/module.rb +163 -143
  119. data/spec/filters/bugs/numeric.rb +6 -6
  120. data/spec/filters/bugs/objectspace.rb +16 -16
  121. data/spec/filters/bugs/openstruct.rb +1 -1
  122. data/spec/filters/bugs/pack_unpack.rb +51 -51
  123. data/spec/filters/bugs/pathname.rb +7 -7
  124. data/spec/filters/bugs/proc.rb +63 -63
  125. data/spec/filters/bugs/random.rb +7 -6
  126. data/spec/filters/bugs/range.rb +12 -9
  127. data/spec/filters/bugs/rational.rb +8 -7
  128. data/spec/filters/bugs/regexp.rb +49 -48
  129. data/spec/filters/bugs/ruby-32.rb +56 -0
  130. data/spec/filters/bugs/set.rb +30 -30
  131. data/spec/filters/bugs/singleton.rb +4 -4
  132. data/spec/filters/bugs/string.rb +187 -99
  133. data/spec/filters/bugs/stringio.rb +7 -0
  134. data/spec/filters/bugs/stringscanner.rb +68 -68
  135. data/spec/filters/bugs/struct.rb +11 -9
  136. data/spec/filters/bugs/symbol.rb +1 -1
  137. data/spec/filters/bugs/time.rb +78 -63
  138. data/spec/filters/bugs/trace_point.rb +4 -4
  139. data/spec/filters/bugs/unboundmethod.rb +32 -17
  140. data/spec/filters/bugs/warnings.rb +8 -12
  141. data/spec/filters/unsupported/array.rb +24 -107
  142. data/spec/filters/unsupported/basicobject.rb +12 -12
  143. data/spec/filters/unsupported/bignum.rb +27 -52
  144. data/spec/filters/unsupported/class.rb +1 -2
  145. data/spec/filters/unsupported/delegator.rb +3 -3
  146. data/spec/filters/unsupported/enumerable.rb +2 -9
  147. data/spec/filters/unsupported/enumerator.rb +2 -11
  148. data/spec/filters/unsupported/file.rb +1 -1
  149. data/spec/filters/unsupported/float.rb +28 -47
  150. data/spec/filters/unsupported/hash.rb +8 -14
  151. data/spec/filters/unsupported/integer.rb +75 -91
  152. data/spec/filters/unsupported/kernel.rb +17 -35
  153. data/spec/filters/unsupported/language.rb +11 -19
  154. data/spec/filters/unsupported/marshal.rb +22 -41
  155. data/spec/filters/unsupported/matchdata.rb +28 -52
  156. data/spec/filters/unsupported/math.rb +1 -1
  157. data/spec/filters/unsupported/privacy.rb +229 -285
  158. data/spec/filters/unsupported/range.rb +1 -5
  159. data/spec/filters/unsupported/regexp.rb +40 -66
  160. data/spec/filters/unsupported/set.rb +2 -2
  161. data/spec/filters/unsupported/singleton.rb +4 -4
  162. data/spec/filters/unsupported/string.rb +305 -508
  163. data/spec/filters/unsupported/struct.rb +3 -4
  164. data/spec/filters/unsupported/symbol.rb +15 -18
  165. data/spec/filters/unsupported/thread.rb +1 -7
  166. data/spec/filters/unsupported/time.rb +159 -202
  167. data/spec/filters/unsupported/usage_of_files.rb +170 -259
  168. data/spec/lib/builder_spec.rb +4 -4
  169. data/spec/lib/rewriters/forward_args_spec.rb +32 -12
  170. data/spec/mspec-opal/runner.rb +2 -0
  171. data/spec/ruby_specs +4 -0
  172. data/stdlib/deno/base.rb +28 -0
  173. data/stdlib/deno/file.rb +340 -0
  174. data/stdlib/{headless_chrome.rb → headless_browser/base.rb} +1 -1
  175. data/stdlib/headless_browser/file.rb +15 -0
  176. data/stdlib/headless_browser.rb +4 -0
  177. data/stdlib/native.rb +1 -1
  178. data/stdlib/nodejs/file.rb +5 -0
  179. data/stdlib/opal/platform.rb +8 -6
  180. data/stdlib/opal-platform.rb +14 -8
  181. data/stdlib/set.rb +1 -258
  182. data/tasks/benchmarking.rake +62 -19
  183. data/tasks/performance.rake +1 -1
  184. data/tasks/testing.rake +5 -3
  185. data/test/nodejs/test_file.rb +29 -10
  186. data/test/opal/http_server.rb +28 -11
  187. data/test/opal/unsupported_and_bugs.rb +2 -1
  188. metadata +89 -50
  189. data/lib/opal/cli_runners/node_modules/ultron/LICENSE +0 -22
  190. data/lib/opal/cli_runners/node_modules/ultron/index.js +0 -138
  191. data/lib/opal/cli_runners/node_modules/ultron/package.json +0 -112
  192. data/lib/opal/cli_runners/node_modules/ws/SECURITY.md +0 -33
  193. data/lib/opal/cli_runners/node_modules/ws/lib/BufferUtil.fallback.js +0 -56
  194. data/lib/opal/cli_runners/node_modules/ws/lib/BufferUtil.js +0 -15
  195. data/lib/opal/cli_runners/node_modules/ws/lib/ErrorCodes.js +0 -28
  196. data/lib/opal/cli_runners/node_modules/ws/lib/EventTarget.js +0 -158
  197. data/lib/opal/cli_runners/node_modules/ws/lib/Extensions.js +0 -69
  198. data/lib/opal/cli_runners/node_modules/ws/lib/PerMessageDeflate.js +0 -339
  199. data/lib/opal/cli_runners/node_modules/ws/lib/Receiver.js +0 -520
  200. data/lib/opal/cli_runners/node_modules/ws/lib/Sender.js +0 -438
  201. data/lib/opal/cli_runners/node_modules/ws/lib/Validation.fallback.js +0 -9
  202. data/lib/opal/cli_runners/node_modules/ws/lib/Validation.js +0 -17
  203. data/lib/opal/cli_runners/node_modules/ws/lib/WebSocket.js +0 -705
  204. data/lib/opal/cli_runners/node_modules/ws/lib/WebSocketServer.js +0 -336
  205. data/spec/filters/bugs/boolean.rb +0 -3
  206. data/spec/filters/bugs/matrix.rb +0 -3
  207. data/spec/filters/unsupported/fixnum.rb +0 -15
  208. data/spec/filters/unsupported/freeze.rb +0 -102
  209. data/spec/filters/unsupported/pathname.rb +0 -4
  210. data/spec/filters/unsupported/proc.rb +0 -4
  211. data/spec/filters/unsupported/random.rb +0 -5
  212. data/spec/filters/unsupported/taint.rb +0 -162
@@ -0,0 +1,3364 @@
1
+ {
2
+ "domains": [
3
+ {
4
+ "domain": "Browser",
5
+ "description": "The Browser domain defines methods and events for browser managing.",
6
+ "commands": [
7
+ {
8
+ "name": "close",
9
+ "description": "Close browser gracefully."
10
+ },
11
+ {
12
+ "name": "getVersion",
13
+ "description": "Returns version information.",
14
+ "returns": [
15
+ {
16
+ "name": "protocolVersion",
17
+ "description": "Protocol version.",
18
+ "type": "string"
19
+ },
20
+ {
21
+ "name": "product",
22
+ "description": "Product name.",
23
+ "type": "string"
24
+ },
25
+ {
26
+ "name": "revision",
27
+ "description": "Product revision.",
28
+ "type": "string"
29
+ },
30
+ {
31
+ "name": "userAgent",
32
+ "description": "User-Agent.",
33
+ "type": "string"
34
+ },
35
+ {
36
+ "name": "jsVersion",
37
+ "description": "V8 version.",
38
+ "type": "string"
39
+ }
40
+ ]
41
+ }
42
+ ]
43
+ },
44
+ {
45
+ "domain": "IO",
46
+ "description": "Input/Output operations for streams produced by DevTools.",
47
+ "types": [
48
+ {
49
+ "id": "StreamHandle",
50
+ "description": "This is either obtained from another method or specifed as `blob:<uuid>` where\n`<uuid&gt` is an UUID of a Blob.",
51
+ "type": "string"
52
+ }
53
+ ],
54
+ "commands": [
55
+ {
56
+ "name": "close",
57
+ "description": "Close the stream, discard any temporary backing storage.",
58
+ "parameters": [
59
+ {
60
+ "name": "handle",
61
+ "description": "Handle of the stream to close.",
62
+ "$ref": "StreamHandle"
63
+ }
64
+ ]
65
+ },
66
+ {
67
+ "name": "read",
68
+ "description": "Read a chunk of the stream",
69
+ "parameters": [
70
+ {
71
+ "name": "handle",
72
+ "description": "Handle of the stream to read.",
73
+ "$ref": "StreamHandle"
74
+ },
75
+ {
76
+ "name": "offset",
77
+ "description": "Seek to the specified offset before reading (if not specificed, proceed with offset\nfollowing the last read). Some types of streams may only support sequential reads.",
78
+ "optional": true,
79
+ "type": "integer"
80
+ },
81
+ {
82
+ "name": "size",
83
+ "description": "Maximum number of bytes to read (left upon the agent discretion if not specified).",
84
+ "optional": true,
85
+ "type": "integer"
86
+ }
87
+ ],
88
+ "returns": [
89
+ {
90
+ "name": "base64Encoded",
91
+ "description": "Set if the data is base64-encoded",
92
+ "optional": true,
93
+ "type": "boolean"
94
+ },
95
+ {
96
+ "name": "data",
97
+ "description": "Data that were read.",
98
+ "type": "string"
99
+ },
100
+ {
101
+ "name": "eof",
102
+ "description": "Set if the end-of-file condition occured while reading.",
103
+ "type": "boolean"
104
+ }
105
+ ]
106
+ },
107
+ {
108
+ "name": "resolveBlob",
109
+ "description": "Return UUID of Blob object specified by a remote object id.",
110
+ "parameters": [
111
+ {
112
+ "name": "objectId",
113
+ "description": "Object id of a Blob object wrapper.",
114
+ "$ref": "Runtime.RemoteObjectId"
115
+ }
116
+ ],
117
+ "returns": [
118
+ {
119
+ "name": "uuid",
120
+ "description": "UUID of the specified Blob.",
121
+ "type": "string"
122
+ }
123
+ ]
124
+ }
125
+ ]
126
+ },
127
+ {
128
+ "domain": "Log",
129
+ "description": "Provides access to log entries.",
130
+ "dependencies": [
131
+ "Runtime",
132
+ "Network"
133
+ ],
134
+ "types": [
135
+ {
136
+ "id": "LogEntry",
137
+ "description": "Log entry.",
138
+ "type": "object",
139
+ "properties": [
140
+ {
141
+ "name": "source",
142
+ "description": "Log entry source.",
143
+ "type": "string",
144
+ "enum": [
145
+ "xml",
146
+ "javascript",
147
+ "network",
148
+ "storage",
149
+ "appcache",
150
+ "rendering",
151
+ "security",
152
+ "deprecation",
153
+ "worker",
154
+ "violation",
155
+ "intervention",
156
+ "recommendation",
157
+ "other"
158
+ ]
159
+ },
160
+ {
161
+ "name": "level",
162
+ "description": "Log entry severity.",
163
+ "type": "string",
164
+ "enum": [
165
+ "verbose",
166
+ "info",
167
+ "warning",
168
+ "error"
169
+ ]
170
+ },
171
+ {
172
+ "name": "text",
173
+ "description": "Logged text.",
174
+ "type": "string"
175
+ },
176
+ {
177
+ "name": "timestamp",
178
+ "description": "Timestamp when this entry was added.",
179
+ "$ref": "Runtime.Timestamp"
180
+ },
181
+ {
182
+ "name": "url",
183
+ "description": "URL of the resource if known.",
184
+ "optional": true,
185
+ "type": "string"
186
+ },
187
+ {
188
+ "name": "lineNumber",
189
+ "description": "Line number in the resource.",
190
+ "optional": true,
191
+ "type": "integer"
192
+ },
193
+ {
194
+ "name": "stackTrace",
195
+ "description": "JavaScript stack trace.",
196
+ "optional": true,
197
+ "$ref": "Runtime.StackTrace"
198
+ },
199
+ {
200
+ "name": "networkRequestId",
201
+ "description": "Identifier of the network request associated with this entry.",
202
+ "optional": true,
203
+ "$ref": "Network.RequestId"
204
+ },
205
+ {
206
+ "name": "workerId",
207
+ "description": "Identifier of the worker associated with this entry.",
208
+ "optional": true,
209
+ "type": "string"
210
+ },
211
+ {
212
+ "name": "args",
213
+ "description": "Call arguments.",
214
+ "optional": true,
215
+ "type": "array",
216
+ "items": {
217
+ "$ref": "Runtime.RemoteObject"
218
+ }
219
+ }
220
+ ]
221
+ },
222
+ {
223
+ "id": "ViolationSetting",
224
+ "description": "Violation configuration setting.",
225
+ "type": "object",
226
+ "properties": [
227
+ {
228
+ "name": "name",
229
+ "description": "Violation type.",
230
+ "type": "string",
231
+ "enum": [
232
+ "longTask",
233
+ "longLayout",
234
+ "blockedEvent",
235
+ "blockedParser",
236
+ "discouragedAPIUse",
237
+ "handler",
238
+ "recurringHandler"
239
+ ]
240
+ },
241
+ {
242
+ "name": "threshold",
243
+ "description": "Time threshold to trigger upon.",
244
+ "type": "number"
245
+ }
246
+ ]
247
+ }
248
+ ],
249
+ "commands": [
250
+ {
251
+ "name": "clear",
252
+ "description": "Clears the log."
253
+ },
254
+ {
255
+ "name": "disable",
256
+ "description": "Disables log domain, prevents further log entries from being reported to the client."
257
+ },
258
+ {
259
+ "name": "enable",
260
+ "description": "Enables log domain, sends the entries collected so far to the client by means of the\n`entryAdded` notification."
261
+ },
262
+ {
263
+ "name": "startViolationsReport",
264
+ "description": "start violation reporting.",
265
+ "parameters": [
266
+ {
267
+ "name": "config",
268
+ "description": "Configuration for violations.",
269
+ "type": "array",
270
+ "items": {
271
+ "$ref": "ViolationSetting"
272
+ }
273
+ }
274
+ ]
275
+ },
276
+ {
277
+ "name": "stopViolationsReport",
278
+ "description": "Stop violation reporting."
279
+ }
280
+ ],
281
+ "events": [
282
+ {
283
+ "name": "entryAdded",
284
+ "description": "Issued when new message was logged.",
285
+ "parameters": [
286
+ {
287
+ "name": "entry",
288
+ "description": "The entry.",
289
+ "$ref": "LogEntry"
290
+ }
291
+ ]
292
+ }
293
+ ]
294
+ },
295
+ {
296
+ "domain": "Page",
297
+ "description": "Actions and events related to the inspected page belong to the page domain.",
298
+ "dependencies": [
299
+ "Debugger",
300
+ "DOM",
301
+ "IO",
302
+ "Network",
303
+ "Runtime"
304
+ ],
305
+ "types": [
306
+ {
307
+ "id": "FrameId",
308
+ "description": "Unique frame identifier.",
309
+ "type": "string"
310
+ },
311
+ {
312
+ "id": "Frame",
313
+ "description": "Information about the Frame on the page.",
314
+ "type": "object",
315
+ "properties": [
316
+ {
317
+ "name": "id",
318
+ "description": "Frame unique identifier.",
319
+ "$ref": "FrameId",
320
+ "type": "string"
321
+ },
322
+ {
323
+ "name": "parentId",
324
+ "description": "Parent frame identifier.",
325
+ "optional": true,
326
+ "$ref": "FrameId",
327
+ "type": "string"
328
+ },
329
+ {
330
+ "name": "loaderId",
331
+ "description": "Identifier of the loader associated with this frame.",
332
+ "$ref": "Network.LoaderId"
333
+ },
334
+ {
335
+ "name": "name",
336
+ "description": "Frame's name as specified in the tag.",
337
+ "optional": true,
338
+ "type": "string"
339
+ },
340
+ {
341
+ "name": "url",
342
+ "description": "Frame document's URL.",
343
+ "type": "string"
344
+ },
345
+ {
346
+ "name": "securityOrigin",
347
+ "description": "Frame document's security origin.",
348
+ "type": "string"
349
+ },
350
+ {
351
+ "name": "mimeType",
352
+ "description": "Frame document's mimeType as determined by the browser.",
353
+ "type": "string"
354
+ }
355
+ ]
356
+ },
357
+ {
358
+ "id": "FrameTree",
359
+ "description": "Information about the Frame hierarchy.",
360
+ "type": "object",
361
+ "properties": [
362
+ {
363
+ "name": "frame",
364
+ "description": "Frame information for this tree item.",
365
+ "$ref": "Frame"
366
+ },
367
+ {
368
+ "name": "childFrames",
369
+ "description": "Child frames.",
370
+ "optional": true,
371
+ "type": "array",
372
+ "items": {
373
+ "$ref": "FrameTree"
374
+ }
375
+ }
376
+ ]
377
+ },
378
+ {
379
+ "id": "ScriptIdentifier",
380
+ "description": "Unique script identifier.",
381
+ "type": "string"
382
+ },
383
+ {
384
+ "id": "TransitionType",
385
+ "description": "Transition type.",
386
+ "type": "string",
387
+ "enum": [
388
+ "link",
389
+ "typed",
390
+ "address_bar",
391
+ "auto_bookmark",
392
+ "auto_subframe",
393
+ "manual_subframe",
394
+ "generated",
395
+ "auto_toplevel",
396
+ "form_submit",
397
+ "reload",
398
+ "keyword",
399
+ "keyword_generated",
400
+ "other"
401
+ ]
402
+ },
403
+ {
404
+ "id": "NavigationEntry",
405
+ "description": "Navigation history entry.",
406
+ "type": "object",
407
+ "properties": [
408
+ {
409
+ "name": "id",
410
+ "description": "Unique id of the navigation history entry.",
411
+ "type": "integer"
412
+ },
413
+ {
414
+ "name": "url",
415
+ "description": "URL of the navigation history entry.",
416
+ "type": "string"
417
+ },
418
+ {
419
+ "name": "userTypedURL",
420
+ "description": "URL that the user typed in the url bar.",
421
+ "type": "string"
422
+ },
423
+ {
424
+ "name": "title",
425
+ "description": "Title of the navigation history entry.",
426
+ "type": "string"
427
+ },
428
+ {
429
+ "name": "transitionType",
430
+ "description": "Transition type.",
431
+ "$ref": "TransitionType"
432
+ }
433
+ ]
434
+ },
435
+ {
436
+ "id": "DialogType",
437
+ "description": "Javascript dialog type.",
438
+ "type": "string",
439
+ "enum": [
440
+ "alert",
441
+ "confirm",
442
+ "prompt",
443
+ "beforeunload"
444
+ ]
445
+ },
446
+ {
447
+ "id": "AppManifestError",
448
+ "description": "Error while paring app manifest.",
449
+ "type": "object",
450
+ "properties": [
451
+ {
452
+ "name": "message",
453
+ "description": "Error message.",
454
+ "type": "string"
455
+ },
456
+ {
457
+ "name": "critical",
458
+ "description": "If criticial, this is a non-recoverable parse error.",
459
+ "type": "integer"
460
+ },
461
+ {
462
+ "name": "line",
463
+ "description": "Error line.",
464
+ "type": "integer"
465
+ },
466
+ {
467
+ "name": "column",
468
+ "description": "Error column.",
469
+ "type": "integer"
470
+ }
471
+ ]
472
+ },
473
+ {
474
+ "id": "LayoutViewport",
475
+ "description": "Layout viewport position and dimensions.",
476
+ "type": "object",
477
+ "properties": [
478
+ {
479
+ "name": "pageX",
480
+ "description": "Horizontal offset relative to the document (CSS pixels).",
481
+ "type": "integer"
482
+ },
483
+ {
484
+ "name": "pageY",
485
+ "description": "Vertical offset relative to the document (CSS pixels).",
486
+ "type": "integer"
487
+ },
488
+ {
489
+ "name": "clientWidth",
490
+ "description": "Width (CSS pixels), excludes scrollbar if present.",
491
+ "type": "integer"
492
+ },
493
+ {
494
+ "name": "clientHeight",
495
+ "description": "Height (CSS pixels), excludes scrollbar if present.",
496
+ "type": "integer"
497
+ }
498
+ ]
499
+ },
500
+ {
501
+ "id": "VisualViewport",
502
+ "description": "Visual viewport position, dimensions, and scale.",
503
+ "type": "object",
504
+ "properties": [
505
+ {
506
+ "name": "offsetX",
507
+ "description": "Horizontal offset relative to the layout viewport (CSS pixels).",
508
+ "type": "number"
509
+ },
510
+ {
511
+ "name": "offsetY",
512
+ "description": "Vertical offset relative to the layout viewport (CSS pixels).",
513
+ "type": "number"
514
+ },
515
+ {
516
+ "name": "pageX",
517
+ "description": "Horizontal offset relative to the document (CSS pixels).",
518
+ "type": "number"
519
+ },
520
+ {
521
+ "name": "pageY",
522
+ "description": "Vertical offset relative to the document (CSS pixels).",
523
+ "type": "number"
524
+ },
525
+ {
526
+ "name": "clientWidth",
527
+ "description": "Width (CSS pixels), excludes scrollbar if present.",
528
+ "type": "number"
529
+ },
530
+ {
531
+ "name": "clientHeight",
532
+ "description": "Height (CSS pixels), excludes scrollbar if present.",
533
+ "type": "number"
534
+ },
535
+ {
536
+ "name": "scale",
537
+ "description": "Scale relative to the ideal viewport (size at width=device-width).",
538
+ "type": "number"
539
+ }
540
+ ]
541
+ },
542
+ {
543
+ "id": "Viewport",
544
+ "description": "Viewport for capturing screenshot.",
545
+ "type": "object",
546
+ "properties": [
547
+ {
548
+ "name": "x",
549
+ "description": "X offset in CSS pixels.",
550
+ "type": "number"
551
+ },
552
+ {
553
+ "name": "y",
554
+ "description": "Y offset in CSS pixels",
555
+ "type": "number"
556
+ },
557
+ {
558
+ "name": "width",
559
+ "description": "Rectangle width in CSS pixels",
560
+ "type": "number"
561
+ },
562
+ {
563
+ "name": "height",
564
+ "description": "Rectangle height in CSS pixels",
565
+ "type": "number"
566
+ },
567
+ {
568
+ "name": "scale",
569
+ "description": "Page scale factor.",
570
+ "type": "number"
571
+ }
572
+ ]
573
+ }
574
+ ],
575
+ "commands": [
576
+ {
577
+ "name": "addScriptToEvaluateOnNewDocument",
578
+ "description": "Evaluates given script in every frame upon creation (before loading frame's scripts).",
579
+ "parameters": [
580
+ {
581
+ "name": "source",
582
+ "type": "string"
583
+ }
584
+ ],
585
+ "returns": [
586
+ {
587
+ "name": "identifier",
588
+ "description": "Identifier of the added script.",
589
+ "$ref": "ScriptIdentifier"
590
+ }
591
+ ]
592
+ },
593
+ {
594
+ "name": "bringToFront",
595
+ "description": "Brings page to front (activates tab)."
596
+ },
597
+ {
598
+ "name": "captureScreenshot",
599
+ "description": "Capture page screenshot.",
600
+ "parameters": [
601
+ {
602
+ "name": "format",
603
+ "description": "Image compression format (defaults to png).",
604
+ "optional": true,
605
+ "type": "string",
606
+ "enum": [
607
+ "jpeg",
608
+ "png"
609
+ ]
610
+ },
611
+ {
612
+ "name": "quality",
613
+ "description": "Compression quality from range [0..100] (jpeg only).",
614
+ "optional": true,
615
+ "type": "integer"
616
+ },
617
+ {
618
+ "name": "clip",
619
+ "description": "Capture the screenshot of a given region only.",
620
+ "optional": true,
621
+ "$ref": "Viewport"
622
+ }
623
+ ],
624
+ "returns": [
625
+ {
626
+ "name": "data",
627
+ "description": "Base64-encoded image data.",
628
+ "type": "binary"
629
+ }
630
+ ]
631
+ },
632
+ {
633
+ "name": "createIsolatedWorld",
634
+ "description": "Creates an isolated world for the given frame.",
635
+ "parameters": [
636
+ {
637
+ "name": "frameId",
638
+ "description": "Id of the frame in which the isolated world should be created.",
639
+ "$ref": "FrameId"
640
+ },
641
+ {
642
+ "name": "worldName",
643
+ "description": "An optional name which is reported in the Execution Context.",
644
+ "optional": true,
645
+ "type": "string"
646
+ },
647
+ {
648
+ "name": "grantUniveralAccess",
649
+ "description": "Whether or not universal access should be granted to the isolated world. This is a powerful\noption, use with caution.",
650
+ "optional": true,
651
+ "type": "boolean"
652
+ }
653
+ ],
654
+ "returns": [
655
+ {
656
+ "name": "executionContextId",
657
+ "description": "Execution context of the isolated world.",
658
+ "$ref": "Runtime.ExecutionContextId"
659
+ }
660
+ ]
661
+ },
662
+ {
663
+ "name": "disable",
664
+ "description": "Disables page domain notifications."
665
+ },
666
+ {
667
+ "name": "enable",
668
+ "description": "Enables page domain notifications."
669
+ },
670
+ {
671
+ "name": "getAppManifest",
672
+ "returns": [
673
+ {
674
+ "name": "url",
675
+ "description": "Manifest location.",
676
+ "type": "string"
677
+ },
678
+ {
679
+ "name": "errors",
680
+ "type": "array",
681
+ "items": {
682
+ "$ref": "AppManifestError"
683
+ }
684
+ },
685
+ {
686
+ "name": "data",
687
+ "description": "Manifest content.",
688
+ "optional": true,
689
+ "type": "string"
690
+ }
691
+ ]
692
+ },
693
+ {
694
+ "name": "getFrameTree",
695
+ "description": "Returns present frame tree structure.",
696
+ "returns": [
697
+ {
698
+ "name": "frameTree",
699
+ "description": "Present frame tree structure.",
700
+ "$ref": "FrameTree"
701
+ }
702
+ ]
703
+ },
704
+ {
705
+ "name": "getNavigationHistory",
706
+ "description": "Returns navigation history for the current page.",
707
+ "returns": [
708
+ {
709
+ "name": "currentIndex",
710
+ "description": "Index of the current navigation history entry.",
711
+ "type": "integer"
712
+ },
713
+ {
714
+ "name": "entries",
715
+ "description": "Array of navigation history entries.",
716
+ "type": "array",
717
+ "items": {
718
+ "$ref": "NavigationEntry"
719
+ }
720
+ }
721
+ ]
722
+ },
723
+ {
724
+ "name": "handleJavaScriptDialog",
725
+ "description": "Accepts or dismisses a JavaScript initiated dialog (alert, confirm, prompt, or onbeforeunload).",
726
+ "parameters": [
727
+ {
728
+ "name": "accept",
729
+ "description": "Whether to accept or dismiss the dialog.",
730
+ "type": "boolean"
731
+ },
732
+ {
733
+ "name": "promptText",
734
+ "description": "The text to enter into the dialog prompt before accepting. Used only if this is a prompt\ndialog.",
735
+ "optional": true,
736
+ "type": "string"
737
+ }
738
+ ]
739
+ },
740
+ {
741
+ "name": "navigate",
742
+ "description": "Navigates current page to the given URL.",
743
+ "parameters": [
744
+ {
745
+ "name": "url",
746
+ "description": "URL to navigate the page to.",
747
+ "type": "string"
748
+ },
749
+ {
750
+ "name": "referrer",
751
+ "description": "Referrer URL.",
752
+ "optional": true,
753
+ "type": "string"
754
+ },
755
+ {
756
+ "name": "transitionType",
757
+ "description": "Intended transition type.",
758
+ "optional": true,
759
+ "$ref": "TransitionType"
760
+ },
761
+ {
762
+ "name": "frameId",
763
+ "description": "Frame id to navigate, if not specified navigates the top frame.",
764
+ "optional": true,
765
+ "$ref": "FrameId"
766
+ }
767
+ ],
768
+ "returns": [
769
+ {
770
+ "name": "frameId",
771
+ "description": "Frame id that has navigated (or failed to navigate)",
772
+ "$ref": "FrameId"
773
+ },
774
+ {
775
+ "name": "loaderId",
776
+ "description": "Loader identifier.",
777
+ "optional": true,
778
+ "$ref": "Network.LoaderId"
779
+ },
780
+ {
781
+ "name": "errorText",
782
+ "description": "User friendly error message, present if and only if navigation has failed.",
783
+ "optional": true,
784
+ "type": "string"
785
+ }
786
+ ]
787
+ },
788
+ {
789
+ "name": "navigateToHistoryEntry",
790
+ "description": "Navigates current page to the given history entry.",
791
+ "parameters": [
792
+ {
793
+ "name": "entryId",
794
+ "description": "Unique id of the entry to navigate to.",
795
+ "type": "integer"
796
+ }
797
+ ]
798
+ },
799
+ {
800
+ "name": "printToPDF",
801
+ "description": "Print page as PDF.",
802
+ "parameters": [
803
+ {
804
+ "name": "landscape",
805
+ "description": "Paper orientation. Defaults to false.",
806
+ "optional": true,
807
+ "type": "boolean"
808
+ },
809
+ {
810
+ "name": "displayHeaderFooter",
811
+ "description": "Display header and footer. Defaults to false.",
812
+ "optional": true,
813
+ "type": "boolean"
814
+ },
815
+ {
816
+ "name": "printBackground",
817
+ "description": "Print background graphics. Defaults to false.",
818
+ "optional": true,
819
+ "type": "boolean"
820
+ },
821
+ {
822
+ "name": "scale",
823
+ "description": "Scale of the webpage rendering. Defaults to 1.",
824
+ "optional": true,
825
+ "type": "number"
826
+ },
827
+ {
828
+ "name": "paperWidth",
829
+ "description": "Paper width in inches. Defaults to 8.5 inches.",
830
+ "optional": true,
831
+ "type": "number"
832
+ },
833
+ {
834
+ "name": "paperHeight",
835
+ "description": "Paper height in inches. Defaults to 11 inches.",
836
+ "optional": true,
837
+ "type": "number"
838
+ },
839
+ {
840
+ "name": "marginTop",
841
+ "description": "Top margin in inches. Defaults to 1cm (~0.4 inches).",
842
+ "optional": true,
843
+ "type": "number"
844
+ },
845
+ {
846
+ "name": "marginBottom",
847
+ "description": "Bottom margin in inches. Defaults to 1cm (~0.4 inches).",
848
+ "optional": true,
849
+ "type": "number"
850
+ },
851
+ {
852
+ "name": "marginLeft",
853
+ "description": "Left margin in inches. Defaults to 1cm (~0.4 inches).",
854
+ "optional": true,
855
+ "type": "number"
856
+ },
857
+ {
858
+ "name": "marginRight",
859
+ "description": "Right margin in inches. Defaults to 1cm (~0.4 inches).",
860
+ "optional": true,
861
+ "type": "number"
862
+ },
863
+ {
864
+ "name": "pageRanges",
865
+ "description": "Paper ranges to print, e.g., '1-5, 8, 11-13'. Defaults to the empty string, which means\nprint all pages.",
866
+ "optional": true,
867
+ "type": "string"
868
+ },
869
+ {
870
+ "name": "headerTemplate",
871
+ "description": "HTML template for the print header. Should be valid HTML markup with following\nclasses used to inject printing values into them:\n- `date`: formatted print date\n- `title`: document title\n- `url`: document location\n- `pageNumber`: current page number\n- `totalPages`: total pages in the document\n\nFor example, `<span class=title></span>` would generate span containing the title.",
872
+ "optional": true,
873
+ "type": "string"
874
+ },
875
+ {
876
+ "name": "footerTemplate",
877
+ "description": "HTML template for the print footer. Should use the same format as the `headerTemplate`.",
878
+ "optional": true,
879
+ "type": "string"
880
+ },
881
+ {
882
+ "name": "preferCSSPageSize",
883
+ "description": "Whether or not to prefer page size as defined by css. Defaults to false,\nin which case the content will be scaled to fit the paper size.",
884
+ "optional": true,
885
+ "type": "boolean"
886
+ }
887
+ ],
888
+ "returns": [
889
+ {
890
+ "name": "data",
891
+ "description": "Base64-encoded pdf data.",
892
+ "type": "binary"
893
+ }
894
+ ]
895
+ },
896
+ {
897
+ "name": "reload",
898
+ "description": "Reloads given page optionally ignoring the cache.",
899
+ "parameters": [
900
+ {
901
+ "name": "ignoreCache",
902
+ "description": "If true, browser cache is ignored (as if the user pressed Shift+refresh).",
903
+ "optional": true,
904
+ "type": "boolean"
905
+ },
906
+ {
907
+ "name": "scriptToEvaluateOnLoad",
908
+ "description": "If set, the script will be injected into all frames of the inspected page after reload.\nArgument will be ignored if reloading dataURL origin.",
909
+ "optional": true,
910
+ "type": "string"
911
+ }
912
+ ]
913
+ },
914
+ {
915
+ "name": "removeScriptToEvaluateOnNewDocument",
916
+ "description": "Removes given script from the list.",
917
+ "parameters": [
918
+ {
919
+ "name": "identifier",
920
+ "$ref": "ScriptIdentifier"
921
+ }
922
+ ]
923
+ },
924
+ {
925
+ "name": "setDocumentContent",
926
+ "description": "Sets given markup as the document's HTML.",
927
+ "parameters": [
928
+ {
929
+ "name": "frameId",
930
+ "description": "Frame id to set HTML for.",
931
+ "$ref": "FrameId"
932
+ },
933
+ {
934
+ "name": "html",
935
+ "description": "HTML content to set.",
936
+ "type": "string"
937
+ }
938
+ ]
939
+ },
940
+ {
941
+ "name": "stopLoading",
942
+ "description": "Force the page stop all navigations and pending resource fetches."
943
+ }
944
+ ],
945
+ "events": [
946
+ {
947
+ "name": "domContentEventFired",
948
+ "parameters": [
949
+ {
950
+ "name": "timestamp",
951
+ "$ref": "Network.MonotonicTime"
952
+ }
953
+ ]
954
+ },
955
+ {
956
+ "name": "frameAttached",
957
+ "description": "Fired when frame has been attached to its parent.",
958
+ "parameters": [
959
+ {
960
+ "name": "frameId",
961
+ "description": "Id of the frame that has been attached.",
962
+ "$ref": "FrameId"
963
+ },
964
+ {
965
+ "name": "parentFrameId",
966
+ "description": "Parent frame identifier.",
967
+ "$ref": "FrameId"
968
+ },
969
+ {
970
+ "name": "stack",
971
+ "description": "JavaScript stack trace of when frame was attached, only set if frame initiated from script.",
972
+ "optional": true,
973
+ "$ref": "Runtime.StackTrace"
974
+ }
975
+ ]
976
+ },
977
+ {
978
+ "name": "frameDetached",
979
+ "description": "Fired when frame has been detached from its parent.",
980
+ "parameters": [
981
+ {
982
+ "name": "frameId",
983
+ "description": "Id of the frame that has been detached.",
984
+ "$ref": "FrameId"
985
+ }
986
+ ]
987
+ },
988
+ {
989
+ "name": "frameNavigated",
990
+ "description": "Fired once navigation of the frame has completed. Frame is now associated with the new loader.",
991
+ "parameters": [
992
+ {
993
+ "name": "frame",
994
+ "description": "Frame object.",
995
+ "$ref": "Frame"
996
+ }
997
+ ]
998
+ },
999
+ {
1000
+ "name": "interstitialHidden",
1001
+ "description": "Fired when interstitial page was hidden"
1002
+ },
1003
+ {
1004
+ "name": "interstitialShown",
1005
+ "description": "Fired when interstitial page was shown"
1006
+ },
1007
+ {
1008
+ "name": "javascriptDialogClosed",
1009
+ "description": "Fired when a JavaScript initiated dialog (alert, confirm, prompt, or onbeforeunload) has been\nclosed.",
1010
+ "parameters": [
1011
+ {
1012
+ "name": "result",
1013
+ "description": "Whether dialog was confirmed.",
1014
+ "type": "boolean"
1015
+ },
1016
+ {
1017
+ "name": "userInput",
1018
+ "description": "User input in case of prompt.",
1019
+ "type": "string"
1020
+ }
1021
+ ]
1022
+ },
1023
+ {
1024
+ "name": "javascriptDialogOpening",
1025
+ "description": "Fired when a JavaScript initiated dialog (alert, confirm, prompt, or onbeforeunload) is about to\nopen.",
1026
+ "parameters": [
1027
+ {
1028
+ "name": "url",
1029
+ "description": "Frame url.",
1030
+ "type": "string"
1031
+ },
1032
+ {
1033
+ "name": "message",
1034
+ "description": "Message that will be displayed by the dialog.",
1035
+ "type": "string"
1036
+ },
1037
+ {
1038
+ "name": "type",
1039
+ "description": "Dialog type.",
1040
+ "$ref": "DialogType"
1041
+ },
1042
+ {
1043
+ "name": "hasBrowserHandler",
1044
+ "description": "True iff browser is capable showing or acting on the given dialog. When browser has no\ndialog handler for given target, calling alert while Page domain is engaged will stall\nthe page execution. Execution can be resumed via calling Page.handleJavaScriptDialog.",
1045
+ "type": "boolean"
1046
+ },
1047
+ {
1048
+ "name": "defaultPrompt",
1049
+ "description": "Default dialog prompt.",
1050
+ "optional": true,
1051
+ "type": "string"
1052
+ }
1053
+ ]
1054
+ },
1055
+ {
1056
+ "name": "lifecycleEvent",
1057
+ "description": "Fired for top level page lifecycle events such as navigation, load, paint, etc.",
1058
+ "parameters": [
1059
+ {
1060
+ "name": "frameId",
1061
+ "description": "Id of the frame.",
1062
+ "$ref": "FrameId"
1063
+ },
1064
+ {
1065
+ "name": "loaderId",
1066
+ "description": "Loader identifier. Empty string if the request is fetched from worker.",
1067
+ "$ref": "Network.LoaderId"
1068
+ },
1069
+ {
1070
+ "name": "name",
1071
+ "type": "string"
1072
+ },
1073
+ {
1074
+ "name": "timestamp",
1075
+ "$ref": "Network.MonotonicTime"
1076
+ }
1077
+ ]
1078
+ },
1079
+ {
1080
+ "name": "loadEventFired",
1081
+ "parameters": [
1082
+ {
1083
+ "name": "timestamp",
1084
+ "$ref": "Network.MonotonicTime"
1085
+ }
1086
+ ]
1087
+ },
1088
+ {
1089
+ "name": "windowOpen",
1090
+ "description": "Fired when a new window is going to be opened, via window.open(), link click, form submission,\netc.",
1091
+ "parameters": [
1092
+ {
1093
+ "name": "url",
1094
+ "description": "The URL for the new window.",
1095
+ "type": "string"
1096
+ },
1097
+ {
1098
+ "name": "windowName",
1099
+ "description": "Window name.",
1100
+ "type": "string"
1101
+ },
1102
+ {
1103
+ "name": "windowFeatures",
1104
+ "description": "An array of enabled window features.",
1105
+ "type": "array",
1106
+ "items": {
1107
+ "type": "string"
1108
+ }
1109
+ },
1110
+ {
1111
+ "name": "userGesture",
1112
+ "description": "Whether or not it was triggered by user gesture.",
1113
+ "type": "boolean"
1114
+ }
1115
+ ]
1116
+ }
1117
+ ]
1118
+ },
1119
+ {
1120
+ "domain": "Target",
1121
+ "description": "Supports additional targets discovery and allows to attach to them.",
1122
+ "types": [
1123
+ {
1124
+ "id": "TargetID",
1125
+ "type": "string"
1126
+ },
1127
+ {
1128
+ "id": "SessionID",
1129
+ "description": "Unique identifier of attached debugging session.",
1130
+ "type": "string"
1131
+ },
1132
+ {
1133
+ "id": "TargetInfo",
1134
+ "type": "object",
1135
+ "properties": [
1136
+ {
1137
+ "name": "targetId",
1138
+ "$ref": "TargetID"
1139
+ },
1140
+ {
1141
+ "name": "type",
1142
+ "type": "string"
1143
+ },
1144
+ {
1145
+ "name": "title",
1146
+ "type": "string"
1147
+ },
1148
+ {
1149
+ "name": "url",
1150
+ "type": "string"
1151
+ },
1152
+ {
1153
+ "name": "attached",
1154
+ "description": "Whether the target has an attached client.",
1155
+ "type": "boolean"
1156
+ },
1157
+ {
1158
+ "name": "openerId",
1159
+ "description": "Opener target Id",
1160
+ "optional": true,
1161
+ "$ref": "TargetID"
1162
+ }
1163
+ ]
1164
+ }
1165
+ ],
1166
+ "commands": [
1167
+ {
1168
+ "name": "activateTarget",
1169
+ "description": "Activates (focuses) the target.",
1170
+ "parameters": [
1171
+ {
1172
+ "name": "targetId",
1173
+ "$ref": "TargetID"
1174
+ }
1175
+ ]
1176
+ },
1177
+ {
1178
+ "name": "attachToTarget",
1179
+ "description": "Attaches to the target with given id.",
1180
+ "parameters": [
1181
+ {
1182
+ "name": "targetId",
1183
+ "$ref": "TargetID"
1184
+ }
1185
+ ],
1186
+ "returns": [
1187
+ {
1188
+ "name": "sessionId",
1189
+ "description": "Id assigned to the session.",
1190
+ "$ref": "SessionID"
1191
+ }
1192
+ ]
1193
+ },
1194
+ {
1195
+ "name": "closeTarget",
1196
+ "description": "Closes the target. If the target is a page that gets closed too.",
1197
+ "parameters": [
1198
+ {
1199
+ "name": "targetId",
1200
+ "$ref": "TargetID"
1201
+ }
1202
+ ]
1203
+ },
1204
+ {
1205
+ "name": "createTarget",
1206
+ "description": "Creates a new page.",
1207
+ "parameters": [
1208
+ {
1209
+ "name": "url",
1210
+ "description": "The initial URL the page will be navigated to.",
1211
+ "type": "string"
1212
+ },
1213
+ {
1214
+ "name": "width",
1215
+ "description": "Frame width in DIP (headless chrome only).",
1216
+ "optional": true,
1217
+ "type": "integer"
1218
+ },
1219
+ {
1220
+ "name": "height",
1221
+ "description": "Frame height in DIP (headless chrome only).",
1222
+ "optional": true,
1223
+ "type": "integer"
1224
+ }
1225
+ ],
1226
+ "returns": [
1227
+ {
1228
+ "name": "targetId",
1229
+ "description": "The id of the page opened.",
1230
+ "$ref": "TargetID"
1231
+ }
1232
+ ]
1233
+ },
1234
+ {
1235
+ "name": "detachFromTarget",
1236
+ "description": "Detaches session with given id.",
1237
+ "parameters": [
1238
+ {
1239
+ "name": "sessionId",
1240
+ "description": "Session to detach.",
1241
+ "optional": true,
1242
+ "$ref": "SessionID"
1243
+ }
1244
+ ]
1245
+ },
1246
+ {
1247
+ "name": "getTargets",
1248
+ "description": "Retrieves a list of available targets.",
1249
+ "returns": [
1250
+ {
1251
+ "name": "targetInfos",
1252
+ "description": "The list of targets.",
1253
+ "type": "array",
1254
+ "items": {
1255
+ "$ref": "TargetInfo"
1256
+ }
1257
+ }
1258
+ ]
1259
+ },
1260
+ {
1261
+ "name": "setDiscoverTargets",
1262
+ "description": "Controls whether to discover available targets and notify via\n`targetCreated/targetInfoChanged/targetDestroyed` events.",
1263
+ "parameters": [
1264
+ {
1265
+ "name": "discover",
1266
+ "description": "Whether to discover available targets.",
1267
+ "type": "boolean"
1268
+ }
1269
+ ]
1270
+ }
1271
+ ],
1272
+ "events": [
1273
+ {
1274
+ "name": "receivedMessageFromTarget",
1275
+ "description": "Notifies about a new protocol message received from the session (as reported in\n`attachedToTarget` event).",
1276
+ "parameters": [
1277
+ {
1278
+ "name": "sessionId",
1279
+ "description": "Identifier of a session which sends a message.",
1280
+ "$ref": "SessionID"
1281
+ },
1282
+ {
1283
+ "name": "message",
1284
+ "type": "string"
1285
+ }
1286
+ ]
1287
+ },
1288
+ {
1289
+ "name": "targetCreated",
1290
+ "description": "Issued when a possible inspection target is created.",
1291
+ "parameters": [
1292
+ {
1293
+ "name": "targetInfo",
1294
+ "$ref": "TargetInfo"
1295
+ }
1296
+ ]
1297
+ },
1298
+ {
1299
+ "name": "targetDestroyed",
1300
+ "description": "Issued when a target is destroyed.",
1301
+ "parameters": [
1302
+ {
1303
+ "name": "targetId",
1304
+ "$ref": "TargetID"
1305
+ }
1306
+ ]
1307
+ },
1308
+ {
1309
+ "name": "targetCrashed",
1310
+ "description": "Issued when a target has crashed.",
1311
+ "parameters": [
1312
+ {
1313
+ "name": "targetId",
1314
+ "$ref": "TargetID"
1315
+ },
1316
+ {
1317
+ "name": "status",
1318
+ "description": "Termination status type.",
1319
+ "type": "string"
1320
+ },
1321
+ {
1322
+ "name": "errorCode",
1323
+ "description": "Termination error code.",
1324
+ "type": "integer"
1325
+ }
1326
+ ]
1327
+ },
1328
+ {
1329
+ "name": "targetInfoChanged",
1330
+ "description": "Issued when some information about a target has changed. This only happens between\n`targetCreated` and `targetDestroyed`.",
1331
+ "parameters": [
1332
+ {
1333
+ "name": "targetInfo",
1334
+ "$ref": "TargetInfo"
1335
+ }
1336
+ ]
1337
+ }
1338
+ ]
1339
+ },
1340
+ {
1341
+ "domain": "Debugger",
1342
+ "description": "Debugger domain exposes JavaScript debugging capabilities. It allows setting and removing\nbreakpoints, stepping through execution, exploring stack traces, etc.",
1343
+ "dependencies": [
1344
+ "Runtime"
1345
+ ],
1346
+ "types": [
1347
+ {
1348
+ "id": "BreakpointId",
1349
+ "description": "Breakpoint identifier.",
1350
+ "type": "string"
1351
+ },
1352
+ {
1353
+ "id": "CallFrameId",
1354
+ "description": "Call frame identifier.",
1355
+ "type": "string"
1356
+ },
1357
+ {
1358
+ "id": "Location",
1359
+ "description": "Location in the source code.",
1360
+ "type": "object",
1361
+ "properties": [
1362
+ {
1363
+ "name": "scriptId",
1364
+ "description": "Script identifier as reported in the `Debugger.scriptParsed`.",
1365
+ "$ref": "Runtime.ScriptId"
1366
+ },
1367
+ {
1368
+ "name": "lineNumber",
1369
+ "description": "Line number in the script (0-based).",
1370
+ "type": "integer"
1371
+ },
1372
+ {
1373
+ "name": "columnNumber",
1374
+ "description": "Column number in the script (0-based).",
1375
+ "optional": true,
1376
+ "type": "integer"
1377
+ }
1378
+ ]
1379
+ },
1380
+ {
1381
+ "id": "CallFrame",
1382
+ "description": "JavaScript call frame. Array of call frames form the call stack.",
1383
+ "type": "object",
1384
+ "properties": [
1385
+ {
1386
+ "name": "callFrameId",
1387
+ "description": "Call frame identifier. This identifier is only valid while the virtual machine is paused.",
1388
+ "$ref": "CallFrameId"
1389
+ },
1390
+ {
1391
+ "name": "functionName",
1392
+ "description": "Name of the JavaScript function called on this call frame.",
1393
+ "type": "string"
1394
+ },
1395
+ {
1396
+ "name": "functionLocation",
1397
+ "description": "Location in the source code.",
1398
+ "optional": true,
1399
+ "$ref": "Location"
1400
+ },
1401
+ {
1402
+ "name": "location",
1403
+ "description": "Location in the source code.",
1404
+ "$ref": "Location"
1405
+ },
1406
+ {
1407
+ "name": "scopeChain",
1408
+ "description": "Scope chain for this call frame.",
1409
+ "type": "array",
1410
+ "items": {
1411
+ "$ref": "Scope"
1412
+ }
1413
+ },
1414
+ {
1415
+ "name": "this",
1416
+ "description": "`this` object for this call frame.",
1417
+ "$ref": "Runtime.RemoteObject"
1418
+ },
1419
+ {
1420
+ "name": "returnValue",
1421
+ "description": "The value being returned, if the function is at return point.",
1422
+ "optional": true,
1423
+ "$ref": "Runtime.RemoteObject"
1424
+ }
1425
+ ]
1426
+ },
1427
+ {
1428
+ "id": "Scope",
1429
+ "description": "Scope description.",
1430
+ "type": "object",
1431
+ "properties": [
1432
+ {
1433
+ "name": "type",
1434
+ "description": "Scope type.",
1435
+ "type": "string",
1436
+ "enum": [
1437
+ "global",
1438
+ "local",
1439
+ "with",
1440
+ "closure",
1441
+ "catch",
1442
+ "block",
1443
+ "script",
1444
+ "eval",
1445
+ "module"
1446
+ ]
1447
+ },
1448
+ {
1449
+ "name": "object",
1450
+ "description": "Object representing the scope. For `global` and `with` scopes it represents the actual\nobject; for the rest of the scopes, it is artificial transient object enumerating scope\nvariables as its properties.",
1451
+ "$ref": "Runtime.RemoteObject"
1452
+ },
1453
+ {
1454
+ "name": "name",
1455
+ "optional": true,
1456
+ "type": "string"
1457
+ },
1458
+ {
1459
+ "name": "startLocation",
1460
+ "description": "Location in the source code where scope starts",
1461
+ "optional": true,
1462
+ "$ref": "Location"
1463
+ },
1464
+ {
1465
+ "name": "endLocation",
1466
+ "description": "Location in the source code where scope ends",
1467
+ "optional": true,
1468
+ "$ref": "Location"
1469
+ }
1470
+ ]
1471
+ },
1472
+ {
1473
+ "id": "SearchMatch",
1474
+ "description": "Search match for resource.",
1475
+ "type": "object",
1476
+ "properties": [
1477
+ {
1478
+ "name": "lineNumber",
1479
+ "description": "Line number in resource content.",
1480
+ "type": "number"
1481
+ },
1482
+ {
1483
+ "name": "lineContent",
1484
+ "description": "Line with match content.",
1485
+ "type": "string"
1486
+ }
1487
+ ]
1488
+ },
1489
+ {
1490
+ "id": "BreakLocation",
1491
+ "type": "object",
1492
+ "properties": [
1493
+ {
1494
+ "name": "scriptId",
1495
+ "description": "Script identifier as reported in the `Debugger.scriptParsed`.",
1496
+ "$ref": "Runtime.ScriptId"
1497
+ },
1498
+ {
1499
+ "name": "lineNumber",
1500
+ "description": "Line number in the script (0-based).",
1501
+ "type": "integer"
1502
+ },
1503
+ {
1504
+ "name": "columnNumber",
1505
+ "description": "Column number in the script (0-based).",
1506
+ "optional": true,
1507
+ "type": "integer"
1508
+ },
1509
+ {
1510
+ "name": "type",
1511
+ "optional": true,
1512
+ "type": "string",
1513
+ "enum": [
1514
+ "debuggerStatement",
1515
+ "call",
1516
+ "return"
1517
+ ]
1518
+ }
1519
+ ]
1520
+ }
1521
+ ],
1522
+ "commands": [
1523
+ {
1524
+ "name": "continueToLocation",
1525
+ "description": "Continues execution until specific location is reached.",
1526
+ "parameters": [
1527
+ {
1528
+ "name": "location",
1529
+ "description": "Location to continue to.",
1530
+ "$ref": "Location"
1531
+ },
1532
+ {
1533
+ "name": "targetCallFrames",
1534
+ "optional": true,
1535
+ "type": "string",
1536
+ "enum": [
1537
+ "any",
1538
+ "current"
1539
+ ]
1540
+ }
1541
+ ]
1542
+ },
1543
+ {
1544
+ "name": "disable",
1545
+ "description": "Disables debugger for given page."
1546
+ },
1547
+ {
1548
+ "name": "enable",
1549
+ "description": "Enables debugger for the given page. Clients should not assume that the debugging has been\nenabled until the result for this command is received."
1550
+ },
1551
+ {
1552
+ "name": "evaluateOnCallFrame",
1553
+ "description": "Evaluates expression on a given call frame.",
1554
+ "parameters": [
1555
+ {
1556
+ "name": "callFrameId",
1557
+ "description": "Call frame identifier to evaluate on.",
1558
+ "$ref": "CallFrameId"
1559
+ },
1560
+ {
1561
+ "name": "expression",
1562
+ "description": "Expression to evaluate.",
1563
+ "type": "string"
1564
+ },
1565
+ {
1566
+ "name": "objectGroup",
1567
+ "description": "String object group name to put result into (allows rapid releasing resulting object handles\nusing `releaseObjectGroup`).",
1568
+ "optional": true,
1569
+ "type": "string"
1570
+ },
1571
+ {
1572
+ "name": "includeCommandLineAPI",
1573
+ "description": "Specifies whether command line API should be available to the evaluated expression, defaults\nto false.",
1574
+ "optional": true,
1575
+ "type": "boolean"
1576
+ },
1577
+ {
1578
+ "name": "silent",
1579
+ "description": "In silent mode exceptions thrown during evaluation are not reported and do not pause\nexecution. Overrides `setPauseOnException` state.",
1580
+ "optional": true,
1581
+ "type": "boolean"
1582
+ },
1583
+ {
1584
+ "name": "returnByValue",
1585
+ "description": "Whether the result is expected to be a JSON object that should be sent by value.",
1586
+ "optional": true,
1587
+ "type": "boolean"
1588
+ },
1589
+ {
1590
+ "name": "throwOnSideEffect",
1591
+ "description": "Whether to throw an exception if side effect cannot be ruled out during evaluation.",
1592
+ "optional": true,
1593
+ "type": "boolean"
1594
+ }
1595
+ ],
1596
+ "returns": [
1597
+ {
1598
+ "name": "result",
1599
+ "description": "Object wrapper for the evaluation result.",
1600
+ "$ref": "Runtime.RemoteObject"
1601
+ },
1602
+ {
1603
+ "name": "exceptionDetails",
1604
+ "description": "Exception details.",
1605
+ "optional": true,
1606
+ "$ref": "Runtime.ExceptionDetails"
1607
+ }
1608
+ ]
1609
+ },
1610
+ {
1611
+ "name": "getPossibleBreakpoints",
1612
+ "description": "Returns possible locations for breakpoint. scriptId in start and end range locations should be\nthe same.",
1613
+ "parameters": [
1614
+ {
1615
+ "name": "start",
1616
+ "description": "Start of range to search possible breakpoint locations in.",
1617
+ "$ref": "Location"
1618
+ },
1619
+ {
1620
+ "name": "end",
1621
+ "description": "End of range to search possible breakpoint locations in (excluding). When not specified, end\nof scripts is used as end of range.",
1622
+ "optional": true,
1623
+ "$ref": "Location"
1624
+ },
1625
+ {
1626
+ "name": "restrictToFunction",
1627
+ "description": "Only consider locations which are in the same (non-nested) function as start.",
1628
+ "optional": true,
1629
+ "type": "boolean"
1630
+ }
1631
+ ],
1632
+ "returns": [
1633
+ {
1634
+
1635
+ "name": "locations",
1636
+ "description": "List of the possible breakpoint locations.",
1637
+ "type": "array",
1638
+ "items": {
1639
+ "$ref": "BreakLocation"
1640
+ }
1641
+ }
1642
+ ]
1643
+ },
1644
+ {
1645
+ "name": "getScriptSource",
1646
+ "description": "Returns source for the script with given id.",
1647
+ "parameters": [
1648
+ {
1649
+ "name": "scriptId",
1650
+ "description": "Id of the script to get source for.",
1651
+ "$ref": "Runtime.ScriptId"
1652
+ }
1653
+ ],
1654
+ "returns": [
1655
+ {
1656
+ "name": "scriptSource",
1657
+ "description": "Script source.",
1658
+ "type": "string"
1659
+ }
1660
+ ]
1661
+ },
1662
+ {
1663
+ "name": "pause",
1664
+ "description": "Stops on the next JavaScript statement."
1665
+ },
1666
+ {
1667
+ "name": "removeBreakpoint",
1668
+ "description": "Removes JavaScript breakpoint.",
1669
+ "parameters": [
1670
+ {
1671
+ "name": "breakpointId",
1672
+ "$ref": "BreakpointId"
1673
+ }
1674
+ ]
1675
+ },
1676
+ {
1677
+ "name": "restartFrame",
1678
+ "description": "Restarts particular call frame from the beginning.",
1679
+ "parameters": [
1680
+ {
1681
+ "name": "callFrameId",
1682
+ "description": "Call frame identifier to evaluate on.",
1683
+ "$ref": "CallFrameId"
1684
+ }
1685
+ ]
1686
+ },
1687
+ {
1688
+ "name": "resume",
1689
+ "description": "Resumes JavaScript execution."
1690
+ },
1691
+ {
1692
+ "name": "searchInContent",
1693
+ "description": "Searches for given string in script content.",
1694
+ "parameters": [
1695
+ {
1696
+ "name": "scriptId",
1697
+ "description": "Id of the script to search in.",
1698
+ "$ref": "Runtime.ScriptId"
1699
+ },
1700
+ {
1701
+ "name": "query",
1702
+ "description": "String to search for.",
1703
+ "type": "string"
1704
+ },
1705
+ {
1706
+ "name": "caseSensitive",
1707
+ "description": "If true, search is case sensitive.",
1708
+ "optional": true,
1709
+ "type": "boolean"
1710
+ },
1711
+ {
1712
+ "name": "isRegex",
1713
+ "description": "If true, treats string parameter as regex.",
1714
+ "optional": true,
1715
+ "type": "boolean"
1716
+ }
1717
+ ],
1718
+ "returns": [
1719
+ {
1720
+ "name": "result",
1721
+ "description": "List of search matches.",
1722
+ "type": "array",
1723
+ "items": {
1724
+ "$ref": "SearchMatch"
1725
+ }
1726
+ }
1727
+ ]
1728
+ },
1729
+ {
1730
+ "name": "setAsyncCallStackDepth",
1731
+ "description": "Enables or disables async call stacks tracking.",
1732
+ "parameters": [
1733
+ {
1734
+ "name": "maxDepth",
1735
+ "description": "Maximum depth of async call stacks. Setting to `0` will effectively disable collecting async\ncall stacks (default).",
1736
+ "type": "integer"
1737
+ }
1738
+ ]
1739
+ },
1740
+ {
1741
+ "name": "setBreakpoint",
1742
+ "description": "Sets JavaScript breakpoint at a given location.",
1743
+ "parameters": [
1744
+ {
1745
+ "name": "location",
1746
+ "description": "Location to set breakpoint in.",
1747
+ "$ref": "Location"
1748
+ },
1749
+ {
1750
+ "name": "condition",
1751
+ "description": "Expression to use as a breakpoint condition. When specified, debugger will only stop on the\nbreakpoint if this expression evaluates to true.",
1752
+ "optional": true,
1753
+ "type": "string"
1754
+ }
1755
+ ],
1756
+ "returns": [
1757
+ {
1758
+ "name": "breakpointId",
1759
+ "description": "Id of the created breakpoint for further reference.",
1760
+ "$ref": "BreakpointId"
1761
+ },
1762
+ {
1763
+ "name": "actualLocation",
1764
+ "description": "Location this breakpoint resolved into.",
1765
+ "$ref": "Location"
1766
+ }
1767
+ ]
1768
+ },
1769
+ {
1770
+ "name": "setBreakpointByUrl",
1771
+ "description": "Sets JavaScript breakpoint at given location specified either by URL or URL regex. Once this\ncommand is issued, all existing parsed scripts will have breakpoints resolved and returned in\n`locations` property. Further matching script parsing will result in subsequent\n`breakpointResolved` events issued. This logical breakpoint will survive page reloads.",
1772
+ "parameters": [
1773
+ {
1774
+ "name": "lineNumber",
1775
+ "description": "Line number to set breakpoint at.",
1776
+ "type": "integer"
1777
+ },
1778
+ {
1779
+ "name": "url",
1780
+ "description": "URL of the resources to set breakpoint on.",
1781
+ "optional": true,
1782
+ "type": "string"
1783
+ },
1784
+ {
1785
+ "name": "urlRegex",
1786
+ "description": "Regex pattern for the URLs of the resources to set breakpoints on. Either `url` or\n`urlRegex` must be specified.",
1787
+ "optional": true,
1788
+ "type": "string"
1789
+ },
1790
+ {
1791
+ "name": "scriptHash",
1792
+ "description": "Script hash of the resources to set breakpoint on.",
1793
+ "optional": true,
1794
+ "type": "string"
1795
+ },
1796
+ {
1797
+ "name": "columnNumber",
1798
+ "description": "Offset in the line to set breakpoint at.",
1799
+ "optional": true,
1800
+ "type": "integer"
1801
+ },
1802
+ {
1803
+ "name": "condition",
1804
+ "description": "Expression to use as a breakpoint condition. When specified, debugger will only stop on the\nbreakpoint if this expression evaluates to true.",
1805
+ "optional": true,
1806
+ "type": "string"
1807
+ }
1808
+ ],
1809
+ "returns": [
1810
+ {
1811
+ "name": "breakpointId",
1812
+ "description": "Id of the created breakpoint for further reference.",
1813
+ "$ref": "BreakpointId"
1814
+ },
1815
+ {
1816
+ "name": "locations",
1817
+ "description": "List of the locations this breakpoint resolved into upon addition.",
1818
+ "type": "array",
1819
+ "items": {
1820
+ "$ref": "Location"
1821
+ }
1822
+ }
1823
+ ]
1824
+ },
1825
+ {
1826
+ "name": "setBreakpointsActive",
1827
+ "description": "Activates / deactivates all breakpoints on the page.",
1828
+ "parameters": [
1829
+ {
1830
+ "name": "active",
1831
+ "description": "New value for breakpoints active state.",
1832
+ "type": "boolean"
1833
+ }
1834
+ ]
1835
+ },
1836
+ {
1837
+ "name": "setPauseOnExceptions",
1838
+ "description": "Defines pause on exceptions state. Can be set to stop on all exceptions, uncaught exceptions or\nno exceptions. Initial pause on exceptions state is `none`.",
1839
+ "parameters": [
1840
+ {
1841
+ "name": "state",
1842
+ "description": "Pause on exceptions mode.",
1843
+ "type": "string",
1844
+ "enum": [
1845
+ "none",
1846
+ "uncaught",
1847
+ "all"
1848
+ ]
1849
+ }
1850
+ ]
1851
+ },
1852
+ {
1853
+ "name": "setScriptSource",
1854
+ "description": "Edits JavaScript source live.",
1855
+ "parameters": [
1856
+ {
1857
+ "name": "scriptId",
1858
+ "description": "Id of the script to edit.",
1859
+ "$ref": "Runtime.ScriptId"
1860
+ },
1861
+ {
1862
+ "name": "scriptSource",
1863
+ "description": "New content of the script.",
1864
+ "type": "string"
1865
+ },
1866
+ {
1867
+ "name": "dryRun",
1868
+ "description": "If true the change will not actually be applied. Dry run may be used to get result\ndescription without actually modifying the code.",
1869
+ "optional": true,
1870
+ "type": "boolean"
1871
+ }
1872
+ ],
1873
+ "returns": [
1874
+ {
1875
+ "name": "exceptionDetails",
1876
+ "description": "Exception details if any.",
1877
+ "optional": true,
1878
+ "$ref": "Runtime.ExceptionDetails"
1879
+ }
1880
+ ]
1881
+ },
1882
+ {
1883
+ "name": "setSkipAllPauses",
1884
+ "description": "Makes page not interrupt on any pauses (breakpoint, exception, dom exception etc).",
1885
+ "parameters": [
1886
+ {
1887
+ "name": "skip",
1888
+ "description": "New value for skip pauses state.",
1889
+ "type": "boolean"
1890
+ }
1891
+ ]
1892
+ },
1893
+ {
1894
+ "name": "setVariableValue",
1895
+ "description": "Changes value of variable in a callframe. Object-based scopes are not supported and must be\nmutated manually.",
1896
+ "parameters": [
1897
+ {
1898
+ "name": "scopeNumber",
1899
+ "description": "0-based number of scope as was listed in scope chain. Only 'local', 'closure' and 'catch'\nscope types are allowed. Other scopes could be manipulated manually.",
1900
+ "type": "integer"
1901
+ },
1902
+ {
1903
+ "name": "variableName",
1904
+ "description": "Variable name.",
1905
+ "type": "string"
1906
+ },
1907
+ {
1908
+ "name": "newValue",
1909
+ "description": "New variable value.",
1910
+ "$ref": "Runtime.CallArgument"
1911
+ },
1912
+ {
1913
+ "name": "callFrameId",
1914
+ "description": "Id of callframe that holds variable.",
1915
+ "$ref": "CallFrameId"
1916
+ }
1917
+ ]
1918
+ },
1919
+ {
1920
+ "name": "stepInto",
1921
+ "description": "Steps into the function call."
1922
+ },
1923
+ {
1924
+ "name": "stepOut",
1925
+ "description": "Steps out of the function call."
1926
+ },
1927
+ {
1928
+ "name": "stepOver",
1929
+ "description": "Steps over the statement."
1930
+ }
1931
+ ],
1932
+ "events": [
1933
+ {
1934
+ "name": "breakpointResolved",
1935
+ "description": "Fired when breakpoint is resolved to an actual script and location.",
1936
+ "parameters": [
1937
+ {
1938
+ "name": "breakpointId",
1939
+ "description": "Breakpoint unique identifier.",
1940
+ "$ref": "BreakpointId"
1941
+ },
1942
+ {
1943
+ "name": "location",
1944
+ "description": "Actual breakpoint location.",
1945
+ "$ref": "Location"
1946
+ }
1947
+ ]
1948
+ },
1949
+ {
1950
+ "name": "paused",
1951
+ "description": "Fired when the virtual machine stopped on breakpoint or exception or any other stop criteria.",
1952
+ "parameters": [
1953
+ {
1954
+ "name": "callFrames",
1955
+ "description": "Call stack the virtual machine stopped on.",
1956
+ "type": "array",
1957
+ "items": {
1958
+ "$ref": "CallFrame"
1959
+ }
1960
+ },
1961
+ {
1962
+ "name": "reason",
1963
+ "description": "Pause reason.",
1964
+ "type": "string",
1965
+ "enum": [
1966
+ "ambiguous",
1967
+ "assert",
1968
+ "debugCommand",
1969
+ "DOM",
1970
+ "EventListener",
1971
+ "exception",
1972
+ "OOM",
1973
+ "other",
1974
+ "promiseRejection",
1975
+ "XHR"
1976
+ ]
1977
+ },
1978
+ {
1979
+ "name": "data",
1980
+ "description": "Object containing break-specific auxiliary properties.",
1981
+ "optional": true,
1982
+ "type": "object"
1983
+ },
1984
+ {
1985
+ "name": "hitBreakpoints",
1986
+ "description": "Hit breakpoints IDs",
1987
+ "optional": true,
1988
+ "type": "array",
1989
+ "items": {
1990
+ "type": "string"
1991
+ }
1992
+ },
1993
+ {
1994
+ "name": "asyncStackTrace",
1995
+ "description": "Async stack trace, if any.",
1996
+ "optional": true,
1997
+ "$ref": "Runtime.StackTrace"
1998
+ }
1999
+ ]
2000
+ },
2001
+ {
2002
+ "name": "resumed",
2003
+ "description": "Fired when the virtual machine resumed execution."
2004
+ },
2005
+ {
2006
+ "name": "scriptFailedToParse",
2007
+ "description": "Fired when virtual machine fails to parse the script.",
2008
+ "parameters": [
2009
+ {
2010
+ "name": "scriptId",
2011
+ "description": "Identifier of the script parsed.",
2012
+ "$ref": "Runtime.ScriptId"
2013
+ },
2014
+ {
2015
+ "name": "url",
2016
+ "description": "URL or name of the script parsed (if any).",
2017
+ "type": "string"
2018
+ },
2019
+ {
2020
+ "name": "startLine",
2021
+ "description": "Line offset of the script within the resource with given URL (for script tags).",
2022
+ "type": "integer"
2023
+ },
2024
+ {
2025
+ "name": "startColumn",
2026
+ "description": "Column offset of the script within the resource with given URL.",
2027
+ "type": "integer"
2028
+ },
2029
+ {
2030
+ "name": "endLine",
2031
+ "description": "Last line of the script.",
2032
+ "type": "integer"
2033
+ },
2034
+ {
2035
+ "name": "endColumn",
2036
+ "description": "Length of the last line of the script.",
2037
+ "type": "integer"
2038
+ },
2039
+ {
2040
+ "name": "executionContextId",
2041
+ "description": "Specifies script creation context.",
2042
+ "$ref": "Runtime.ExecutionContextId"
2043
+ },
2044
+ {
2045
+ "name": "hash",
2046
+ "description": "Content hash of the script.",
2047
+ "type": "string"
2048
+ },
2049
+ {
2050
+ "name": "executionContextAuxData",
2051
+ "description": "Embedder-specific auxiliary data.",
2052
+ "optional": true,
2053
+ "type": "object"
2054
+ },
2055
+ {
2056
+ "name": "sourceMapURL",
2057
+ "description": "URL of source map associated with script (if any).",
2058
+ "optional": true,
2059
+ "type": "string"
2060
+ },
2061
+ {
2062
+ "name": "hasSourceURL",
2063
+ "description": "True, if this script has sourceURL.",
2064
+ "optional": true,
2065
+ "type": "boolean"
2066
+ },
2067
+ {
2068
+ "name": "isModule",
2069
+ "description": "True, if this script is ES6 module.",
2070
+ "optional": true,
2071
+ "type": "boolean"
2072
+ },
2073
+ {
2074
+ "name": "length",
2075
+ "description": "This script length.",
2076
+ "optional": true,
2077
+ "type": "integer"
2078
+ }
2079
+ ]
2080
+ },
2081
+ {
2082
+ "name": "scriptParsed",
2083
+ "description": "Fired when virtual machine parses script. This event is also fired for all known and uncollected\nscripts upon enabling debugger.",
2084
+ "parameters": [
2085
+ {
2086
+ "name": "scriptId",
2087
+ "description": "Identifier of the script parsed.",
2088
+ "$ref": "Runtime.ScriptId"
2089
+ },
2090
+ {
2091
+ "name": "url",
2092
+ "description": "URL or name of the script parsed (if any).",
2093
+ "type": "string"
2094
+ },
2095
+ {
2096
+ "name": "startLine",
2097
+ "description": "Line offset of the script within the resource with given URL (for script tags).",
2098
+ "type": "integer"
2099
+ },
2100
+ {
2101
+ "name": "startColumn",
2102
+ "description": "Column offset of the script within the resource with given URL.",
2103
+ "type": "integer"
2104
+ },
2105
+ {
2106
+ "name": "endLine",
2107
+ "description": "Last line of the script.",
2108
+ "type": "integer"
2109
+ },
2110
+ {
2111
+ "name": "endColumn",
2112
+ "description": "Length of the last line of the script.",
2113
+ "type": "integer"
2114
+ },
2115
+ {
2116
+ "name": "executionContextId",
2117
+ "description": "Specifies script creation context.",
2118
+ "$ref": "Runtime.ExecutionContextId"
2119
+ },
2120
+ {
2121
+ "name": "hash",
2122
+ "description": "Content hash of the script.",
2123
+ "type": "string"
2124
+ },
2125
+ {
2126
+ "name": "executionContextAuxData",
2127
+ "description": "Embedder-specific auxiliary data.",
2128
+ "optional": true,
2129
+ "type": "object"
2130
+ },
2131
+ {
2132
+ "name": "sourceMapURL",
2133
+ "description": "URL of source map associated with script (if any).",
2134
+ "optional": true,
2135
+ "type": "string"
2136
+ },
2137
+ {
2138
+ "name": "hasSourceURL",
2139
+ "description": "True, if this script has sourceURL.",
2140
+ "optional": true,
2141
+ "type": "boolean"
2142
+ },
2143
+ {
2144
+ "name": "isModule",
2145
+ "description": "True, if this script is ES6 module.",
2146
+ "optional": true,
2147
+ "type": "boolean"
2148
+ },
2149
+ {
2150
+ "name": "length",
2151
+ "description": "This script length.",
2152
+ "optional": true,
2153
+ "type": "integer"
2154
+ }
2155
+ ]
2156
+ }
2157
+ ]
2158
+ },
2159
+ {
2160
+ "domain": "Profiler",
2161
+ "dependencies": [
2162
+ "Runtime",
2163
+ "Debugger"
2164
+ ],
2165
+ "types": [
2166
+ {
2167
+ "id": "ProfileNode",
2168
+ "description": "Profile node. Holds callsite information, execution statistics and child nodes.",
2169
+ "type": "object",
2170
+ "properties": [
2171
+ {
2172
+ "name": "id",
2173
+ "description": "Unique id of the node.",
2174
+ "type": "integer"
2175
+ },
2176
+ {
2177
+ "name": "callFrame",
2178
+ "description": "Function location.",
2179
+ "$ref": "Runtime.CallFrame"
2180
+ },
2181
+ {
2182
+ "name": "hitCount",
2183
+ "description": "Number of samples where this node was on top of the call stack.",
2184
+ "optional": true,
2185
+ "type": "integer"
2186
+ },
2187
+ {
2188
+ "name": "children",
2189
+ "description": "Child node ids.",
2190
+ "optional": true,
2191
+ "type": "array",
2192
+ "items": {
2193
+ "type": "integer"
2194
+ }
2195
+ },
2196
+ {
2197
+ "name": "deoptReason",
2198
+ "description": "The reason of being not optimized. The function may be deoptimized or marked as don't\noptimize.",
2199
+ "optional": true,
2200
+ "type": "string"
2201
+ },
2202
+ {
2203
+ "name": "positionTicks",
2204
+ "description": "An array of source position ticks.",
2205
+ "optional": true,
2206
+ "type": "array",
2207
+ "items": {
2208
+ "$ref": "PositionTickInfo"
2209
+ }
2210
+ }
2211
+ ]
2212
+ },
2213
+ {
2214
+ "id": "Profile",
2215
+ "description": "Profile.",
2216
+ "type": "object",
2217
+ "properties": [
2218
+ {
2219
+ "name": "nodes",
2220
+ "description": "The list of profile nodes. First item is the root node.",
2221
+ "type": "array",
2222
+ "items": {
2223
+ "$ref": "ProfileNode"
2224
+ }
2225
+ },
2226
+ {
2227
+ "name": "startTime",
2228
+ "description": "Profiling start timestamp in microseconds.",
2229
+ "type": "number"
2230
+ },
2231
+ {
2232
+ "name": "endTime",
2233
+ "description": "Profiling end timestamp in microseconds.",
2234
+ "type": "number"
2235
+ },
2236
+ {
2237
+ "name": "samples",
2238
+ "description": "Ids of samples top nodes.",
2239
+ "optional": true,
2240
+ "type": "array",
2241
+ "items": {
2242
+ "type": "integer"
2243
+ }
2244
+ },
2245
+ {
2246
+ "name": "timeDeltas",
2247
+ "description": "Time intervals between adjacent samples in microseconds. The first delta is relative to the\nprofile startTime.",
2248
+ "optional": true,
2249
+ "type": "array",
2250
+ "items": {
2251
+ "type": "integer"
2252
+ }
2253
+ }
2254
+ ]
2255
+ },
2256
+ {
2257
+ "id": "PositionTickInfo",
2258
+ "description": "Specifies a number of samples attributed to a certain source position.",
2259
+ "type": "object",
2260
+ "properties": [
2261
+ {
2262
+ "name": "line",
2263
+ "description": "Source line number (1-based).",
2264
+ "type": "integer"
2265
+ },
2266
+ {
2267
+ "name": "ticks",
2268
+ "description": "Number of samples attributed to the source line.",
2269
+ "type": "integer"
2270
+ }
2271
+ ]
2272
+ },
2273
+ {
2274
+ "id": "CoverageRange",
2275
+ "description": "Coverage data for a source range.",
2276
+ "type": "object",
2277
+ "properties": [
2278
+ {
2279
+ "name": "startOffset",
2280
+ "description": "JavaScript script source offset for the range start.",
2281
+ "type": "integer"
2282
+ },
2283
+ {
2284
+ "name": "endOffset",
2285
+ "description": "JavaScript script source offset for the range end.",
2286
+ "type": "integer"
2287
+ },
2288
+ {
2289
+ "name": "count",
2290
+ "description": "Collected execution count of the source range.",
2291
+ "type": "integer"
2292
+ }
2293
+ ]
2294
+ },
2295
+ {
2296
+ "id": "FunctionCoverage",
2297
+ "description": "Coverage data for a JavaScript function.",
2298
+ "type": "object",
2299
+ "properties": [
2300
+ {
2301
+ "name": "functionName",
2302
+ "description": "JavaScript function name.",
2303
+ "type": "string"
2304
+ },
2305
+ {
2306
+ "name": "ranges",
2307
+ "description": "Source ranges inside the function with coverage data.",
2308
+ "type": "array",
2309
+ "items": {
2310
+ "$ref": "CoverageRange"
2311
+ }
2312
+ },
2313
+ {
2314
+ "name": "isBlockCoverage",
2315
+ "description": "Whether coverage data for this function has block granularity.",
2316
+ "type": "boolean"
2317
+ }
2318
+ ]
2319
+ },
2320
+ {
2321
+ "id": "ScriptCoverage",
2322
+ "description": "Coverage data for a JavaScript script.",
2323
+ "type": "object",
2324
+ "properties": [
2325
+ {
2326
+ "name": "scriptId",
2327
+ "description": "JavaScript script id.",
2328
+ "$ref": "Runtime.ScriptId"
2329
+ },
2330
+ {
2331
+ "name": "url",
2332
+ "description": "JavaScript script name or url.",
2333
+ "type": "string"
2334
+ },
2335
+ {
2336
+ "name": "functions",
2337
+ "description": "Functions contained in the script that has coverage data.",
2338
+ "type": "array",
2339
+ "items": {
2340
+ "$ref": "FunctionCoverage"
2341
+ }
2342
+ }
2343
+ ]
2344
+ }
2345
+ ],
2346
+ "commands": [
2347
+ {
2348
+ "name": "disable"
2349
+ },
2350
+ {
2351
+ "name": "enable"
2352
+ },
2353
+ {
2354
+ "name": "getBestEffortCoverage",
2355
+ "description": "Collect coverage data for the current isolate. The coverage data may be incomplete due to\ngarbage collection.",
2356
+ "returns": [
2357
+ {
2358
+ "name": "result",
2359
+ "description": "Coverage data for the current isolate.",
2360
+ "type": "array",
2361
+ "items": {
2362
+ "$ref": "ScriptCoverage"
2363
+ }
2364
+ }
2365
+ ]
2366
+ },
2367
+ {
2368
+ "name": "setSamplingInterval",
2369
+ "description": "Changes CPU profiler sampling interval. Must be called before CPU profiles recording started.",
2370
+ "parameters": [
2371
+ {
2372
+ "name": "interval",
2373
+ "description": "New sampling interval in microseconds.",
2374
+ "type": "integer"
2375
+ }
2376
+ ]
2377
+ },
2378
+ {
2379
+ "name": "start"
2380
+ },
2381
+ {
2382
+ "name": "startPreciseCoverage",
2383
+ "description": "Enable precise code coverage. Coverage data for JavaScript executed before enabling precise code\ncoverage may be incomplete. Enabling prevents running optimized code and resets execution\ncounters.",
2384
+ "parameters": [
2385
+ {
2386
+ "name": "callCount",
2387
+ "description": "Collect accurate call counts beyond simple 'covered' or 'not covered'.",
2388
+ "optional": true,
2389
+ "type": "boolean"
2390
+ },
2391
+ {
2392
+ "name": "detailed",
2393
+ "description": "Collect block-based coverage.",
2394
+ "optional": true,
2395
+ "type": "boolean"
2396
+ }
2397
+ ]
2398
+ },
2399
+ {
2400
+ "name": "stop",
2401
+ "returns": [
2402
+ {
2403
+ "name": "profile",
2404
+ "description": "Recorded profile.",
2405
+ "$ref": "Profile"
2406
+ }
2407
+ ]
2408
+ },
2409
+ {
2410
+ "name": "stopPreciseCoverage",
2411
+ "description": "Disable precise code coverage. Disabling releases unnecessary execution count records and allows\nexecuting optimized code."
2412
+ },
2413
+ {
2414
+ "name": "takePreciseCoverage",
2415
+ "description": "Collect coverage data for the current isolate, and resets execution counters. Precise code\ncoverage needs to have started.",
2416
+ "returns": [
2417
+ {
2418
+ "name": "result",
2419
+ "description": "Coverage data for the current isolate.",
2420
+ "type": "array",
2421
+ "items": {
2422
+ "$ref": "ScriptCoverage"
2423
+ }
2424
+ }
2425
+ ]
2426
+ }
2427
+ ],
2428
+ "events": [
2429
+ {
2430
+ "name": "consoleProfileFinished",
2431
+ "parameters": [
2432
+ {
2433
+ "name": "id",
2434
+ "type": "string"
2435
+ },
2436
+ {
2437
+ "name": "location",
2438
+ "description": "Location of console.profileEnd().",
2439
+ "$ref": "Debugger.Location"
2440
+ },
2441
+ {
2442
+ "name": "profile",
2443
+ "$ref": "Profile"
2444
+ },
2445
+ {
2446
+ "name": "title",
2447
+ "description": "Profile title passed as an argument to console.profile().",
2448
+ "optional": true,
2449
+ "type": "string"
2450
+ }
2451
+ ]
2452
+ },
2453
+ {
2454
+ "name": "consoleProfileStarted",
2455
+ "description": "Sent when new profile recording is started using console.profile() call.",
2456
+ "parameters": [
2457
+ {
2458
+ "name": "id",
2459
+ "type": "string"
2460
+ },
2461
+ {
2462
+ "name": "location",
2463
+ "description": "Location of console.profile().",
2464
+ "$ref": "Debugger.Location"
2465
+ },
2466
+ {
2467
+ "name": "title",
2468
+ "description": "Profile title passed as an argument to console.profile().",
2469
+ "optional": true,
2470
+ "type": "string"
2471
+ }
2472
+ ]
2473
+ }
2474
+ ]
2475
+ },
2476
+ {
2477
+ "domain": "Runtime",
2478
+ "description": "Runtime domain exposes JavaScript runtime by means of remote evaluation and mirror objects.\nEvaluation results are returned as mirror object that expose object type, string representation\nand unique identifier that can be used for further object reference. Original objects are\nmaintained in memory unless they are either explicitly released or are released along with the\nother objects in their object group.",
2479
+ "types": [
2480
+ {
2481
+ "id": "ScriptId",
2482
+ "description": "Unique script identifier.",
2483
+ "type": "string"
2484
+ },
2485
+ {
2486
+ "id": "RemoteObjectId",
2487
+ "description": "Unique object identifier.",
2488
+ "type": "string"
2489
+ },
2490
+ {
2491
+ "id": "UnserializableValue",
2492
+ "description": "Primitive value which cannot be JSON-stringified. Includes values `-0`, `NaN`, `Infinity`,\n`-Infinity`, and bigint literals.",
2493
+ "type": "string"
2494
+ },
2495
+ {
2496
+ "id": "RemoteObject",
2497
+ "description": "Mirror object referencing original JavaScript object.",
2498
+ "type": "object",
2499
+ "properties": [
2500
+ {
2501
+ "name": "type",
2502
+ "description": "Object type.",
2503
+ "type": "string",
2504
+ "enum": [
2505
+ "object",
2506
+ "function",
2507
+ "undefined",
2508
+ "string",
2509
+ "number",
2510
+ "boolean",
2511
+ "symbol",
2512
+ "bigint"
2513
+ ]
2514
+ },
2515
+ {
2516
+ "name": "subtype",
2517
+ "description": "Object subtype hint. Specified for `object` type values only.",
2518
+ "optional": true,
2519
+ "type": "string",
2520
+ "enum": [
2521
+ "array",
2522
+ "null",
2523
+ "node",
2524
+ "regexp",
2525
+ "date",
2526
+ "map",
2527
+ "set",
2528
+ "weakmap",
2529
+ "weakset",
2530
+ "iterator",
2531
+ "generator",
2532
+ "error",
2533
+ "proxy",
2534
+ "promise",
2535
+ "typedarray",
2536
+ "arraybuffer",
2537
+ "dataview"
2538
+ ]
2539
+ },
2540
+ {
2541
+ "name": "className",
2542
+ "description": "Object class (constructor) name. Specified for `object` type values only.",
2543
+ "optional": true,
2544
+ "type": "string"
2545
+ },
2546
+ {
2547
+ "name": "value",
2548
+ "description": "Remote object value in case of primitive values or JSON values (if it was requested).",
2549
+ "optional": true,
2550
+ "type": "any"
2551
+ },
2552
+ {
2553
+ "name": "unserializableValue",
2554
+ "description": "Primitive value which can not be JSON-stringified does not have `value`, but gets this\nproperty.",
2555
+ "optional": true,
2556
+ "$ref": "UnserializableValue"
2557
+ },
2558
+ {
2559
+ "name": "description",
2560
+ "description": "String representation of the object.",
2561
+ "optional": true,
2562
+ "type": "string"
2563
+ },
2564
+ {
2565
+ "name": "objectId",
2566
+ "description": "Unique object identifier (for non-primitive values).",
2567
+ "optional": true,
2568
+ "$ref": "RemoteObjectId"
2569
+ }
2570
+ ]
2571
+ },
2572
+ {
2573
+ "id": "PropertyDescriptor",
2574
+ "description": "Object property descriptor.",
2575
+ "type": "object",
2576
+ "properties": [
2577
+ {
2578
+ "name": "name",
2579
+ "description": "Property name or symbol description.",
2580
+ "type": "string"
2581
+ },
2582
+ {
2583
+ "name": "value",
2584
+ "description": "The value associated with the property.",
2585
+ "optional": true,
2586
+ "$ref": "RemoteObject"
2587
+ },
2588
+ {
2589
+ "name": "writable",
2590
+ "description": "True if the value associated with the property may be changed (data descriptors only).",
2591
+ "optional": true,
2592
+ "type": "boolean"
2593
+ },
2594
+ {
2595
+ "name": "get",
2596
+ "description": "A function which serves as a getter for the property, or `undefined` if there is no getter\n(accessor descriptors only).",
2597
+ "optional": true,
2598
+ "$ref": "RemoteObject"
2599
+ },
2600
+ {
2601
+ "name": "set",
2602
+ "description": "A function which serves as a setter for the property, or `undefined` if there is no setter\n(accessor descriptors only).",
2603
+ "optional": true,
2604
+ "$ref": "RemoteObject"
2605
+ },
2606
+ {
2607
+ "name": "configurable",
2608
+ "description": "True if the type of this property descriptor may be changed and if the property may be\ndeleted from the corresponding object.",
2609
+ "type": "boolean"
2610
+ },
2611
+ {
2612
+ "name": "enumerable",
2613
+ "description": "True if this property shows up during enumeration of the properties on the corresponding\nobject.",
2614
+ "type": "boolean"
2615
+ },
2616
+ {
2617
+ "name": "wasThrown",
2618
+ "description": "True if the result was thrown during the evaluation.",
2619
+ "optional": true,
2620
+ "type": "boolean"
2621
+ },
2622
+ {
2623
+ "name": "isOwn",
2624
+ "description": "True if the property is owned for the object.",
2625
+ "optional": true,
2626
+ "type": "boolean"
2627
+ },
2628
+ {
2629
+ "name": "symbol",
2630
+ "description": "Property symbol object, if the property is of the `symbol` type.",
2631
+ "optional": true,
2632
+ "$ref": "RemoteObject"
2633
+ }
2634
+ ]
2635
+ },
2636
+ {
2637
+ "id": "InternalPropertyDescriptor",
2638
+ "description": "Object internal property descriptor. This property isn't normally visible in JavaScript code.",
2639
+ "type": "object",
2640
+ "properties": [
2641
+ {
2642
+ "name": "name",
2643
+ "description": "Conventional property name.",
2644
+ "type": "string"
2645
+ },
2646
+ {
2647
+ "name": "value",
2648
+ "description": "The value associated with the property.",
2649
+ "optional": true,
2650
+ "$ref": "RemoteObject"
2651
+ }
2652
+ ]
2653
+ },
2654
+ {
2655
+ "id": "CallArgument",
2656
+ "description": "Represents function call argument. Either remote object id `objectId`, primitive `value`,\nunserializable primitive value or neither of (for undefined) them should be specified.",
2657
+ "type": "object",
2658
+ "properties": [
2659
+ {
2660
+ "name": "value",
2661
+ "description": "Primitive value or serializable javascript object.",
2662
+ "optional": true,
2663
+ "type": "any"
2664
+ },
2665
+ {
2666
+ "name": "unserializableValue",
2667
+ "description": "Primitive value which can not be JSON-stringified.",
2668
+ "optional": true,
2669
+ "$ref": "UnserializableValue"
2670
+ },
2671
+ {
2672
+ "name": "objectId",
2673
+ "description": "Remote object handle.",
2674
+ "optional": true,
2675
+ "$ref": "RemoteObjectId"
2676
+ }
2677
+ ]
2678
+ },
2679
+ {
2680
+ "id": "ExecutionContextId",
2681
+ "description": "Id of an execution context.",
2682
+ "type": "integer"
2683
+ },
2684
+ {
2685
+ "id": "ExecutionContextDescription",
2686
+ "description": "Description of an isolated world.",
2687
+ "type": "object",
2688
+ "properties": [
2689
+ {
2690
+ "name": "id",
2691
+ "description": "Unique id of the execution context. It can be used to specify in which execution context\nscript evaluation should be performed.",
2692
+ "$ref": "ExecutionContextId"
2693
+ },
2694
+ {
2695
+ "name": "origin",
2696
+ "description": "Execution context origin.",
2697
+ "type": "string"
2698
+ },
2699
+ {
2700
+ "name": "name",
2701
+ "description": "Human readable name describing given context.",
2702
+ "type": "string"
2703
+ },
2704
+ {
2705
+ "name": "auxData",
2706
+ "description": "Embedder-specific auxiliary data.",
2707
+ "optional": true,
2708
+ "type": "object"
2709
+ }
2710
+ ]
2711
+ },
2712
+ {
2713
+ "id": "ExceptionDetails",
2714
+ "description": "Detailed information about exception (or error) that was thrown during script compilation or\nexecution.",
2715
+ "type": "object",
2716
+ "properties": [
2717
+ {
2718
+ "name": "exceptionId",
2719
+ "description": "Exception id.",
2720
+ "type": "integer"
2721
+ },
2722
+ {
2723
+ "name": "text",
2724
+ "description": "Exception text, which should be used together with exception object when available.",
2725
+ "type": "string"
2726
+ },
2727
+ {
2728
+ "name": "lineNumber",
2729
+ "description": "Line number of the exception location (0-based).",
2730
+ "type": "integer"
2731
+ },
2732
+ {
2733
+ "name": "columnNumber",
2734
+ "description": "Column number of the exception location (0-based).",
2735
+ "type": "integer"
2736
+ },
2737
+ {
2738
+ "name": "scriptId",
2739
+ "description": "Script ID of the exception location.",
2740
+ "optional": true,
2741
+ "$ref": "ScriptId"
2742
+ },
2743
+ {
2744
+ "name": "url",
2745
+ "description": "URL of the exception location, to be used when the script was not reported.",
2746
+ "optional": true,
2747
+ "type": "string"
2748
+ },
2749
+ {
2750
+ "name": "stackTrace",
2751
+ "description": "JavaScript stack trace if available.",
2752
+ "optional": true,
2753
+ "$ref": "StackTrace"
2754
+ },
2755
+ {
2756
+ "name": "exception",
2757
+ "description": "Exception object if available.",
2758
+ "optional": true,
2759
+ "$ref": "RemoteObject"
2760
+ },
2761
+ {
2762
+ "name": "executionContextId",
2763
+ "description": "Identifier of the context where exception happened.",
2764
+ "optional": true,
2765
+ "$ref": "ExecutionContextId"
2766
+ }
2767
+ ]
2768
+ },
2769
+ {
2770
+ "id": "Timestamp",
2771
+ "description": "Number of milliseconds since epoch.",
2772
+ "type": "number"
2773
+ },
2774
+ {
2775
+ "id": "TimeDelta",
2776
+ "description": "Number of milliseconds.",
2777
+ "type": "number"
2778
+ },
2779
+ {
2780
+ "id": "CallFrame",
2781
+ "description": "Stack entry for runtime errors and assertions.",
2782
+ "type": "object",
2783
+ "properties": [
2784
+ {
2785
+ "name": "functionName",
2786
+ "description": "JavaScript function name.",
2787
+ "type": "string"
2788
+ },
2789
+ {
2790
+ "name": "scriptId",
2791
+ "description": "JavaScript script id.",
2792
+ "$ref": "ScriptId"
2793
+ },
2794
+ {
2795
+ "name": "url",
2796
+ "description": "JavaScript script name or url.",
2797
+ "type": "string"
2798
+ },
2799
+ {
2800
+ "name": "lineNumber",
2801
+ "description": "JavaScript script line number (0-based).",
2802
+ "type": "integer"
2803
+ },
2804
+ {
2805
+ "name": "columnNumber",
2806
+ "description": "JavaScript script column number (0-based).",
2807
+ "type": "integer"
2808
+ }
2809
+ ]
2810
+ }
2811
+ ],
2812
+ "commands": [
2813
+ {
2814
+ "name": "awaitPromise",
2815
+ "description": "Add handler to promise with given promise object id.",
2816
+ "parameters": [
2817
+ {
2818
+ "name": "promiseObjectId",
2819
+ "description": "Identifier of the promise.",
2820
+ "$ref": "RemoteObjectId"
2821
+ },
2822
+ {
2823
+ "name": "returnByValue",
2824
+ "description": "Whether the result is expected to be a JSON object that should be sent by value.",
2825
+ "optional": true,
2826
+ "type": "boolean"
2827
+ },
2828
+ {
2829
+ "name": "generatePreview",
2830
+ "description": "Whether preview should be generated for the result.",
2831
+ "optional": true,
2832
+ "type": "boolean"
2833
+ }
2834
+ ],
2835
+ "returns": [
2836
+ {
2837
+ "name": "result",
2838
+ "description": "Promise result. Will contain rejected value if promise was rejected.",
2839
+ "$ref": "RemoteObject"
2840
+ },
2841
+ {
2842
+ "name": "exceptionDetails",
2843
+ "description": "Exception details if stack strace is available.",
2844
+ "optional": true,
2845
+ "$ref": "ExceptionDetails"
2846
+ }
2847
+ ]
2848
+ },
2849
+ {
2850
+ "name": "callFunctionOn",
2851
+ "description": "Calls function with given declaration on the given object. Object group of the result is\ninherited from the target object.",
2852
+ "parameters": [
2853
+ {
2854
+ "name": "functionDeclaration",
2855
+ "description": "Declaration of the function to call.",
2856
+ "type": "string"
2857
+ },
2858
+ {
2859
+ "name": "objectId",
2860
+ "description": "Identifier of the object to call function on. Either objectId or executionContextId should\nbe specified.",
2861
+ "optional": true,
2862
+ "$ref": "RemoteObjectId"
2863
+ },
2864
+ {
2865
+ "name": "arguments",
2866
+ "description": "Call arguments. All call arguments must belong to the same JavaScript world as the target\nobject.",
2867
+ "optional": true,
2868
+ "type": "array",
2869
+ "items": {
2870
+ "$ref": "CallArgument"
2871
+ }
2872
+ },
2873
+ {
2874
+ "name": "silent",
2875
+ "description": "In silent mode exceptions thrown during evaluation are not reported and do not pause\nexecution. Overrides `setPauseOnException` state.",
2876
+ "optional": true,
2877
+ "type": "boolean"
2878
+ },
2879
+ {
2880
+ "name": "returnByValue",
2881
+ "description": "Whether the result is expected to be a JSON object which should be sent by value.",
2882
+ "optional": true,
2883
+ "type": "boolean"
2884
+ },
2885
+ {
2886
+ "name": "userGesture",
2887
+ "description": "Whether execution should be treated as initiated by user in the UI.",
2888
+ "optional": true,
2889
+ "type": "boolean"
2890
+ },
2891
+ {
2892
+ "name": "awaitPromise",
2893
+ "description": "Whether execution should `await` for resulting value and return once awaited promise is\nresolved.",
2894
+ "optional": true,
2895
+ "type": "boolean"
2896
+ },
2897
+ {
2898
+ "name": "executionContextId",
2899
+ "description": "Specifies execution context which global object will be used to call function on. Either\nexecutionContextId or objectId should be specified.",
2900
+ "optional": true,
2901
+ "$ref": "ExecutionContextId"
2902
+ },
2903
+ {
2904
+ "name": "objectGroup",
2905
+ "description": "Symbolic group name that can be used to release multiple objects. If objectGroup is not\nspecified and objectId is, objectGroup will be inherited from object.",
2906
+ "optional": true,
2907
+ "type": "string"
2908
+ }
2909
+ ],
2910
+ "returns": [
2911
+ {
2912
+ "name": "result",
2913
+ "description": "Call result.",
2914
+ "$ref": "RemoteObject"
2915
+ },
2916
+ {
2917
+ "name": "exceptionDetails",
2918
+ "description": "Exception details.",
2919
+ "optional": true,
2920
+ "$ref": "ExceptionDetails"
2921
+ }
2922
+ ]
2923
+ },
2924
+ {
2925
+ "name": "compileScript",
2926
+ "description": "Compiles expression.",
2927
+ "parameters": [
2928
+ {
2929
+ "name": "expression",
2930
+ "description": "Expression to compile.",
2931
+ "type": "string"
2932
+ },
2933
+ {
2934
+ "name": "sourceURL",
2935
+ "description": "Source url to be set for the script.",
2936
+ "type": "string"
2937
+ },
2938
+ {
2939
+ "name": "persistScript",
2940
+ "description": "Specifies whether the compiled script should be persisted.",
2941
+ "type": "boolean"
2942
+ },
2943
+ {
2944
+ "name": "executionContextId",
2945
+ "description": "Specifies in which execution context to perform script run. If the parameter is omitted the\nevaluation will be performed in the context of the inspected page.",
2946
+ "optional": true,
2947
+ "$ref": "ExecutionContextId"
2948
+ }
2949
+ ],
2950
+ "returns": [
2951
+ {
2952
+ "name": "scriptId",
2953
+ "description": "Id of the script.",
2954
+ "optional": true,
2955
+ "$ref": "ScriptId"
2956
+ },
2957
+ {
2958
+ "name": "exceptionDetails",
2959
+ "description": "Exception details.",
2960
+ "optional": true,
2961
+ "$ref": "ExceptionDetails"
2962
+ }
2963
+ ]
2964
+ },
2965
+ {
2966
+ "name": "disable",
2967
+ "description": "Disables reporting of execution contexts creation."
2968
+ },
2969
+ {
2970
+ "name": "discardConsoleEntries",
2971
+ "description": "Discards collected exceptions and console API calls."
2972
+ },
2973
+ {
2974
+ "name": "enable",
2975
+ "description": "Enables reporting of execution contexts creation by means of `executionContextCreated` event.\nWhen the reporting gets enabled the event will be sent immediately for each existing execution\ncontext."
2976
+ },
2977
+ {
2978
+ "name": "evaluate",
2979
+ "description": "Evaluates expression on global object.",
2980
+ "parameters": [
2981
+ {
2982
+ "name": "expression",
2983
+ "description": "Expression to evaluate.",
2984
+ "type": "string"
2985
+ },
2986
+ {
2987
+ "name": "objectGroup",
2988
+ "description": "Symbolic group name that can be used to release multiple objects.",
2989
+ "optional": true,
2990
+ "type": "string"
2991
+ },
2992
+ {
2993
+ "name": "includeCommandLineAPI",
2994
+ "description": "Determines whether Command Line API should be available during the evaluation.",
2995
+ "optional": true,
2996
+ "type": "boolean"
2997
+ },
2998
+ {
2999
+ "name": "silent",
3000
+ "description": "In silent mode exceptions thrown during evaluation are not reported and do not pause\nexecution. Overrides `setPauseOnException` state.",
3001
+ "optional": true,
3002
+ "type": "boolean"
3003
+ },
3004
+ {
3005
+ "name": "contextId",
3006
+ "description": "Specifies in which execution context to perform evaluation. If the parameter is omitted the\nevaluation will be performed in the context of the inspected page.",
3007
+ "optional": true,
3008
+ "$ref": "ExecutionContextId"
3009
+ },
3010
+ {
3011
+ "name": "returnByValue",
3012
+ "description": "Whether the result is expected to be a JSON object that should be sent by value.",
3013
+ "optional": true,
3014
+ "type": "boolean"
3015
+ },
3016
+ {
3017
+ "name": "userGesture",
3018
+ "description": "Whether execution should be treated as initiated by user in the UI.",
3019
+ "optional": true,
3020
+ "type": "boolean"
3021
+ },
3022
+ {
3023
+ "name": "awaitPromise",
3024
+ "description": "Whether execution should `await` for resulting value and return once awaited promise is\nresolved.",
3025
+ "optional": true,
3026
+ "type": "boolean"
3027
+ }
3028
+ ],
3029
+ "returns": [
3030
+ {
3031
+ "name": "result",
3032
+ "description": "Evaluation result.",
3033
+ "$ref": "RemoteObject"
3034
+ },
3035
+ {
3036
+ "name": "exceptionDetails",
3037
+ "description": "Exception details.",
3038
+ "optional": true,
3039
+ "$ref": "ExceptionDetails"
3040
+ }
3041
+ ]
3042
+ },
3043
+ {
3044
+ "name": "getProperties",
3045
+ "description": "Returns properties of a given object. Object group of the result is inherited from the target\nobject.",
3046
+ "parameters": [
3047
+ {
3048
+ "name": "objectId",
3049
+ "description": "Identifier of the object to return properties for.",
3050
+ "$ref": "RemoteObjectId"
3051
+ },
3052
+ {
3053
+ "name": "ownProperties",
3054
+ "description": "If true, returns properties belonging only to the element itself, not to its prototype\nchain.",
3055
+ "optional": true,
3056
+ "type": "boolean"
3057
+ }
3058
+ ],
3059
+ "returns": [
3060
+ {
3061
+ "name": "result",
3062
+ "description": "Object properties.",
3063
+ "type": "array",
3064
+ "items": {
3065
+ "$ref": "PropertyDescriptor"
3066
+ }
3067
+ },
3068
+ {
3069
+ "name": "internalProperties",
3070
+ "description": "Internal object properties (only of the element itself).",
3071
+ "optional": true,
3072
+ "type": "array",
3073
+ "items": {
3074
+ "$ref": "InternalPropertyDescriptor"
3075
+ }
3076
+ },
3077
+ {
3078
+ "name": "exceptionDetails",
3079
+ "description": "Exception details.",
3080
+ "optional": true,
3081
+ "$ref": "ExceptionDetails"
3082
+ }
3083
+ ]
3084
+ },
3085
+ {
3086
+ "name": "globalLexicalScopeNames",
3087
+ "description": "Returns all let, const and class variables from global scope.",
3088
+ "parameters": [
3089
+ {
3090
+ "name": "executionContextId",
3091
+ "description": "Specifies in which execution context to lookup global scope variables.",
3092
+ "optional": true,
3093
+ "$ref": "ExecutionContextId"
3094
+ }
3095
+ ],
3096
+ "returns": [
3097
+ {
3098
+ "name": "names",
3099
+ "type": "array",
3100
+ "items": {
3101
+ "type": "string"
3102
+ }
3103
+ }
3104
+ ]
3105
+ },
3106
+ {
3107
+ "name": "queryObjects",
3108
+ "parameters": [
3109
+ {
3110
+ "name": "prototypeObjectId",
3111
+ "description": "Identifier of the prototype to return objects for.",
3112
+ "$ref": "RemoteObjectId"
3113
+ },
3114
+ {
3115
+ "name": "objectGroup",
3116
+ "description": "Symbolic group name that can be used to release the results.",
3117
+ "optional": true,
3118
+ "type": "string"
3119
+ }
3120
+ ],
3121
+ "returns": [
3122
+ {
3123
+ "name": "objects",
3124
+ "description": "Array with objects.",
3125
+ "$ref": "RemoteObject"
3126
+ }
3127
+ ]
3128
+ },
3129
+ {
3130
+ "name": "releaseObject",
3131
+ "description": "Releases remote object with given id.",
3132
+ "parameters": [
3133
+ {
3134
+ "name": "objectId",
3135
+ "description": "Identifier of the object to release.",
3136
+ "$ref": "RemoteObjectId"
3137
+ }
3138
+ ]
3139
+ },
3140
+ {
3141
+ "name": "releaseObjectGroup",
3142
+ "description": "Releases all remote objects that belong to a given group.",
3143
+ "parameters": [
3144
+ {
3145
+ "name": "objectGroup",
3146
+ "description": "Symbolic object group name.",
3147
+ "type": "string"
3148
+ }
3149
+ ]
3150
+ },
3151
+ {
3152
+ "name": "runIfWaitingForDebugger",
3153
+ "description": "Tells inspected instance to run if it was waiting for debugger to attach."
3154
+ },
3155
+ {
3156
+ "name": "runScript",
3157
+ "description": "Runs script with given id in a given context.",
3158
+ "parameters": [
3159
+ {
3160
+ "name": "scriptId",
3161
+ "description": "Id of the script to run.",
3162
+ "$ref": "ScriptId"
3163
+ },
3164
+ {
3165
+ "name": "executionContextId",
3166
+ "description": "Specifies in which execution context to perform script run. If the parameter is omitted the\nevaluation will be performed in the context of the inspected page.",
3167
+ "optional": true,
3168
+ "$ref": "ExecutionContextId"
3169
+ },
3170
+ {
3171
+ "name": "objectGroup",
3172
+ "description": "Symbolic group name that can be used to release multiple objects.",
3173
+ "optional": true,
3174
+ "type": "string"
3175
+ },
3176
+ {
3177
+ "name": "silent",
3178
+ "description": "In silent mode exceptions thrown during evaluation are not reported and do not pause\nexecution. Overrides `setPauseOnException` state.",
3179
+ "optional": true,
3180
+ "type": "boolean"
3181
+ },
3182
+ {
3183
+ "name": "includeCommandLineAPI",
3184
+ "description": "Determines whether Command Line API should be available during the evaluation.",
3185
+ "optional": true,
3186
+ "type": "boolean"
3187
+ },
3188
+ {
3189
+ "name": "returnByValue",
3190
+ "description": "Whether the result is expected to be a JSON object which should be sent by value.",
3191
+ "optional": true,
3192
+ "type": "boolean"
3193
+ },
3194
+ {
3195
+ "name": "generatePreview",
3196
+ "description": "Whether preview should be generated for the result.",
3197
+ "optional": true,
3198
+ "type": "boolean"
3199
+ },
3200
+ {
3201
+ "name": "awaitPromise",
3202
+ "description": "Whether execution should `await` for resulting value and return once awaited promise is\nresolved.",
3203
+ "optional": true,
3204
+ "type": "boolean"
3205
+ }
3206
+ ],
3207
+ "returns": [
3208
+ {
3209
+ "name": "result",
3210
+ "description": "Run result.",
3211
+ "$ref": "RemoteObject"
3212
+ },
3213
+ {
3214
+ "name": "exceptionDetails",
3215
+ "description": "Exception details.",
3216
+ "optional": true,
3217
+ "$ref": "ExceptionDetails"
3218
+ }
3219
+ ]
3220
+ },
3221
+ {
3222
+ "name": "setAsyncCallStackDepth",
3223
+ "description": "Enables or disables async call stacks tracking.",
3224
+ "redirect": "Debugger",
3225
+ "parameters": [
3226
+ {
3227
+ "name": "maxDepth",
3228
+ "description": "Maximum depth of async call stacks. Setting to `0` will effectively disable collecting async\ncall stacks (default).",
3229
+ "type": "integer"
3230
+ }
3231
+ ]
3232
+ }
3233
+ ],
3234
+ "events": [
3235
+ {
3236
+ "name": "consoleAPICalled",
3237
+ "description": "Issued when console API was called.",
3238
+ "parameters": [
3239
+ {
3240
+ "name": "type",
3241
+ "description": "Type of the call.",
3242
+ "type": "string",
3243
+ "enum": [
3244
+ "log",
3245
+ "debug",
3246
+ "info",
3247
+ "error",
3248
+ "warning",
3249
+ "dir",
3250
+ "dirxml",
3251
+ "table",
3252
+ "trace",
3253
+ "clear",
3254
+ "startGroup",
3255
+ "startGroupCollapsed",
3256
+ "endGroup",
3257
+ "assert",
3258
+ "profile",
3259
+ "profileEnd",
3260
+ "count",
3261
+ "timeEnd"
3262
+ ]
3263
+ },
3264
+ {
3265
+ "name": "args",
3266
+ "description": "Call arguments.",
3267
+ "type": "array",
3268
+ "items": {
3269
+ "$ref": "RemoteObject"
3270
+ }
3271
+ },
3272
+ {
3273
+ "name": "executionContextId",
3274
+ "description": "Identifier of the context where the call was made.",
3275
+ "$ref": "ExecutionContextId"
3276
+ },
3277
+ {
3278
+ "name": "timestamp",
3279
+ "description": "Call timestamp.",
3280
+ "$ref": "Timestamp"
3281
+ },
3282
+ {
3283
+ "name": "stackTrace",
3284
+ "description": "Stack trace captured when the call was made.",
3285
+ "optional": true,
3286
+ "$ref": "StackTrace"
3287
+ }
3288
+ ]
3289
+ },
3290
+ {
3291
+ "name": "exceptionRevoked",
3292
+ "description": "Issued when unhandled exception was revoked.",
3293
+ "parameters": [
3294
+ {
3295
+ "name": "reason",
3296
+ "description": "Reason describing why exception was revoked.",
3297
+ "type": "string"
3298
+ },
3299
+ {
3300
+ "name": "exceptionId",
3301
+ "description": "The id of revoked exception, as reported in `exceptionThrown`.",
3302
+ "type": "integer"
3303
+ }
3304
+ ]
3305
+ },
3306
+ {
3307
+ "name": "exceptionThrown",
3308
+ "description": "Issued when exception was thrown and unhandled.",
3309
+ "parameters": [
3310
+ {
3311
+ "name": "timestamp",
3312
+ "description": "Timestamp of the exception.",
3313
+ "$ref": "Timestamp"
3314
+ },
3315
+ {
3316
+ "name": "exceptionDetails",
3317
+ "$ref": "ExceptionDetails"
3318
+ }
3319
+ ]
3320
+ },
3321
+ {
3322
+ "name": "executionContextCreated",
3323
+ "description": "Issued when new execution context is created.",
3324
+ "parameters": [
3325
+ {
3326
+ "name": "context",
3327
+ "description": "A newly created execution context.",
3328
+ "$ref": "ExecutionContextDescription"
3329
+ }
3330
+ ]
3331
+ },
3332
+ {
3333
+ "name": "executionContextDestroyed",
3334
+ "description": "Issued when execution context is destroyed.",
3335
+ "parameters": [
3336
+ {
3337
+ "name": "executionContextId",
3338
+ "description": "Id of the destroyed context",
3339
+ "$ref": "ExecutionContextId"
3340
+ }
3341
+ ]
3342
+ },
3343
+ {
3344
+ "name": "executionContextsCleared",
3345
+ "description": "Issued when all executionContexts were cleared in browser"
3346
+ },
3347
+ {
3348
+ "name": "inspectRequested",
3349
+ "description": "Issued when object should be inspected (for example, as a result of inspect() command line API\ncall).",
3350
+ "parameters": [
3351
+ {
3352
+ "name": "object",
3353
+ "$ref": "RemoteObject"
3354
+ },
3355
+ {
3356
+ "name": "hints",
3357
+ "type": "object"
3358
+ }
3359
+ ]
3360
+ }
3361
+ ]
3362
+ }
3363
+ ]
3364
+ }