-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Expand file tree
/
Copy pathWorker.json
More file actions
53 lines (53 loc) · 1.84 KB
/
Worker.json
File metadata and controls
53 lines (53 loc) · 1.84 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
{
"domain": "Worker",
"debuggableTypes": ["web-page"],
"targetTypes": ["page", "worker"],
"commands": [
{
"name": "enable",
"description": "Enable Worker domain events."
},
{
"name": "disable",
"description": "Disable Worker domain events."
},
{
"name": "initialized",
"description": "Sent after the frontend has sent all initialization messages and can resume this worker. This command is required to allow execution in the worker.",
"parameters": [
{ "name": "workerId", "type": "string" }
]
},
{
"name": "sendMessageToWorker",
"description": "Send an Inspector Protocol message to be dispatched to a Worker's agents.",
"parameters": [
{ "name": "workerId", "type": "string" },
{ "name": "message", "type": "string", "description": "JSON Inspector Protocol message (command) to be dispatched on the backend." }
]
}
],
"events": [
{
"name": "workerCreated",
"parameters": [
{ "name": "workerId", "type": "string" },
{ "name": "url", "type": "string" },
{ "name": "name", "type": "string" }
]
},
{
"name": "workerTerminated",
"parameters": [
{ "name": "workerId", "type": "string" }
]
},
{
"name": "dispatchMessageFromWorker",
"parameters": [
{ "name": "workerId", "type": "string" },
{ "name": "message", "type": "string", "description": "JSON Inspector Protocol message (response or event) to be dispatched on the frontend." }
]
}
]
}