Skip to content

Commit

Permalink
no need for same origin checks
Browse files Browse the repository at this point in the history
  • Loading branch information
annevk committed Jul 17, 2024
1 parent ea7ab70 commit 8929098
Showing 1 changed file with 11 additions and 37 deletions.
48 changes: 11 additions & 37 deletions notifications.bs
Original file line number Diff line number Diff line change
Expand Up @@ -217,23 +217,10 @@ string <var>title</var>, {{NotificationOptions}} <a for=/>dictionary</a> <var>op
<li><p>Set <var>notification</var>'s <a for=notification>body</a> to
<var>options</var>["{{NotificationOptions/body}}"].

<li>
<p>If <var>options</var>["{{NotificationOptions/url}}"] <a for=map>exists</a>:

<ol>
<li><p>Let <var>url</var> be the result of <a lt="URL parser">parsing</a>
<var>options</var>["{{NotificationOptions/url}}"] using <var>baseURL</var>.

<li>
<p>If <var>url</var> is not failure:

<ol>
<li><p>If <var>url</var>'s <a for=url>origin</a> is not <a>same origin</a> with
<var>notification</var>'s <a for=notification>origin</a>, then <a>throw</a> a {{TypeError}}.

<li><p>Set <var>notification</var>'s <a for=notification>URL</a> to <var>url</var>.
</ol>
</ol>
<li><p>If <var>options</var>["{{NotificationOptions/url}}"] <a for=map>exists</a>, then
<a lt="URL parser">parse</a> it using <var>baseURL</var>, and if that does not return failure, set
<var>notification</var>'s <a for=notification>URL</a> to the return value. (Otherwise
<var>notification</var>'s <a for=notification>URL</a> remains null.)

<li><p>Set <var>notification</var>'s <a for=notification>tag</a> to
<var>options</var>["{{NotificationOptions/tag}}"].
Expand Down Expand Up @@ -290,28 +277,15 @@ string <var>title</var>, {{NotificationOptions}} <a for=/>dictionary</a> <var>op
<li><p>Set <var>action</var>'s <a for=action>title</a> to
<var>entry</var>["{{NotificationAction/title}}"].

<li>
<p>If <var>entry</var>["{{NotificationAction/url}}"] <a for=map>exists</a>,

<ol>
<li><p>Let <var>url</var> be the result of <a lt="URL parser">parsing</a>
<var>entry</var>["{{NotificationAction/url}}"] using <var>baseURL</var>.

<li>
<p>If <var>url</var> is not failure:

<ol>
<li><p>If <var>url</var>'s <a for=url>origin</a> is not <a>same origin</a> with
<var>notification</var>'s <a for=notification>origin</a>, then <a>throw</a> a {{TypeError}}.

<li><p>Set <var>action</var>'s <a for=action>URL</a> to <var>url</var>.
</ol>
</ol>
<li><p>If <var>entry</var>["{{NotificationAction/url}}"] <a for=map>exists</a>, then
<a lt="URL parser">parse</a> it using <var>baseURL</var>, and if that does not return failure,
set <var>action</var>'s <a for=action>URL</a> to the return value. (Otherwise <var>action</var>'s
<a for=action>URL</a> remains null.)

<li><p>If <var>entry</var>["{{NotificationAction/icon}}"] <a for=map>exists</a>, then
<a lt="url parser">parse</a> it using <var>baseURL</var>, and if that does not return failure,
<a lt="URL parser">parse</a> it using <var>baseURL</var>, and if that does not return failure,
set <var>action</var>'s <a for=action>icon URL</a> to the return value. (Otherwise
<a for=action>icon URL</a> remains null.)
<var>action</var>'s <a for=action>icon URL</a> remains null.)

<li><p>Append <var>action</var> to <var>notification</var>'s <a for=notification>actions</a>.
</ol>
Expand Down Expand Up @@ -589,7 +563,7 @@ platform supports activation, the user agent must (unless otherwise specified) r

<ol>
<li><p><a>Create a fresh top-level traversable</a> given <var>url</var>.
<!-- XXX Should maybe set userInvolvement correctly here? -->
<!-- Should maybe set userInvolvement correctly here, even though it doesn't do anything today. -->

<li><p>Return.
</ol>
Expand Down

0 comments on commit 8929098

Please sign in to comment.