@@ -140,15 +140,25 @@ Relevant methods and types:
140
140
141
141
+ /**
142
142
+ * If specified, specifies a specific user script world ID to execute in.
143
- + * Only valid if `world` is omitted or is `USER_SCRIPT`. If omitted, the
144
- + * script will execute in the default user script world.
143
+ + * Only valid if `world` is omitted or is `USER_SCRIPT`. If `worldId` is
144
+ + * omitted, the script will execute in the default user script world.
145
145
+ * Values with leading underscores (`_`) are reserved.
146
146
+ */
147
147
+ worldId?: string;
148
148
}
149
149
150
150
...
151
151
152
+ export function configureWorld(config: WorldProperties): Promise<void>;
153
+
154
+ export function getScripts(filter?: UserScriptFilter[]): Promise<RegisteredUserScript[]>;
155
+
156
+ export function register(scripts: RegisteredUserScript): Promise<void>;
157
+
158
+ export function unregister(filter?: UserScriptFilter[]): Promise<void>;
159
+
160
+ export function update(scripts: RegisteredUserScript[]): Promise<void>;
161
+
152
162
+ /**
153
163
+ * Resets the configuration for a given world. Any scripts that inject into
154
164
+ * the world with the specified ID will use the default world configuration.
@@ -165,8 +175,9 @@ Relevant methods and types:
165
175
}
166
176
```
167
177
168
- Note that the signatures of the related functions, including ` configureWorld() ` ,
169
- ` register() ` , and others are left unchanged.
178
+ Note that save for the introduction of ` worldId ` on these interfaces,
179
+ the signatures of the related functions - ` configureWorld() ` ,
180
+ ` register() ` , and others – are left unchanged.
170
181
171
182
When the developer specifies a ` RegisteredUserScript ` , the browser will use a
172
183
separate user script world when injecting the scripts into a document. If
0 commit comments