Skip to content

Making it easier to handle the state of extendable events#1348

Merged
jakearchibald merged 2 commits into
masterfrom
extendable-event
Sep 12, 2018
Merged

Making it easier to handle the state of extendable events#1348
jakearchibald merged 2 commits into
masterfrom
extendable-event

Conversation

@jakearchibald

@jakearchibald jakearchibald commented Aug 21, 2018

Copy link
Copy Markdown
Contributor

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
Copy Markdown
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.

@jungkees jungkees left a comment

Copy link
Copy Markdown
Collaborator

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
Copy Markdown
Contributor Author

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

@jakearchibald

Copy link
Copy Markdown
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