From b6ee3e5cb9a34a99e387b0c47f8a76320c38b292 Mon Sep 17 00:00:00 2001 From: anekos Date: Tue, 13 Sep 2011 01:09:34 +0900 Subject: libly.Request.addEventListener のイベント名引数の変更に対応 --- notifier.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'notifier.js') diff --git a/notifier.js b/notifier.js index 07784eb..cb78c9d 100644 --- a/notifier.js +++ b/notifier.js @@ -255,14 +255,14 @@ function bootstrap() { this.options.headers, $U.extend({ asynchronous: true }, this.options.extra) ); - req.addEventListener("onSuccess", $U.bind(this, function(res) { + req.addEventListener("success", $U.bind(this, function(res) { logger.log("initialized"); if (typeof this.parse == "function") this.cache = this.parse(res); if (this.cache) this.initialized = true; })); - req.addEventListener("onFailure", function(res) { logger.log(res); }); - req.addEventListener("onException", function(res) { logger.log(res); }); + req.addEventListener("failure", function(res) { logger.log(res); }); + req.addEventListener("exception", function(res) { logger.log(res); }); if (this.method == "POST") req.post(); else @@ -277,7 +277,7 @@ function bootstrap() { this.options.headers, $U.extend({ asynchronous: true }, this.options.extra) ); - req.addEventListener("onSuccess", $U.bind(this, function(res) { + req.addEventListener("success", $U.bind(this, function(res) { var parsed, diff; if (typeof this.parse == "function") parsed = this.parse(res); if (parsed && typeof this.diff == "function") diff = this.diff(this.cache, parsed); -- cgit v1.2.3