diff -r 000000000000 -r 40c8f766c9b8 src/cm/media/js/lib/yui/yui_3.0.0b1/build/datasource/datasource-polling-debug.js --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/cm/media/js/lib/yui/yui_3.0.0b1/build/datasource/datasource-polling-debug.js Mon Nov 23 15:14:29 2009 +0100 @@ -0,0 +1,93 @@ +/* +Copyright (c) 2009, Yahoo! Inc. All rights reserved. +Code licensed under the BSD License: +http://developer.yahoo.net/yui/license.txt +version: 3.0.0b1 +build: 1163 +*/ +YUI.add('datasource-polling', function(Y) { + +/** + * Extends DataSource with polling functionality. + * + * @module datasource + * @submodule datasource-polling + */ + +/** + * Adds polling to the DataSource Utility. + * @class Pollable + * @extends DataSource.Local + */ +var LANG = Y.Lang, + + Pollable = function() { + this._intervals = {}; + }; + +Pollable.prototype = { + + /** + * @property _intervals + * @description Hash of polling interval IDs that have been enabled, + * stored here to be able to clear all intervals. + * @private + */ + _intervals: null, + + /** + * Sets up a polling mechanism to send requests at set intervals and forward + * responses to given callback. + * + * @method setInterval + * @param msec {Number} Length of interval in milliseconds. + * @param request {Object} Request object. + * @param callback {Object} An object literal with the following properties: + *
successfailureargument