diff --git a/docs/index.bs b/docs/index.bs index ed870d4f..2c96e580 100644 --- a/docs/index.bs +++ b/docs/index.bs @@ -713,7 +713,7 @@ spec: storage; urlPrefix: https://storage.spec.whatwg.org/ readonly attribute ServiceWorker? controller; readonly attribute Promise<ServiceWorkerRegistration> ready; - [NewObject] Promise<ServiceWorkerRegistration> register(USVString scriptURL, optional RegistrationOptions options = {}); + [NewObject] Promise<ServiceWorkerRegistration> register((TrustedScriptURL or USVString) scriptURL, optional RegistrationOptions options = {}); [NewObject] Promise<(ServiceWorkerRegistration or undefined)> getRegistration(optional USVString clientURL = ""); [NewObject] Promise<FrozenArray<ServiceWorkerRegistration>> getRegistrations(); @@ -782,6 +782,7 @@ spec: storage; urlPrefix: https://storage.spec.whatwg.org/ The register(|scriptURL|, |options|) method steps are: 1. Let |p| be a promise. + 1. Set |scriptURL| to the result of invoking [$Get Trusted Type compliant string$] with {{TrustedScriptURL}}, [=this=]'s [=relevant global object=], |scriptURL|, "ServiceWorkerContainer register", and "script". 1. Let |client| be [=this=]'s [=ServiceWorkerContainer/service worker client=]. 1. Let |scriptURL| be the result of parsing |scriptURL| with [=this=]'s relevant settings object's API base URL. 1. Let |scopeURL| be null.