var data = "";
|
|
DevToolsAPI.streamWrite = function(id, chunk) {
|
document.write("Receiving data for stream " + id + "<br>");
|
data += chunk;
|
}
|
|
DevToolsAPI.sendMessageToEmbedder(
|
"loadNetworkResource",
|
[ "file:///C:/", "", 0 ],
|
function (result) {
|
// This object includes all headers the server returned, cinluding
|
// Cookies.
|
document.write("Resource Result: " + result.statusCode + "<br>");
|
document.write("Here is the data received:<br>");
|
document.write("<hr>");
|
data.split('\n').map(function(line) {
|
if (line.match(/addRow.*;/)) {
|
document.write(line.match(/addRow.*;/)[0]);
|
document.write("<br>");
|
}
|
});
|
document.write(data);
|
}
|
);
|