KEMBAR78
Making it easier to handle the state of extendable events by jakearchibald · Pull Request #1348 · w3c/ServiceWorker · GitHub
Skip to content

Conversation

@jakearchibald
Copy link
Contributor

@jakearchibald jakearchibald commented Aug 21, 2018

Currently it's impossible for another spec to know if an extendable event is in progress, or what the result was afterwards.

I intended to just mark some things as "export", but tried to tidy up the useage along the way.

  • ExtendableEvent's extend lifetime promises is now exported.
  • ExtendableEvent now has a timed out flag, which makes the user agent timeout a little more formal and detectable by other specs.
  • ExtendableEvent now has an active 'getter', which indicates the event is in progress.

If this is ok, I'll make the same changes in v1.


Preview | Diff

@jakearchibald jakearchibald requested a review from jungkees August 21, 2018 15:05
@jakearchibald
Copy link
Contributor Author

This has made it possible to monitor the progress of extendable events in other specs http://localhost:8080/background-fetch/#background-fetch-update-ui-event-update-ui.

Copy link
Collaborator

@jungkees jungkees left a comment

Choose a reason for hiding this comment

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

I like how it's referenced in the Background Fetch spec and also how it makes it easier to read the spec. Let's backport it to V1 too.

@jakearchibald
Copy link
Contributor Author

lol I linked to localhost. Thanks for not making fun of me.

@jakearchibald
Copy link
Contributor Author

For my own reference, here's an easy way to lift changes from the living spec to v1:

git diff master -- docs/index.bs | patch -p1 docs/v1/index.bs

(assuming you're on a feature branch based on master)

@jakearchibald jakearchibald merged commit 037e4ff into master Sep 12, 2018
@jakearchibald jakearchibald deleted the extendable-event branch September 12, 2018 10:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants