diff --git a/source b/source index ca1389014e0..808dcf6db88 100644 --- a/source +++ b/source @@ -26062,6 +26062,19 @@ document.body.appendChild(wbr);

An element implementing the HTMLHyperlinkElementUtils mixin has an associated url (null or a URL). It is initially null. +

+

An element implementing the HTMLHyperlinkElementUtils mixin has the following + extract an origin steps:

+ +
    +
  1. If this's url is null, then + return null.

  2. + +
  3. Return this's url's + origin.

  4. +
+
+

An element implementing the HTMLHyperlinkElementUtils mixin has an associated set the url algorithm, which runs these steps:

@@ -92415,6 +92428,103 @@ dictionary DragEventInit : MouseEventInit {
+
The Origin interface
+ +

The Origin interface represents an + origin, allowing robust same origin and same site + comparisons.

+ +
[Exposed=*]
+interface Origin {
+  constructor();
+
+  static Origin from(any value);
+
+  readonly attribute boolean opaque;
+
+  boolean isSameOrigin(Origin other);
+  boolean isSameSite(Origin other);
+};
+ +

Origin objects have an associated + origin, which holds an + origin.

+ +

Platform objects have an + extract an origin operation, which returns null unless + otherwise specified.

+ +
+

Objects implementing the Origin interface's + extract an origin steps are to return this's + origin.

+
+ +
+

The new Origin() constructor steps are:

+ +
    +
  1. Set this's origin to a unique + opaque origin.

  2. +
+
+ +
+

The static from(value) method steps are:

+ +
    +
  1. +

    If value is a platform object:

    +
      +
    1. Let origin be the result of executing value's extract an + origin operation.

    2. + +
    3. If origin is not null, then return a new + Origin object whose + origin is set to origin.

    4. +
    +
  2. + +
  3. +

    If value is a string:

    +
      +
    1. Let parsed url be the result of basic URL + parsing value.

    2. + +
    3. If parsed url is not failure, then return a new + Origin object whose + origin is set to parsed url's + origin.

    4. +
    +
  4. + +
  5. Throw a TypeError.

  6. +
+
+ +
+

The opaque attribute + getter steps are to return true if this's + origin is an opaque + origin; otherwise false.

+
+ +
+

The isSameOrigin(other) method returns true if + this's origin is same origin + with other's origin; otherwise false.

+
+ +
+

The isSameSite(other) method returns true if + this's origin is same site with + other's origin; otherwise false.

+
+

Origin-keyed agent clusters

@@ -123029,6 +123139,24 @@ document.body.appendChild(frame) capability.

+
+

An element implementing the WindowOrWorkerGlobalScope mixin has the following + extract an origin steps:

+ +
    +
  1. If this's relevant settings object's origin is not same origin-domain + with the entry settings object's origin, then return null.

  2. + +
  3. Return this's return this's relevant settings + object's origin.

  4. +
+ +

Since these objects are potentially accessible cross-origin (e.g., through + WindowProxy), we need a security check here before granting access to the origin.

+
+ @@ -127539,6 +127667,12 @@ typedef (WindowProxy or MessagePort or ServiceWo fragment).

+
+

Objects implementing the MessageEvent interface's extract an origin + steps are to return this's relevant settings object's + origin.

+
+

The lastEventId attribute must return the value it @@ -131655,6 +131789,7 @@ interface WorkerLocation {

+

A WorkerLocation object has an associated WorkerGlobalScope object (a WorkerGlobalScope object).