-
Notifications
You must be signed in to change notification settings - Fork 2
/
protocol.json
12443 lines (12443 loc) · 529 KB
/
protocol.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
{
"version": {
"major": "1",
"minor": "2"
},
"domains": [
{
"domain": "Inspector",
"experimental": true,
"types": [],
"commands": [
{
"name": "enable",
"description": "Enables inspector domain notifications."
},
{
"name": "disable",
"description": "Disables inspector domain notifications."
}
],
"events": [
{
"name": "detached",
"description": "Fired when remote debugging connection is about to be terminated. Contains detach reason.",
"parameters": [
{
"name": "reason",
"type": "string",
"description": "The reason why connection has been terminated."
}
]
},
{
"name": "targetCrashed",
"description": "Fired when debugging target has crashed"
}
]
},
{
"domain": "Memory",
"experimental": true,
"types": [
{
"id": "PressureLevel",
"type": "string",
"enum": [
"moderate",
"critical"
],
"description": "Memory pressure level."
}
],
"commands": [
{
"name": "getDOMCounters",
"returns": [
{
"name": "documents",
"type": "integer"
},
{
"name": "nodes",
"type": "integer"
},
{
"name": "jsEventListeners",
"type": "integer"
}
]
},
{
"name": "setPressureNotificationsSuppressed",
"description": "Enable/disable suppressing memory pressure notifications in all processes.",
"parameters": [
{
"name": "suppressed",
"type": "boolean",
"description": "If true, memory pressure notifications will be suppressed."
}
]
},
{
"name": "simulatePressureNotification",
"description": "Simulate a memory pressure notification in all processes.",
"parameters": [
{
"name": "level",
"$ref": "PressureLevel",
"description": "Memory pressure level of the notification."
}
]
}
]
},
{
"domain": "Page",
"description": "Actions and events related to the inspected page belong to the page domain.",
"dependencies": [
"Debugger",
"DOM"
],
"types": [
{
"id": "ResourceType",
"type": "string",
"enum": [
"Document",
"Stylesheet",
"Image",
"Media",
"Font",
"Script",
"TextTrack",
"XHR",
"Fetch",
"EventSource",
"WebSocket",
"Manifest",
"Other"
],
"description": "Resource type as it was perceived by the rendering engine."
},
{
"id": "FrameId",
"type": "string",
"description": "Unique frame identifier."
},
{
"id": "Frame",
"type": "object",
"description": "Information about the Frame on the page.",
"properties": [
{
"name": "id",
"type": "string",
"description": "Frame unique identifier."
},
{
"name": "parentId",
"type": "string",
"optional": true,
"description": "Parent frame identifier."
},
{
"name": "loaderId",
"$ref": "Network.LoaderId",
"description": "Identifier of the loader associated with this frame."
},
{
"name": "name",
"type": "string",
"optional": true,
"description": "Frame's name as specified in the tag."
},
{
"name": "url",
"type": "string",
"description": "Frame document's URL."
},
{
"name": "securityOrigin",
"type": "string",
"description": "Frame document's security origin."
},
{
"name": "mimeType",
"type": "string",
"description": "Frame document's mimeType as determined by the browser."
}
]
},
{
"id": "FrameResource",
"type": "object",
"description": "Information about the Resource on the page.",
"properties": [
{
"name": "url",
"type": "string",
"description": "Resource URL."
},
{
"name": "type",
"$ref": "ResourceType",
"description": "Type of this resource."
},
{
"name": "mimeType",
"type": "string",
"description": "Resource mimeType as determined by the browser."
},
{
"name": "lastModified",
"$ref": "Network.Timestamp",
"description": "last-modified timestamp as reported by server.",
"optional": true
},
{
"name": "contentSize",
"type": "number",
"description": "Resource content size.",
"optional": true
},
{
"name": "failed",
"type": "boolean",
"optional": true,
"description": "True if the resource failed to load."
},
{
"name": "canceled",
"type": "boolean",
"optional": true,
"description": "True if the resource was canceled during loading."
}
],
"experimental": true
},
{
"id": "FrameResourceTree",
"type": "object",
"description": "Information about the Frame hierarchy along with their cached resources.",
"properties": [
{
"name": "frame",
"$ref": "Frame",
"description": "Frame information for this tree item."
},
{
"name": "childFrames",
"type": "array",
"optional": true,
"items": {
"$ref": "FrameResourceTree"
},
"description": "Child frames."
},
{
"name": "resources",
"type": "array",
"items": {
"$ref": "FrameResource"
},
"description": "Information about frame resources."
}
],
"experimental": true
},
{
"id": "ScriptIdentifier",
"type": "string",
"description": "Unique script identifier.",
"experimental": true
},
{
"id": "NavigationEntry",
"type": "object",
"description": "Navigation history entry.",
"properties": [
{
"name": "id",
"type": "integer",
"description": "Unique id of the navigation history entry."
},
{
"name": "url",
"type": "string",
"description": "URL of the navigation history entry."
},
{
"name": "title",
"type": "string",
"description": "Title of the navigation history entry."
}
],
"experimental": true
},
{
"id": "ScreencastFrameMetadata",
"type": "object",
"description": "Screencast frame metadata.",
"properties": [
{
"name": "offsetTop",
"type": "number",
"experimental": true,
"description": "Top offset in DIP."
},
{
"name": "pageScaleFactor",
"type": "number",
"experimental": true,
"description": "Page scale factor."
},
{
"name": "deviceWidth",
"type": "number",
"experimental": true,
"description": "Device screen width in DIP."
},
{
"name": "deviceHeight",
"type": "number",
"experimental": true,
"description": "Device screen height in DIP."
},
{
"name": "scrollOffsetX",
"type": "number",
"experimental": true,
"description": "Position of horizontal scroll in CSS pixels."
},
{
"name": "scrollOffsetY",
"type": "number",
"experimental": true,
"description": "Position of vertical scroll in CSS pixels."
},
{
"name": "timestamp",
"type": "number",
"optional": true,
"experimental": true,
"description": "Frame swap timestamp."
}
],
"experimental": true
},
{
"id": "DialogType",
"description": "Javascript dialog type.",
"type": "string",
"enum": [
"alert",
"confirm",
"prompt",
"beforeunload"
],
"experimental": true
},
{
"id": "AppManifestError",
"description": "Error while paring app manifest.",
"type": "object",
"properties": [
{
"name": "message",
"type": "string",
"description": "Error message."
},
{
"name": "critical",
"type": "integer",
"description": "If criticial, this is a non-recoverable parse error."
},
{
"name": "line",
"type": "integer",
"description": "Error line."
},
{
"name": "column",
"type": "integer",
"description": "Error column."
}
],
"experimental": true
},
{
"id": "NavigationResponse",
"description": "Proceed: allow the navigation; Cancel: cancel the navigation; CancelAndIgnore: cancels the navigation and makes the requester of the navigation acts like the request was never made.",
"type": "string",
"enum": [
"Proceed",
"Cancel",
"CancelAndIgnore"
],
"experimental": true
},
{
"id": "LayoutViewport",
"type": "object",
"description": "Layout viewport position and dimensions.",
"experimental": true,
"properties": [
{
"name": "pageX",
"type": "integer",
"description": "Horizontal offset relative to the document (CSS pixels)."
},
{
"name": "pageY",
"type": "integer",
"description": "Vertical offset relative to the document (CSS pixels)."
},
{
"name": "clientWidth",
"type": "integer",
"description": "Width (CSS pixels), excludes scrollbar if present."
},
{
"name": "clientHeight",
"type": "integer",
"description": "Height (CSS pixels), excludes scrollbar if present."
}
]
},
{
"id": "VisualViewport",
"type": "object",
"description": "Visual viewport position, dimensions, and scale.",
"experimental": true,
"properties": [
{
"name": "offsetX",
"type": "number",
"description": "Horizontal offset relative to the layout viewport (CSS pixels)."
},
{
"name": "offsetY",
"type": "number",
"description": "Vertical offset relative to the layout viewport (CSS pixels)."
},
{
"name": "pageX",
"type": "number",
"description": "Horizontal offset relative to the document (CSS pixels)."
},
{
"name": "pageY",
"type": "number",
"description": "Vertical offset relative to the document (CSS pixels)."
},
{
"name": "clientWidth",
"type": "number",
"description": "Width (CSS pixels), excludes scrollbar if present."
},
{
"name": "clientHeight",
"type": "number",
"description": "Height (CSS pixels), excludes scrollbar if present."
},
{
"name": "scale",
"type": "number",
"description": "Scale relative to the ideal viewport (size at width=device-width)."
}
]
}
],
"commands": [
{
"name": "enable",
"description": "Enables page domain notifications."
},
{
"name": "disable",
"description": "Disables page domain notifications."
},
{
"name": "addScriptToEvaluateOnLoad",
"parameters": [
{
"name": "scriptSource",
"type": "string"
}
],
"returns": [
{
"name": "identifier",
"$ref": "ScriptIdentifier",
"description": "Identifier of the added script."
}
],
"experimental": true
},
{
"name": "removeScriptToEvaluateOnLoad",
"parameters": [
{
"name": "identifier",
"$ref": "ScriptIdentifier"
}
],
"experimental": true
},
{
"name": "setAutoAttachToCreatedPages",
"parameters": [
{
"name": "autoAttach",
"type": "boolean",
"description": "If true, browser will open a new inspector window for every page created from this one."
}
],
"description": "Controls whether browser will open a new inspector window for connected pages.",
"experimental": true
},
{
"name": "reload",
"parameters": [
{
"name": "ignoreCache",
"type": "boolean",
"optional": true,
"description": "If true, browser cache is ignored (as if the user pressed Shift+refresh)."
},
{
"name": "scriptToEvaluateOnLoad",
"type": "string",
"optional": true,
"description": "If set, the script will be injected into all frames of the inspected page after reload."
}
],
"description": "Reloads given page optionally ignoring the cache."
},
{
"name": "navigate",
"parameters": [
{
"name": "url",
"type": "string",
"description": "URL to navigate the page to."
}
],
"returns": [
{
"name": "frameId",
"$ref": "FrameId",
"experimental": true,
"description": "Frame id that will be navigated."
}
],
"description": "Navigates current page to the given URL."
},
{
"name": "stopLoading",
"description": "Force the page stop all navigations and pending resource fetches.",
"experimental": true
},
{
"name": "getNavigationHistory",
"returns": [
{
"name": "currentIndex",
"type": "integer",
"description": "Index of the current navigation history entry."
},
{
"name": "entries",
"type": "array",
"items": {
"$ref": "NavigationEntry"
},
"description": "Array of navigation history entries."
}
],
"description": "Returns navigation history for the current page.",
"experimental": true
},
{
"name": "navigateToHistoryEntry",
"parameters": [
{
"name": "entryId",
"type": "integer",
"description": "Unique id of the entry to navigate to."
}
],
"description": "Navigates current page to the given history entry.",
"experimental": true
},
{
"name": "getCookies",
"returns": [
{
"name": "cookies",
"type": "array",
"items": {
"$ref": "Network.Cookie"
},
"description": "Array of cookie objects."
}
],
"description": "Returns all browser cookies. Depending on the backend support, will return detailed cookie information in the <code>cookies</code> field.",
"experimental": true,
"redirect": "Network"
},
{
"name": "deleteCookie",
"parameters": [
{
"name": "cookieName",
"type": "string",
"description": "Name of the cookie to remove."
},
{
"name": "url",
"type": "string",
"description": "URL to match cooke domain and path."
}
],
"description": "Deletes browser cookie with given name, domain and path.",
"experimental": true,
"redirect": "Network"
},
{
"name": "getResourceTree",
"description": "Returns present frame / resource tree structure.",
"returns": [
{
"name": "frameTree",
"$ref": "FrameResourceTree",
"description": "Present frame / resource tree structure."
}
],
"experimental": true
},
{
"name": "getResourceContent",
"description": "Returns content of the given resource.",
"parameters": [
{
"name": "frameId",
"$ref": "FrameId",
"description": "Frame id to get resource for."
},
{
"name": "url",
"type": "string",
"description": "URL of the resource to get content for."
}
],
"returns": [
{
"name": "content",
"type": "string",
"description": "Resource content."
},
{
"name": "base64Encoded",
"type": "boolean",
"description": "True, if content was served as base64."
}
],
"experimental": true
},
{
"name": "searchInResource",
"description": "Searches for given string in resource content.",
"parameters": [
{
"name": "frameId",
"$ref": "FrameId",
"description": "Frame id for resource to search in."
},
{
"name": "url",
"type": "string",
"description": "URL of the resource to search in."
},
{
"name": "query",
"type": "string",
"description": "String to search for."
},
{
"name": "caseSensitive",
"type": "boolean",
"optional": true,
"description": "If true, search is case sensitive."
},
{
"name": "isRegex",
"type": "boolean",
"optional": true,
"description": "If true, treats string parameter as regex."
}
],
"returns": [
{
"name": "result",
"type": "array",
"items": {
"$ref": "Debugger.SearchMatch"
},
"description": "List of search matches."
}
],
"experimental": true
},
{
"name": "setDocumentContent",
"description": "Sets given markup as the document's HTML.",
"parameters": [
{
"name": "frameId",
"$ref": "FrameId",
"description": "Frame id to set HTML for."
},
{
"name": "html",
"type": "string",
"description": "HTML content to set."
}
],
"experimental": true
},
{
"name": "setDeviceMetricsOverride",
"description": "Overrides the values of device screen dimensions (window.screen.width, window.screen.height, window.innerWidth, window.innerHeight, and \"device-width\"/\"device-height\"-related CSS media query results).",
"parameters": [
{
"name": "width",
"type": "integer",
"description": "Overriding width value in pixels (minimum 0, maximum 10000000). 0 disables the override."
},
{
"name": "height",
"type": "integer",
"description": "Overriding height value in pixels (minimum 0, maximum 10000000). 0 disables the override."
},
{
"name": "deviceScaleFactor",
"type": "number",
"description": "Overriding device scale factor value. 0 disables the override."
},
{
"name": "mobile",
"type": "boolean",
"description": "Whether to emulate mobile device. This includes viewport meta tag, overlay scrollbars, text autosizing and more."
},
{
"name": "fitWindow",
"type": "boolean",
"description": "Whether a view that exceeds the available browser window area should be scaled down to fit."
},
{
"name": "scale",
"type": "number",
"optional": true,
"description": "Scale to apply to resulting view image. Ignored in |fitWindow| mode."
},
{
"name": "offsetX",
"type": "number",
"optional": true,
"description": "X offset to shift resulting view image by. Ignored in |fitWindow| mode."
},
{
"name": "offsetY",
"type": "number",
"optional": true,
"description": "Y offset to shift resulting view image by. Ignored in |fitWindow| mode."
},
{
"name": "screenWidth",
"type": "integer",
"optional": true,
"description": "Overriding screen width value in pixels (minimum 0, maximum 10000000). Only used for |mobile==true|."
},
{
"name": "screenHeight",
"type": "integer",
"optional": true,
"description": "Overriding screen height value in pixels (minimum 0, maximum 10000000). Only used for |mobile==true|."
},
{
"name": "positionX",
"type": "integer",
"optional": true,
"description": "Overriding view X position on screen in pixels (minimum 0, maximum 10000000). Only used for |mobile==true|."
},
{
"name": "positionY",
"type": "integer",
"optional": true,
"description": "Overriding view Y position on screen in pixels (minimum 0, maximum 10000000). Only used for |mobile==true|."
},
{
"name": "screenOrientation",
"$ref": "Emulation.ScreenOrientation",
"optional": true,
"description": "Screen orientation override."
}
],
"redirect": "Emulation",
"experimental": true
},
{
"name": "clearDeviceMetricsOverride",
"description": "Clears the overriden device metrics.",
"redirect": "Emulation",
"experimental": true
},
{
"name": "setGeolocationOverride",
"description": "Overrides the Geolocation Position or Error. Omitting any of the parameters emulates position unavailable.",
"parameters": [
{
"name": "latitude",
"type": "number",
"optional": true,
"description": "Mock latitude"
},
{
"name": "longitude",
"type": "number",
"optional": true,
"description": "Mock longitude"
},
{
"name": "accuracy",
"type": "number",
"optional": true,
"description": "Mock accuracy"
}
],
"redirect": "Emulation"
},
{
"name": "clearGeolocationOverride",
"description": "Clears the overriden Geolocation Position and Error.",
"redirect": "Emulation"
},
{
"name": "setDeviceOrientationOverride",
"description": "Overrides the Device Orientation.",
"parameters": [
{
"name": "alpha",
"type": "number",
"description": "Mock alpha"
},
{
"name": "beta",
"type": "number",
"description": "Mock beta"
},
{
"name": "gamma",
"type": "number",
"description": "Mock gamma"
}
],
"redirect": "DeviceOrientation",
"experimental": true
},
{
"name": "clearDeviceOrientationOverride",
"description": "Clears the overridden Device Orientation.",
"redirect": "DeviceOrientation",
"experimental": true
},
{
"name": "setTouchEmulationEnabled",
"parameters": [
{
"name": "enabled",
"type": "boolean",
"description": "Whether the touch event emulation should be enabled."
},
{
"name": "configuration",
"type": "string",
"enum": [
"mobile",
"desktop"
],
"optional": true,
"description": "Touch/gesture events configuration. Default: current platform."
}
],
"description": "Toggles mouse event-based touch event emulation.",
"experimental": true,
"redirect": "Emulation"
},
{
"name": "captureScreenshot",
"description": "Capture page screenshot.",
"returns": [
{
"name": "data",
"type": "string",
"description": "Base64-encoded image data (PNG)."
}
],
"experimental": true
},
{
"name": "startScreencast",
"description": "Starts sending each frame using the <code>screencastFrame</code> event.",
"parameters": [
{
"name": "format",
"type": "string",
"optional": true,
"enum": [
"jpeg",
"png"
],
"description": "Image compression format."
},
{
"name": "quality",
"type": "integer",
"optional": true,
"description": "Compression quality from range [0..100]."
},
{
"name": "maxWidth",
"type": "integer",
"optional": true,
"description": "Maximum screenshot width."
},
{
"name": "maxHeight",
"type": "integer",
"optional": true,
"description": "Maximum screenshot height."
},
{
"name": "everyNthFrame",
"type": "integer",
"optional": true,
"description": "Send every n-th frame."
}
],
"experimental": true
},
{
"name": "stopScreencast",
"description": "Stops sending each frame in the <code>screencastFrame</code>.",
"experimental": true
},
{
"name": "screencastFrameAck",
"description": "Acknowledges that a screencast frame has been received by the frontend.",
"parameters": [
{
"name": "sessionId",
"type": "integer",
"description": "Frame number."
}
],
"experimental": true
},
{
"name": "handleJavaScriptDialog",
"description": "Accepts or dismisses a JavaScript initiated dialog (alert, confirm, prompt, or onbeforeunload).",
"parameters": [
{
"name": "accept",
"type": "boolean",
"description": "Whether to accept or dismiss the dialog."
},
{
"name": "promptText",
"type": "string",
"optional": true,
"description": "The text to enter into the dialog prompt before accepting. Used only if this is a prompt dialog."
}
]
},
{
"name": "setColorPickerEnabled",
"parameters": [
{
"name": "enabled",
"type": "boolean",
"description": "Shows / hides color picker"
}
],
"description": "Shows / hides color picker",
"experimental": true
},
{
"name": "configureOverlay",
"parameters": [
{
"name": "suspended",
"type": "boolean",
"optional": true,
"description": "Whether overlay should be suspended and not consume any resources."
},
{
"name": "message",
"type": "string",
"optional": true,
"description": "Overlay message to display."
}
],
"experimental": true,
"description": "Configures overlay."
},
{
"name": "getAppManifest",
"experimental": true,
"returns": [