Skip to content

Instantly share code, notes, and snippets.

View mkruisselbrink's full-sized avatar

Marijn Kruisselbrink mkruisselbrink

View GitHub Profile

Keybase proof

I hereby claim:

  • I am mkruisselbrink on github.
  • I am mkruisselbrink (https://keybase.io/mkruisselbrink) on keybase.
  • I have a public key ASC4-bbimTSrwTWrE1F4wMBuloJ-9Mqqs0juQZcfEa8VFAo

To claim this, I am signing this object:

<!DOCTYPE html>
<meta charset=utf-8>
<title>Blob.close</title>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script>
if (!Blob.prototype.close && Blob.prototype.msClose) {
// Edge has msClose rather than close.
Blob.prototype.close = Blob.prototype.msClose;

Fetch Interception

Fetch Interception, also known as Foreign Fetch and Fallthroug Fetch is a mechanism for service workers to handle fetch requests from clients that are not controlled by the service worker.

The proposed API involves some new API in the service worker spec, as well as some minor modifications to the fetch spec.

New ServiceWorker API

The first part is an API to allow a service worker to explicitly opt-in to intercepting fetch requests. To enabled this, each service worker registration will have an associated list of interception scopes. These scopes should be inside (or equal to) the overall scope of the registration. A new method is added to the activate event to allow setting this list: