|
|
@@ -7,14 +7,14 @@ var data = "";
|
|
|
|
|
|
// Listen for the "download_chunk" event to see when we have data.
|
|
|
// Note that this event is not available on all platforms.
|
|
|
-request.subscribeToEvent("download_chunk", function (event) {
|
|
|
+request.subscribeToEvent("WebRequestDownloadChunk", function (event) {
|
|
|
|
|
|
data += event.download.readString();
|
|
|
|
|
|
});
|
|
|
|
|
|
// Listen for the "complete" event to see when the response is complete.
|
|
|
-request.subscribeToEvent("complete", function (event) {
|
|
|
+request.subscribeToEvent("WebRequestComplete", function (event) {
|
|
|
|
|
|
if (event.error) {
|
|
|
// When something goes wrong, print the error, then return.
|