Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add worker_support info for CacheStorage #8783

Merged
merged 4 commits into from
Feb 1, 2021

Conversation

hamishwillee
Copy link
Contributor

CacheStorage is defined in the service worker spec but also works in the main thread and other worker types. This PR updates CacheStorage information to have a worker_support key.

What I did was duplicate the top level support for CacheStorage as the key worker_support. My assumption being that worker support went in for the first version unless otherwise documented (seems reasonable because this is in the service worker spec)

image

There is a note indicating that for Chrome it became accessible through WorkerWindowScope (and window) in version 43. My assumption is therefore that this is a case where the class was available, but inaccessible. So I have updated the worker support information to 43 for that case.

There is also a note for FF on all methods: "notes": "Extended Support Releases (ESR) before Firefox 78 ESR do not support service workers and the Push API.". I copied this to just mention service workers.

@ddbeck

  • Does this make sense?
  • The note about ESR versions appears on all methods. Is it necessary - ie propose to remove it except for the parent CacheStorege.

@github-actions github-actions bot added the data:api Compat data for Web APIs. https://developer.mozilla.org/docs/Web/API label Jan 18, 2021
@hamishwillee
Copy link
Contributor Author

@ddbeck Further, looking at Cache (which is used with CacheStorage) the BCD says support from chrome 43 but From 40 to 42, this was only available on service workers.

That's a bit confusing. It kind of indicates to me that perhaps the note for CacheStorage is incorrect "Accessible from WorkerGlobalScope from version 43." - and this should be from version 40 (with other corresponding changes).

Thoughts?

@ddbeck
Copy link
Collaborator

ddbeck commented Jan 28, 2021

My first (possibly wrong!) impressions:

  • We ought to remove the Accessible from notes outright. These notes basically say which api.{SomeInterface}.caches features exist. We have, for example, an api.WindowOrWorkerGlobalScope.caches feature that ought to cover these details (API moves might be appropriate on that feature, but not here).
  • I'm not quite sure what "the class was available, but inaccessible" means. Does this mean that CacheStorage is only sometimes in the global scope and that's what these values reflect?

@hamishwillee
Copy link
Contributor Author

@ddbeck Thanks very much. So I have updated in line with your comments and my interpretation. Essentially that CacheStorage was supported in Chrome in service workers from 40, and other workers/main thread from version 43.

This is heavily implied by the Cache docs which explicitly state that.

@hamishwillee
Copy link
Contributor Author

PS For Cache the BCD currently says we have version-added 43 and note "From 40 to 42, this was only available on service workers.". Our previous discussion was that the version should reflect when the first worker was added and the note reflect any variation.

So propose for Cache:

  • change version-added to 40 on the top level docs and leave the note.
  • Then add worker_support that duplicates this pattern

Make sense?

Copy link
Collaborator

@ddbeck ddbeck left a comment

Choose a reason for hiding this comment

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

Overall, I'm really happy with this. I think it's telling a much clearer story! And the proposal for Cache makes sense. I think we just need one more pass on this. Suggestions in line comments.

@hamishwillee
Copy link
Contributor Author

Hi @ddbeck
Thanks, works for me. All your suggestions addressed (I think). I'll look at Cache once this is accepted.

Copy link
Collaborator

@ddbeck ddbeck left a comment

Choose a reason for hiding this comment

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

Thank you, @hamishwillee! 🎉

@ddbeck ddbeck merged commit 007e974 into mdn:master Feb 1, 2021
germain-gg pushed a commit to germain-gg/browser-compat-data that referenced this pull request Feb 1, 2021
…icture

* upstream/master: (1123 commits)
  Remove Chromium 89 from String.at / Array.at / TypedArray.at (mdn#8869)
  Add worker_support info for CacheStorage (mdn#8783)
  Remove several needless "Enabled by default" notes (mdn#8899)
  Add HTML global attribute nonce (mdn#8764)
  api.Navigator.vibrate - Firefox for Android doesn't vibrate (mdn#7172)
  Mark MediaSource's onsourceclose as not supported in Firefox (mdn#8881)
  Update Florian's ownership (mdn#8893)
  Mention fix for Chrome's broken PDF loading (mdn#8867)
  Fill out Chrome data for html.elements.source.{sizes,srcset} (mdn#8889)
  Weekly data release for 2021-01-28
  Add text-decoration-thickness for Opera 73+ (mdn#8872)
  Update :is and :where pseudo-classes for Chrome (mdn#7375)
  Add note re Safari <9 partial srcset/sizes support (mdn#7353)
  Update data for when href (not xlink:href) can be used in SVG (mdn#6603)
  Add top-level await (mdn#8807)
  TouchList: Add Safari Desktop and Safari iOS versions (mdn#8848)
  Update Firefox versions to account for Firefox 85 release (mdn#8864)
  Fix page_action.show_matches support for Android (mdn#8844)
  Update Safari support for devicechange_event (mdn#8863)
  Add HTTPS-only to privacy.network (mdn#8830)
  ...
@hamishwillee hamishwillee deleted the worker_CacheStorage branch February 1, 2021 22:31
@hamishwillee
Copy link
Contributor Author

A win! Thanks @ddbeck

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
data:api Compat data for Web APIs. https://developer.mozilla.org/docs/Web/API
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants