From: Jakub Skoczen Date: Wed, 31 Oct 2007 10:29:01 +0000 (+0000) Subject: Introduced on_init event handler. X-Git-Tag: PAZPAR2.1.0.5~4 X-Git-Url: http://git.indexdata.com/?p=pazpar2-moved-to-github.git;a=commitdiff_plain;h=96ddfff120e5c0ce386ee1b953f55bfcf00f63ac Introduced on_init event handler. --- diff --git a/js/pz2.js b/js/pz2.js index cf34cb7..718c74d 100644 --- a/js/pz2.js +++ b/js/pz2.js @@ -1,5 +1,5 @@ /* -** $Id: pz2.js,v 1.63 2007-10-30 13:41:05 jakub Exp $ +** $Id: pz2.js,v 1.64 2007-10-31 10:29:01 jakub Exp $ ** pz2.js - pazpar2's javascript client library. */ @@ -50,6 +50,7 @@ var pz2 = function ( paramArray ) this.errorHandler = paramArray.errorhandler || null; // function callbacks + this.initCallback = paramArray.oninit || null; this.statCallback = paramArray.onstat || null; this.showCallback = paramArray.onshow || null; this.termlistCallback = paramArray.onterm || null; @@ -191,6 +192,8 @@ pz2.prototype = }, context.keepAlive ); + if ( context.initCallback ) + context.initCallback(); } else context.throwError('Init failed. Malformed WS resonse.',