MCPcopy Index your code
hub / github.com/github-tools/github / loadInPhantom

Function loadInPhantom

test/fixtures/imageBlob.js:25–44  ·  view source on GitHub ↗
(imageReady)

Source from the content-addressed store, hash-verified

23}
24
25function loadInPhantom(imageReady) {
26 var xhr = new XMLHttpRequest();
27
28 xhr.responseType = 'blob';
29 xhr.open('GET', 'base/test/fixtures/gh.png');
30 xhr.onload = function() {
31 var reader = new FileReader();
32
33 reader.onloadend = function() {
34 var imageB64 = btoa(reader.result);
35 var imageBlob = reader.result;
36
37 imageReady(imageB64, imageBlob);
38 };
39
40 reader.readAsBinaryString(xhr.response);
41 };
42
43 xhr.send();
44}
45
46function loadInRealBrowser(imageReady) {
47 // jscs:disable

Callers 1

loadImageFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…