Skip to content

Commit

Permalink
Use current global object for ServiceWorkerGlobalScope check
Browse files Browse the repository at this point in the history
Using entry global object (equal to entry settings object’s global
object) is not needed here and we generally try to phase out entry.
  • Loading branch information
annevk committed Nov 21, 2016
1 parent b9b20ee commit 434ccaf
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
5 changes: 2 additions & 3 deletions notifications.bs
Expand Up @@ -715,9 +715,8 @@ corresponding <a>notification</a> is in the
these steps:

<ol>
<li><p>If the <a>entry settings object</a>'s
<a for="environment settings object">global object</a> is a {{ServiceWorkerGlobalScope}} object,
then <a>throw</a> a <code>TypeError</code> exception.
<li><p>If the <a>current global object</a> is a {{ServiceWorkerGlobalScope}} object, then
<a>throw</a> a <code>TypeError</code> exception.

<li><p>Let <var>notification</var> be the result of
<a lt="create a notification">creating a notification</a> given
Expand Down
5 changes: 2 additions & 3 deletions notifications.html
Expand Up @@ -581,8 +581,7 @@ <h3 class="heading settled" data-level="3.2" id="constructors"><span class="secn
these steps: </p>
<ol>
<li>
<p>If the <a data-link-type="dfn" href="https://html.spec.whatwg.org/multipage/webappapis.html#entry-settings-object">entry settings object</a>’s <a data-link-type="dfn" href="https://html.spec.whatwg.org/multipage/webappapis.html#concept-settings-object-global">global object</a> is a <code class="idl"><a data-link-type="idl" href="https://w3c.github.io/ServiceWorker/#serviceworkerglobalscope">ServiceWorkerGlobalScope</a></code> object,
then <a data-link-type="dfn" href="https://heycam.github.io/webidl/#dfn-throw">throw</a> a <code>TypeError</code> exception. </p>
<p>If the <a data-link-type="dfn" href="https://html.spec.whatwg.org/multipage/webappapis.html#current-global-object">current global object</a> is a <code class="idl"><a data-link-type="idl" href="https://w3c.github.io/ServiceWorker/#serviceworkerglobalscope">ServiceWorkerGlobalScope</a></code> object, then <a data-link-type="dfn" href="https://heycam.github.io/webidl/#dfn-throw">throw</a> a <code>TypeError</code> exception. </p>
<li>
<p>Let <var>notification</var> be the result of <a data-link-type="dfn" href="#create-a-notification">creating a notification</a> given <var>title</var> and <var>options</var>. Rethrow any exceptions. </p>
<li>
Expand Down Expand Up @@ -1131,9 +1130,9 @@ <h3 class="no-num no-ref heading settled" id="index-defined-elsewhere"><span cla
<ul>
<li><a href="https://html.spec.whatwg.org/multipage/webappapis.html#eventhandler">EventHandler</a>
<li><a href="https://html.spec.whatwg.org/multipage/browsers.html#browsing-context">browsing context</a>
<li><a href="https://html.spec.whatwg.org/multipage/webappapis.html#current-global-object">current global object</a>
<li><a href="https://html.spec.whatwg.org/multipage/webappapis.html#event-handlers">event handler</a>
<li><a href="https://html.spec.whatwg.org/multipage/webappapis.html#event-handler-event-type">event handler event type</a>
<li><a href="https://html.spec.whatwg.org/multipage/webappapis.html#concept-settings-object-global">global object</a>
<li><a href="https://html.spec.whatwg.org/multipage/infrastructure.html#in-parallel">in parallel</a>
<li><a href="https://html.spec.whatwg.org/multipage/browsers.html#concept-origin">origin</a>
<li><a href="https://html.spec.whatwg.org/multipage/webappapis.html#concept-settings-object-origin">origin <small>(for environment settings object)</small></a>
Expand Down

0 comments on commit 434ccaf

Please sign in to comment.