Skip to content

Commit 28ba312

Browse files
Add Trusted Types subfeatures to various APIs (#27836)
* SVGAnimatedString.baseVal - TT support * WorkerGlobalScope.importScripts() - TrustedScriptURL * ServiceWorkerContainer.register() - TrustedScriptURL * CSP:trusted-types in FF138 * CSP require-trusted-types-for * Update api/WorkerGlobalScope.json Co-authored-by: Claas Augner <[email protected]> * Update api/ServiceWorkerContainer.json --------- Co-authored-by: Claas Augner <[email protected]>
1 parent 171abf9 commit 28ba312

File tree

4 files changed

+133
-4
lines changed

4 files changed

+133
-4
lines changed

api/SVGAnimatedString.json

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -141,6 +141,44 @@
141141
"standard_track": true,
142142
"deprecated": false
143143
}
144+
},
145+
"enforces_trusted_types": {
146+
"__compat": {
147+
"description": "Requires `TrustedScriptURL` instance when trusted types are enforced",
148+
"support": {
149+
"chrome": {
150+
"version_added": "141"
151+
},
152+
"chrome_android": "mirror",
153+
"edge": "mirror",
154+
"firefox": {
155+
"version_added": "136",
156+
"flags": [
157+
{
158+
"type": "preference",
159+
"name": "dom.security.trusted_types.enabled",
160+
"value_to_set": "true"
161+
}
162+
]
163+
},
164+
"firefox_android": "mirror",
165+
"oculus": "mirror",
166+
"opera": "mirror",
167+
"opera_android": "mirror",
168+
"safari": {
169+
"version_added": false
170+
},
171+
"safari_ios": "mirror",
172+
"samsunginternet_android": "mirror",
173+
"webview_android": "mirror",
174+
"webview_ios": "mirror"
175+
},
176+
"status": {
177+
"experimental": true,
178+
"standard_track": true,
179+
"deprecated": false
180+
}
181+
}
144182
}
145183
}
146184
}

api/ServiceWorkerContainer.json

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -410,6 +410,46 @@
410410
"standard_track": true,
411411
"deprecated": false
412412
}
413+
},
414+
"enforces_trusted_types": {
415+
"__compat": {
416+
"description": "`scriptURL` parameter requires `TrustedScriptURL` instance when trusted types are enforced",
417+
"support": {
418+
"chrome": {
419+
"version_added": "140"
420+
},
421+
"chrome_android": "mirror",
422+
"edge": "mirror",
423+
"firefox": {
424+
"version_added": "136",
425+
"flags": [
426+
{
427+
"type": "preference",
428+
"name": "dom.security.trusted_types.enabled",
429+
"value_to_set": "true"
430+
}
431+
]
432+
},
433+
"firefox_android": "mirror",
434+
"oculus": "mirror",
435+
"opera": "mirror",
436+
"opera_android": "mirror",
437+
"safari": {
438+
"version_added": "26"
439+
},
440+
"safari_ios": "mirror",
441+
"samsunginternet_android": "mirror",
442+
"webview_android": "mirror",
443+
"webview_ios": {
444+
"version_added": false
445+
}
446+
},
447+
"status": {
448+
"experimental": false,
449+
"standard_track": true,
450+
"deprecated": false
451+
}
452+
}
413453
}
414454
},
415455
"startMessages": {

api/WorkerGlobalScope.json

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -215,6 +215,45 @@
215215
"deprecated": false
216216
}
217217
},
218+
"enforces_trusted_types": {
219+
"__compat": {
220+
"description": "`urls` parameter requires `TrustedScriptURL` instances when trusted types are enforced",
221+
"spec_url": "https://html.spec.whatwg.org/multipage/workers.html#the-workerglobalscope-common-interface:dom-workerglobalscope-importscripts",
222+
"support": {
223+
"chrome": {
224+
"version_added": "138"
225+
},
226+
"chrome_android": "mirror",
227+
"edge": "mirror",
228+
"firefox": {
229+
"version_added": "136",
230+
"flags": [
231+
{
232+
"type": "preference",
233+
"name": "dom.security.trusted_types.enabled",
234+
"value_to_set": "true"
235+
}
236+
]
237+
},
238+
"firefox_android": "mirror",
239+
"oculus": "mirror",
240+
"opera": "mirror",
241+
"opera_android": "mirror",
242+
"safari": {
243+
"version_added": "26"
244+
},
245+
"safari_ios": "mirror",
246+
"samsunginternet_android": "mirror",
247+
"webview_android": "mirror",
248+
"webview_ios": "mirror"
249+
},
250+
"status": {
251+
"experimental": false,
252+
"standard_track": true,
253+
"deprecated": false
254+
}
255+
}
256+
},
218257
"mime_checks": {
219258
"__compat": {
220259
"description": "Strict MIME type checks for `importScripts()`",

http/headers/Content-Security-Policy.json

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -860,8 +860,14 @@
860860
"chrome_android": "mirror",
861861
"edge": "mirror",
862862
"firefox": {
863-
"version_added": false,
864-
"impl_url": "https://bugzil.la/1508286"
863+
"version_added": "135",
864+
"flags": [
865+
{
866+
"type": "preference",
867+
"name": "dom.security.trusted_types.enabled",
868+
"value_to_set": "true"
869+
}
870+
]
865871
},
866872
"firefox_android": "mirror",
867873
"oculus": "mirror",
@@ -1328,8 +1334,14 @@
13281334
"chrome_android": "mirror",
13291335
"edge": "mirror",
13301336
"firefox": {
1331-
"version_added": false,
1332-
"impl_url": "https://bugzil.la/1508286"
1337+
"version_added": "138",
1338+
"flags": [
1339+
{
1340+
"type": "preference",
1341+
"name": "dom.security.trusted_types.enabled",
1342+
"value_to_set": "true"
1343+
}
1344+
]
13331345
},
13341346
"firefox_android": "mirror",
13351347
"oculus": "mirror",

0 commit comments

Comments
 (0)