Skip to content

Commit

Permalink
Restore error event for invalid workerType
Browse files Browse the repository at this point in the history
This uses the "invalid" state of <link workertype> introduced in
whatwg/html#2740
  • Loading branch information
sideshowbarker committed Jun 10, 2017
1 parent fcf2835 commit 18e52c5
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions docs/index.bs
Original file line number Diff line number Diff line change
Expand Up @@ -1804,6 +1804,7 @@ spec: webappsec-referrer-policy; urlPrefix: https://w3c.github.io/webappsec-refe
1. Let |scopeURL| be null.
1. If the <{link/scope}> attribute is present, set |scopeURL| to the result of <a lt="URL parser">parsing</a> the <{link/scope}> attribute with the <{link}> element's <a>node document</a>'s <a>document base URL</a>.
1. Let |workerType| be the state of the <{link/workertype}> attribute.
1. If |workerType| is "<code>invalid</code>", <a>queue a task</a> to <a>fire an event</a> named <code>error</code> at the <{link}> element, and abort these steps.

This comment has been minimized.

Copy link
@domenic

domenic Jun 10, 2017

Contributor

States are marked up as italics, not strings.

1. Let |useCache| be true if the <{link}> element has a <{link/usecache}> attribute, otherwise false.
1. Let |promise| be a new <a>promise</a>.
1. Invoke [=Start Register=] with |scopeURL|, |scriptURL|, |promise|, |client|, |client|'s <a>creation URL</a>, |workerType|, and |useCache|.
Expand Down

2 comments on commit 18e52c5

@domenic
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I thought we decided it should be ignored (i.e. no service worker should be installed), not fire an error.

@sideshowbarker
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

States are marked up as italics, not strings.

Ah yes, fixed

I thought we decided it should be ignored (i.e. no service worker should be installed), not fire an error.

Oofs, OK—fixed now

Please sign in to comment.