Skip to content

Commit 8929098

Browse files
committed
no need for same origin checks
1 parent ea7ab70 commit 8929098

File tree

1 file changed

+11
-37
lines changed

1 file changed

+11
-37
lines changed

notifications.bs

Lines changed: 11 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -217,23 +217,10 @@ string <var>title</var>, {{NotificationOptions}} <a for=/>dictionary</a> <var>op
217217
<li><p>Set <var>notification</var>'s <a for=notification>body</a> to
218218
<var>options</var>["{{NotificationOptions/body}}"].
219219

220-
<li>
221-
<p>If <var>options</var>["{{NotificationOptions/url}}"] <a for=map>exists</a>:
222-
223-
<ol>
224-
<li><p>Let <var>url</var> be the result of <a lt="URL parser">parsing</a>
225-
<var>options</var>["{{NotificationOptions/url}}"] using <var>baseURL</var>.
226-
227-
<li>
228-
<p>If <var>url</var> is not failure:
229-
230-
<ol>
231-
<li><p>If <var>url</var>'s <a for=url>origin</a> is not <a>same origin</a> with
232-
<var>notification</var>'s <a for=notification>origin</a>, then <a>throw</a> a {{TypeError}}.
233-
234-
<li><p>Set <var>notification</var>'s <a for=notification>URL</a> to <var>url</var>.
235-
</ol>
236-
</ol>
220+
<li><p>If <var>options</var>["{{NotificationOptions/url}}"] <a for=map>exists</a>, then
221+
<a lt="URL parser">parse</a> it using <var>baseURL</var>, and if that does not return failure, set
222+
<var>notification</var>'s <a for=notification>URL</a> to the return value. (Otherwise
223+
<var>notification</var>'s <a for=notification>URL</a> remains null.)
237224

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

293-
<li>
294-
<p>If <var>entry</var>["{{NotificationAction/url}}"] <a for=map>exists</a>,
295-
296-
<ol>
297-
<li><p>Let <var>url</var> be the result of <a lt="URL parser">parsing</a>
298-
<var>entry</var>["{{NotificationAction/url}}"] using <var>baseURL</var>.
299-
300-
<li>
301-
<p>If <var>url</var> is not failure:
302-
303-
<ol>
304-
<li><p>If <var>url</var>'s <a for=url>origin</a> is not <a>same origin</a> with
305-
<var>notification</var>'s <a for=notification>origin</a>, then <a>throw</a> a {{TypeError}}.
306-
307-
<li><p>Set <var>action</var>'s <a for=action>URL</a> to <var>url</var>.
308-
</ol>
309-
</ol>
280+
<li><p>If <var>entry</var>["{{NotificationAction/url}}"] <a for=map>exists</a>, then
281+
<a lt="URL parser">parse</a> it using <var>baseURL</var>, and if that does not return failure,
282+
set <var>action</var>'s <a for=action>URL</a> to the return value. (Otherwise <var>action</var>'s
283+
<a for=action>URL</a> remains null.)
310284

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

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

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

594568
<li><p>Return.
595569
</ol>

0 commit comments

Comments
 (0)