Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Unified Diff: lib/compat.js

Issue 29544685: Issue 5510 - Call onerror in case of error (Closed) Base URL: https://hg.adblockplus.org/libadblockplus/
Patch Set: Created Sept. 14, 2017, 3:45 p.m.
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/compat.js
===================================================================
--- a/lib/compat.js
+++ b/lib/compat.js
@@ -320,17 +320,17 @@
this.readyState = 4;
// Notify event listeners
const NS_OK = 0;
var eventName = (this.channel.status == NS_OK ? "load" : "error");
var event = {type: eventName};
if (this["on" + eventName])
- this.onload.call(this, event);
+ this["on" + eventName].call(this, event);
var list = this["_" + eventName + "Handlers"];
for (var i = 0; i < list.length; i++)
list[i].call(this, event);
}.bind(this);
// HACK (#5066): the code checking whether the connection is allowed is temporary,
// the actual check should be in the core when we make a decision whether
// to update a subscription with current connection or not, thus whether to
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld