From 8e1fa0ffeeab48c7f89c16d205d747331dd14d3a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20Wang?= Date: Fri, 15 Nov 2024 13:33:03 +0100 Subject: [PATCH] Put trusted type first when declaring union in IDL files This is for consistency with how it is done in the HTML specification and in the PR to DOM (https://github.com/whatwg/dom/pull/1268). This is not web-exposed but may matter for implementations. For example, they may generate different C++ structure to represent `(TrustedHTML or DOMString)` and `(DOMString or TrustedHTML)`. --- spec/index.bs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/spec/index.bs b/spec/index.bs index de44c95..b103582 100644 --- a/spec/index.bs +++ b/spec/index.bs @@ -1146,10 +1146,10 @@ Note: Using these IDL attributes is the recommended way of dynamically setting t
 partial interface HTMLScriptElement {
- [CEReactions] attribute ([LegacyNullToEmptyString] DOMString or TrustedScript) innerText;
- [CEReactions] attribute (DOMString or TrustedScript)? textContent;
- [CEReactions] attribute (USVString or TrustedScriptURL) src;
- [CEReactions] attribute (DOMString or TrustedScript) text;
+ [CEReactions] attribute (TrustedScript or [LegacyNullToEmptyString] DOMString) innerText;
+ [CEReactions] attribute (TrustedScript or DOMString)? textContent;
+ [CEReactions] attribute (TrustedScriptURL or USVString) src;
+ [CEReactions] attribute (TrustedScript or DOMString) text;
 };