diff --git a/.github/workflows/auto-publish.yml b/.github/workflows/auto-publish.yml deleted file mode 100644 index 83db27e..0000000 --- a/.github/workflows/auto-publish.yml +++ /dev/null @@ -1,24 +0,0 @@ -name: Spec Prod CI - -# -# Documentation: -# https://github.com/w3c/spec-prod -# - -on: - pull_request: - paths: ["**.bs"] - push: - branches: [main] - paths: ["**.bs"] -jobs: - main: - name: Build, Validate and Deploy - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3 - - uses: w3c/spec-prod@v2 - with: - GH_PAGES_BRANCH: gh-pages - TOOLCHAIN: bikeshed - VALIDATE_LINKS: true diff --git a/README.md b/README.md index 51a33a1..7605334 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,6 @@ # Pending Beacon API [](https://github.com/WICG/pending-beacon/actions/workflows/linter.yml) -[](https://github.com/WICG/pending-beacon/actions/workflows/auto-publish.yml) Authors: [Darren Willis](https://github.com/darrenw), [Fergal Daly](https://github.com/fergald), [Ming-Ying Chung](https://github.com/mingyc) - Google @@ -71,9 +70,10 @@ Previous proposals: * [DEPRECATED] [fetch() with PendingRequest API](docs/fetch-with-pending-request-api.md): The transitional API proposal and discussions happened between PendingBeacon API and fetchLater API. * [DEPRECATED] [PendingBeacon API](docs/pending-beacon-api.md): The initial experimental API, available as Chrome Origin Trial from M107 to M115. -## Draft Specification +## Specification -[Deferred fetching PR - whatwg/fetch](https://whatpr.org/fetch/1647/094ea69...152d725.html) +* Deferred fetching - whatwg/fetch: [PR](https://github.com/whatwg/fetch/pull/1647), [Spec Preview](https://whatpr.org/fetch/1647.html#dom-global-fetch-later) +* Reserve/free quota for fetchLater - whatwg/html: [PR](https://github.com/whatwg/html/pull/10903) ## Alternatives Considered @@ -83,7 +83,7 @@ See [Alternative Approaches](docs/alternative-approaches.md). * [WebKit Standards Positions](https://github.com/WebKit/standards-positions/issues/85) * [Mozilla Standards Positions](https://github.com/mozilla/standards-positions/issues/703) -* [TAG Design Review](https://github.com/w3ctag/design-reviews/issues/776) +* [TAG Design Review](https://github.com/w3ctag/design-reviews/issues/887) * Yours - [Open an issue](https://github.com/WICG/pending-beacon/issues/new) [`XMLHttpRequest`]: https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest diff --git a/docs/fetch-later-api.md b/docs/fetch-later-api.md index af50f13..43cb63e 100644 --- a/docs/fetch-later-api.md +++ b/docs/fetch-later-api.md @@ -2,8 +2,8 @@ *This document is an explainer for fetchLater() API. It is evolved from a series of [discussions and concerns](https://github.com/WICG/pending-beacon/issues/70) around the experimental PendingBeacon API and the draft PendingRequest API.* -* [Specification PR](https://github.com/whatwg/fetch/pull/1647) -* [Draft Specification](https://whatpr.org/fetch/1647/9ca4bda...37a66c9.html) +* Deferred fetching - whatwg/fetch: [PR](https://github.com/whatwg/fetch/pull/1647), [Spec Preview](https://whatpr.org/fetch/1647.html#dom-global-fetch-later) +* Reserve/free quota for fetchLater - whatwg/html: [PR](https://github.com/whatwg/html/pull/10903) ## Motivation diff --git a/index.bs b/index.bs deleted file mode 100644 index 29efaa7..0000000 --- a/index.bs +++ /dev/null @@ -1,406 +0,0 @@ -
-Title: Pending Beacon -Status: UD -ED: http://wicg.github.io/pending-beacon/ -Shortname: pending-beacon -Level: 1 -Editor: Ian Clelland, Google -Abstract: This document introduces an API for registering data to be sent to a predetermined server - at the point that a page is unloaded. -Group: WebPerf -Repository: WICG/pending-beacon -- -Introduction {#introduction} -============================ - -This is an introduction. - -Issue: This introduction needs to be more of an introduction. - -Pending Beacon Framework {#pending-beacon-framework} -==================================================== - -Concepts {#concepts} --------------------- - -A pending beacon represents a piece of data which has been -registered with the user agent for later sending to an origin server. - -A [=pending beacon=] has a url, which is a -[=/URL=]. - -A [=pending beacon=] has a method, which is a -string, which is initally
"POST".
-
-A [=pending beacon=] has a foreground timeout, which is
-either null or an integer, and which is initially null.
-
-A [=pending beacon=] has a background timeout, which is
-either null or an integer, and which is initially null.
-
-A [=pending beacon=] has an is_pending flag,
-which is a [=boolean=], which is initially true.
-
-A [=pending beacon=] has a payload, which is a
-[=byte sequence=]. It is initially empty.
-
-A [=Document=] has a pending beacon set, which is an
-[=ordered set=] of [=pending beacons=].
-
-Issue: Add worker beacons as well?
-
-Note: In this spec, the [=pending beacon set=] is associated with a [=Document=].
-In an actual implementation, this set will likely need to be stored in the user
-agent, separate from the document itself, in order to be able to send beacons
-when the document is destroyed (either by being unloaded, or because of a crash).
-
-Issue: Define these to be part of the user agent formally.
-
-Updating beacons {#updating-beacons}
-------------------------------------
-
-GET
- : client
- :: The entry settings object
- : url
- :: |url|
- : credentials mode
- :: same-origin
-
- 1. Fetch |req|.
-
-POST
- : client
- :: The entry settings object
- : url
- :: |beacon|'s [=pending beacon/url=]
- : header list
- :: headerList
- : origin
- :: The entry settings object's [=/origin=]
- : keep-alive flag
- :: true
- : body
- :: |transmittedData|
- : mode
- :: cors
- : credentials mode
- :: same-origin
-
- 1. Fetch |req|.
-
-Issue: headerList is not defined.
-
-enum BeaconMethod {
- "POST",
- "GET"
-};
-
-dictionary PendingBeaconOptions {
- unsigned long timeout;
- unsigned long backgroundTimeout;
-};
-
-[Exposed=(Window, Worker)]
-interface PendingBeacon {
- readonly attribute USVString url;
- readonly attribute BeaconMethod method;
- attribute unsigned long timeout;
- attribute unsigned long backgroundTimeout;
- readonly attribute boolean pending;
-
- undefined deactivate();
- undefined sendNow();
-};
-
-[Exposed=(Window, Worker)]
-interface PendingGetBeacon : PendingBeacon {
- constructor(USVString url, optional PendingBeaconOptions options = {});
-
- undefined setURL(USVString url);
-};
-
-[Exposed=(Window, Worker)]
-interface PendingPostBeacon : PendingBeacon {
- constructor(USVString url, optional PendingBeaconOptions options = {});
-
- undefined setData(object data);
-};
-
-
-A {{PendingBeacon}} object has an associated beacon, which is a [=pending beacon=].
-
-new PendingGetBeacon(|url|, |options|) [=constructor steps=] are:
-
- 1. Let |beacon| be a new [=pending beacon=].
- 1. Set [=this=]'s [=PendingBeacon/beacon=] to |beacon|.
- 1. Call the [=common beacon initialization steps=] with [=this=], "GET", |url| and |options|.
- 1. Insert |beacon| into the user agent's pending beacon set.
-
-new PendingPostBeacon(|url|, |options|) [=constructor steps=] are:
-
- 1. Let |beacon| be a new [=pending beacon=].
- 1. Set [=this=]'s [=PendingBeacon/beacon=] to |beacon|.
- 1. Call the [=common beacon initialization steps=] with [=this=], "POST", |url| and |options|.
- 1. Insert |beacon| into the user agent's pending beacon set.
-
-url getter steps are to return [=this=]'s [=PendingBeacon/beacon=]'s [=pending beacon/url=].
-
-timeout getter steps are to return [=this=]'s [=PendingBeacon/beacon=]'s [=pending beacon/foreground timeout=].
-
-backgroundTimeout getter steps are to return [=this=]'s [=PendingBeacon/beacon=]'s [=pending beacon/background timeout=].
-
-pending getter steps are to return [=this=]'s [=PendingBeacon/beacon=]'s [=pending beacon/is_pending=] flag.
-
-deactivate() steps are:
- 1. Let |beacon| be [=this=]'s [=PendingBeacon/beacon=].
- 1. If |beacon|'s [=pending beacon/is_pending=] is not true, throw an {{"InvalidStateError"}} {{DOMException}}.
- 1. [=pending beacon/cancel=] |beacon|.
-
-sendNow() steps are:
- 1. Let |beacon| be [=this=]'s [=PendingBeacon/beacon=].
- 1. If |beacon|'s [=pending beacon/is_pending=] is not true, throw an {{"InvalidStateError"}} {{DOMException}}.
- 1. Call [=send a queued pending beacon=] with |beacon|.
-
-setURL(|url|) steps are:
- 1. Let |beacon| be [=this=]'s [=PendingBeacon/beacon=].
- 1. If |beacon|'s [=pending beacon/is_pending=] is not true, throw a {{"NoModificationAllowedError"}} {{DOMException}}.
- 1. If |url| is not a [=valid URL string=], throw a {{TypeError}}.
- 1. Let |base| be the entry settings object's [=API base URL=].
- 1. Let |parsedUrl| be the result of running the [=URL parser=] on |url| and |base|.
- 1. If |parsedUrl| is failure, throw a {{TypeError}}.
- 1. If the result of setting |beacon|'s [=pending beacon/url=] to |parsedUrl| is false, throw a {{TypeError}}.
-
-setData(|data|) steps are:
- 1. Let |beacon| be [=this=]'s [=PendingBeacon/beacon=].
- 1. If |beacon|'s [=pending beacon/is_pending=] is not true, throw a {{"NoModificationAllowedError"}} {{DOMException}}.
- 1. Let (|body|, contentType) be the result of extracting a [=body with type=] from |data| with keepalive set to true.
- 1. Let |bytes| be the [=byte sequence=] obtained by reading |body|'s stream.
- 1. If the result of setting |beacon|'s [=pending beacon/payload=] to |bytes| is false, throw a {{TypeError}}.
-
-