forked from WebKit/WebKit
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathPage.json
More file actions
390 lines (390 loc) · 19.7 KB
/
Page.json
File metadata and controls
390 lines (390 loc) · 19.7 KB
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
{
"domain": "Page",
"description": "Actions and events related to the inspected page belong to the page domain.",
"debuggableTypes": ["itml", "page", "web-page"],
"targetTypes": ["itml", "page"],
"types": [
{
"id": "Setting",
"type": "string",
"description": "List of settings able to be overridden by WebInspector.",
"enum": [
"PrivateClickMeasurementDebugModeEnabled",
"AuthorAndUserStylesEnabled",
"ICECandidateFilteringEnabled",
"ITPDebugModeEnabled",
"ImagesEnabled",
"MediaCaptureRequiresSecureConnection",
"MockCaptureDevicesEnabled",
"NeedsSiteSpecificQuirks",
"ScriptEnabled",
"ShowDebugBorders",
"ShowRepaintCounter",
"WebRTCEncryptionEnabled",
"WebSecurityEnabled"
]
},
{
"id": "ResourceType",
"type": "string",
"enum": ["Document", "StyleSheet", "Image", "Font", "Script", "XHR", "Fetch", "Ping", "Beacon", "WebSocket", "EventSource", "Other"],
"description": "Resource type as it was perceived by the rendering engine."
},
{
"id": "CoordinateSystem",
"type": "string",
"enum": ["Viewport", "Page"],
"description": "Coordinate system used by supplied coordinates."
},
{
"id": "CookieSameSitePolicy",
"type": "string",
"enum": ["None", "Lax", "Strict"],
"description": "Same-Site policy of a cookie."
},
{
"id": "Appearance",
"type": "string",
"condition": "(defined(ENABLE_DARK_MODE_CSS) && ENABLE_DARK_MODE_CSS) || (defined(HAVE_OS_DARK_MODE_SUPPORT) && HAVE_OS_DARK_MODE_SUPPORT)",
"enum": ["Light", "Dark"],
"description": "Page appearance name."
},
{
"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",
"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": "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." },
{ "name": "sourceMapURL", "type": "string", "optional": true, "description": "URL of source map associated with this resource (if any)." },
{ "name": "targetId", "type": "string", "optional": true, "description": "Identifier for the context of where the load originated. In general this is the target identifier. For Workers this will be the workerId." }
]
},
{
"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." }
]
},
{
"id": "SearchResult",
"type": "object",
"description": "Search result for resource.",
"properties": [
{ "name": "url", "type": "string", "description": "Resource URL." },
{ "name": "frameId", "$ref": "Network.FrameId", "description": "Resource frame id." },
{ "name": "matchesCount", "type": "number", "description": "Number of matches in the resource content." },
{ "name": "requestId", "$ref": "Network.RequestId", "optional": true, "description": "Network request id." }
]
},
{
"id": "Cookie",
"type": "object",
"description": "Cookie object",
"properties": [
{ "name": "name", "type": "string", "description": "Cookie name." },
{ "name": "value", "type": "string", "description": "Cookie value." },
{ "name": "domain", "type": "string", "description": "Cookie domain." },
{ "name": "path", "type": "string", "description": "Cookie path." },
{ "name": "expires", "type": "number", "description": "Cookie expires." },
{ "name": "session", "type": "boolean", "description": "True in case of session cookie." },
{ "name": "httpOnly", "type": "boolean", "description": "True if cookie is http-only." },
{ "name": "secure", "type": "boolean", "description": "True if cookie is secure." },
{ "name": "sameSite", "$ref": "CookieSameSitePolicy", "description": "Cookie Same-Site policy." }
]
}
],
"commands": [
{
"name": "enable",
"description": "Enables page domain notifications."
},
{
"name": "disable",
"description": "Disables page domain notifications."
},
{
"name": "reload",
"description": "Reloads the main frame of the inspected page.",
"parameters": [
{ "name": "ignoreCache", "type": "boolean", "optional": true, "description": "If true, the page is reloaded from its origin without using cached resources." },
{ "name": "revalidateAllResources", "type": "boolean", "optional": true, "description": "If true, all cached subresources will be revalidated when the main resource loads. Otherwise, only expired cached subresources will be revalidated (the default behavior for most WebKit clients)." }
]
},
{
"name": "navigate",
"description": "Navigates current page to the given URL.",
"targetTypes": ["page"],
"parameters": [
{ "name": "url", "type": "string", "description": "URL to navigate the page to." }
]
},
{
"name": "overrideUserAgent",
"description": "Override's the user agent of the inspected page",
"targetTypes": ["page"],
"parameters": [
{ "name": "value", "type": "string", "optional": true, "description": "Value to override the user agent with. If this value is not provided, the override is removed. Overrides are removed when Web Inspector closes/disconnects." }
]
},
{
"name": "overrideSetting",
"description": "Allows the frontend to override the inspected page's settings.",
"targetTypes": ["page"],
"parameters": [
{ "name": "setting", "$ref": "Setting" },
{ "name": "value", "type": "boolean", "optional": true, "description": "Value to override the setting with. If this value is not provided, the override is removed. Overrides are removed when Web Inspector closes/disconnects." }
]
},
{
"name": "getCookies",
"description": "Returns all browser cookies. Depending on the backend support, will return detailed cookie information in the <code>cookies</code> field.",
"targetTypes": ["page"],
"returns": [
{ "name": "cookies", "type": "array", "items": { "$ref": "Cookie"}, "description": "Array of cookie objects." }
]
},
{
"name": "setCookie",
"description": "Sets a new browser cookie with the given name, domain, and path.",
"targetTypes": ["page"],
"parameters": [
{ "name": "cookie", "$ref": "Cookie" }
]
},
{
"name": "deleteCookie",
"description": "Deletes browser cookie with given name, domain, and path.",
"targetTypes": ["page"],
"parameters": [
{ "name": "cookieName", "type": "string", "description": "Name of the cookie to remove." },
{ "name": "url", "type": "string", "description": "URL to match cookie domain and path." }
]
},
{
"name": "getResourceTree",
"description": "Returns present frame / resource tree structure.",
"returns": [
{ "name": "frameTree", "$ref": "FrameResourceTree", "description": "Present frame / resource tree structure." }
]
},
{
"name": "getResourceContent",
"description": "Returns content of the given resource.",
"parameters": [
{ "name": "frameId", "$ref": "Network.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." }
]
},
{
"name": "setBootstrapScript",
"targetTypes": ["page"],
"parameters": [
{ "name": "source", "type": "string", "optional": true, "description": "If `source` is provided (and not empty), it will be injected into all future global objects as soon as they're created. Omitting `source` will stop this from happening." }
]
},
{
"name": "searchInResource",
"description": "Searches for given string in resource content.",
"targetTypes": ["page"],
"parameters": [
{ "name": "frameId", "$ref": "Network.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." },
{ "name": "requestId", "$ref": "Network.RequestId", "optional": true, "description": "Request id for resource to search in." }
],
"returns": [
{ "name": "result", "type": "array", "items": { "$ref": "GenericTypes.SearchMatch" }, "description": "List of search matches." }
]
},
{
"name": "searchInResources",
"description": "Searches for given string in frame / resource tree structure.",
"targetTypes": ["page"],
"parameters": [
{ "name": "text", "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": "SearchResult" }, "description": "List of search results." }
]
},
{
"name": "setShowRulers",
"description": "Requests that backend draw rulers in the inspector overlay",
"condition": "!(defined(WTF_PLATFORM_IOS_FAMILY) && WTF_PLATFORM_IOS_FAMILY)",
"targetTypes": ["page"],
"parameters": [
{ "name": "result", "type": "boolean", "description": "True for showing rulers" }
]
},
{
"name": "setShowPaintRects",
"description": "Requests that backend shows paint rectangles",
"targetTypes": ["page"],
"parameters": [
{ "name": "result", "type": "boolean", "description": "True for showing paint rectangles" }
]
},
{
"name": "setEmulatedMedia",
"description": "Emulates the given media for CSS media queries.",
"targetTypes": ["page"],
"parameters": [
{ "name": "media", "type": "string", "description": "Media type to emulate. Empty string disables the override." }
]
},
{
"name": "setForcedAppearance",
"description": "Forces the given appearance for the page.",
"condition": "(defined(ENABLE_DARK_MODE_CSS) && ENABLE_DARK_MODE_CSS) || (defined(HAVE_OS_DARK_MODE_SUPPORT) && HAVE_OS_DARK_MODE_SUPPORT)",
"targetTypes": ["page"],
"parameters": [
{ "name": "appearance", "$ref": "Appearance", "optional": true }
]
},
{
"name": "snapshotNode",
"description": "Capture a snapshot of the specified node that does not include unrelated layers.",
"targetTypes": ["page"],
"parameters": [
{ "name": "nodeId", "$ref": "DOM.NodeId", "description": "Id of the node to snapshot." }
],
"returns": [
{ "name": "dataURL", "type": "string", "description": "Base64-encoded image data (PNG)." }
]
},
{
"name": "snapshotRect",
"description": "Capture a snapshot of the page within the specified rectangle and coordinate system.",
"targetTypes": ["page"],
"parameters": [
{ "name": "x", "type": "integer", "description": "X coordinate" },
{ "name": "y", "type": "integer", "description": "Y coordinate" },
{ "name": "width", "type": "integer", "description": "Rectangle width" },
{ "name": "height", "type": "integer", "description": "Rectangle height" },
{ "name": "coordinateSystem", "$ref": "CoordinateSystem", "description": "Indicates the coordinate system of the supplied rectangle." }
],
"returns": [
{ "name": "dataURL", "type": "string", "description": "Base64-encoded image data (PNG)." }
]
},
{
"name": "archive",
"description": "Grab an archive of the page.",
"condition": "(defined(ENABLE_WEB_ARCHIVE) && ENABLE_WEB_ARCHIVE) && (defined(USE_CF) && USE_CF)",
"targetTypes": ["page"],
"returns": [
{ "name": "data", "type": "string", "description": "Base64-encoded web archive." }
]
},
{
"name": "setScreenSizeOverride",
"description": "Overrides screen size exposed to DOM and used in media queries for testing with provided values.",
"condition": "!(defined(WTF_PLATFORM_COCOA) && WTF_PLATFORM_COCOA)",
"targetTypes": ["page"],
"parameters": [
{ "name": "width", "type": "integer", "description": "Screen width", "optional": true },
{ "name": "height", "type": "integer", "description": "Screen height", "optional": true }
]
}
],
"events": [
{
"name": "domContentEventFired",
"targetTypes": ["page"],
"parameters": [
{ "name": "timestamp", "type": "number" }
]
},
{
"name": "loadEventFired",
"targetTypes": ["page"],
"parameters": [
{ "name": "timestamp", "type": "number" }
]
},
{
"name": "frameNavigated",
"description": "Fired once navigation of the frame has completed. Frame is now associated with the new loader.",
"parameters": [
{ "name": "frame", "$ref": "Frame", "description": "Frame object." }
]
},
{
"name": "frameDetached",
"description": "Fired when frame has been detached from its parent.",
"targetTypes": ["page"],
"parameters": [
{ "name": "frameId", "$ref": "Network.FrameId", "description": "Id of the frame that has been detached." }
]
},
{
"name": "frameStartedLoading",
"description": "Fired when frame has started loading.",
"parameters": [
{ "name": "frameId", "$ref": "Network.FrameId", "description": "Id of the frame that has started loading." }
]
},
{
"name": "frameStoppedLoading",
"description": "Fired when frame has stopped loading.",
"parameters": [
{ "name": "frameId", "$ref": "Network.FrameId", "description": "Id of the frame that has stopped loading." }
]
},
{
"name": "frameScheduledNavigation",
"description": "Fired when frame schedules a potential navigation.",
"targetTypes": ["page"],
"parameters": [
{ "name": "frameId", "$ref": "Network.FrameId", "description": "Id of the frame that has scheduled a navigation." },
{ "name": "delay", "type": "number", "description": "Delay (in seconds) until the navigation is scheduled to begin. The navigation is not guaranteed to start." }
]
},
{
"name": "frameClearedScheduledNavigation",
"description": "Fired when frame no longer has a scheduled navigation.",
"targetTypes": ["page"],
"parameters": [
{ "name": "frameId", "$ref": "Network.FrameId", "description": "Id of the frame that has cleared its scheduled navigation." }
]
},
{
"name": "defaultAppearanceDidChange",
"description": "Fired when page's default appearance changes, even if there is a forced appearance.",
"condition": "(defined(ENABLE_DARK_MODE_CSS) && ENABLE_DARK_MODE_CSS) || (defined(HAVE_OS_DARK_MODE_SUPPORT) && HAVE_OS_DARK_MODE_SUPPORT)",
"targetTypes": ["page"],
"parameters": [
{ "name": "appearance", "$ref": "Appearance", "description": "Name of the appearance that is active (not considering any forced appearance.)" }
]
}
]
}