Skip to content

Instantly share code, notes, and snippets.

@DenVdmj
DenVdmj / background.js
Created May 4, 2018 — forked from Rob--W/background.js
Implementation example of writable response bodies for Chromium extensions (API draft).
View background.js
/**
* Implementation example of writable response bodies.
* Based on the draft of the Streams API (19 March 2014)
* https://dvcs.w3.org/hg/streams-api/raw-file/tip/Overview.htm
* Design document for response body reading/writing:
* https://docs.google.com/document/d/1iE6M-YSmPtMOsec7pR-ILWveQie8JQQXTm15JKEcUT8
*/
/* globals chrome, ByteStream, URL, XMLHttpRequest */
'use strict';