babel-preset-test-bundled-dependencies
Version:
Allow custom config for create-react-app without ejecting
17 lines (13 loc) • 394 B
JavaScript
var http = require('../../');
http.get({ path : '/doom' }, function (res) {
var div = document.getElementById('result');
if (!div.style) div.style = {};
div.style.color = 'rgb(80,80,80)';
res.on('data', function (buf) {
div.innerHTML += buf;
});
res.on('end', function () {
div.style.color = 'black';
div.innerHTML += '!';
});
});