From 9e6bf1184cdc68ed795d5b0a635d847c8cdbbc15 Mon Sep 17 00:00:00 2001
From: Domenic Denicola
An environment environment is a secure context if the + following algorithm returns true:
+ +If environment is an environment settings object, and its global object is a
+ WorkerGlobalScope
, then:
For each owner in environment's + global object's owner set, if + owner's relevant settings object is a non-secure context, + then return false.
Return true.
If environment is environment is an environment settings
+ object, and its global object is a
+ WorkletGlobalScope
, then return true if environment's global object's owner document's relevant settings
+ object is a secure context; otherwise, return false.
If the result of Is url potentially trustworthy? given
+ environment's top-level creation URL is "Potentially
+ Trustworthy
", then return true.
Return false.
An environment is a non-secure context if it is not a + secure context.
+An environment settings object is an environment that additionally specifies algorithms for:
@@ -91299,6 +91336,7 @@ interface mixin DocumentAndElementEventHandlers { interface mixin WindowOrWorkerGlobalScope { [Replaceable] readonly attribute USVString origin; + readonly attribute boolean isSecureContext; // base64 utility methods DOMString btoa(DOMString data); @@ -91321,7 +91359,12 @@ interface mixin WindowOrWorkerGlobalScope { WorkerGlobalScope includes WindowOrWorkerGlobalScope;origin
isSecureContext
Returns whether or not this global object represents a secure context.
origin
Returns the global object's origin, serialized as string.
self.origin
is a more reliable security indicator.
The The The Assign outside port to the Let callerIsSecureContext be the result of executing Is environment
- settings object a secure context? on outside settings. Let callerIsSecureContext be true if outside settings is a
+ secure context; otherwise, false. Enqueue the following steps to the shared worker manager: Let settings object be the relevant settings object for
worker global scope. Let workerIsSecureContext be the result of executing Is environment
- settings object a secure context? on settings object. Let workerIsSecureContext be true if settings object is a
+ secure context; otherwise, false. If workerIsSecureContext is not callerIsSecureContext, then
queue a task to fire an event named
@@ -106069,9 +106120,9 @@ document.body.appendChild(text);
this element in the stack of open elements. If the origin
attribute's getter must return this
- object's relevant settings object's
+
+ isSecureContext
getter steps are to
+ return true if this's relevant settings object is a secure
+ context, or false otherwise.origin
getter steps are to return
+ this's relevant settings object's origin, serialized.Base64 utility methods
@@ -98786,8 +98837,8 @@ interface SharedWorker : EventTarget {
port
attribute of worker.Document
is being loaded as part of navigation of a browsing context and the result of
- executing Is environment settings object a secure context? on the
- Document
's relevant settings object is true, then:Document
's relevant settings object is a secure context,
+ then:
If the result of running match service worker