Team:Heidelberg/Templates/Awesomesheet
From 2014.igem.org
(Difference between revisions)
m |
m |
||
Line 10: | Line 10: | ||
// and insert content into DOM element referenced by id | // and insert content into DOM element referenced by id | ||
- | + | oReq = new XMLHttpRequest(); | |
- | + | oReq.open("GET", src, true); | |
- | oReq.open("GET", | + | |
oReq.responseType = "arraybuffer"; | oReq.responseType = "arraybuffer"; | ||
Line 18: | Line 17: | ||
var arrayBuffer = oReq.response; // Note: not oReq.responseText | var arrayBuffer = oReq.response; // Note: not oReq.responseText | ||
if (arrayBuffer) { | if (arrayBuffer) { | ||
- | + | byteArray = new Uint8Array(arrayBuffer); | |
var gunzip = new Zlib.Gunzip(byteArray); | var gunzip = new Zlib.Gunzip(byteArray); | ||
var plain = gunzip.decompress(); | var plain = gunzip.decompress(); |
Revision as of 20:21, 17 October 2014