build/imageloader/imageloader-beta.js
(开头部分) 13KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
/*
Copyright (c) 2007, Yahoo! Inc. All rights reserved.
Code licensed under the BSD License:
http://developer.yahoo.net/yui/license.txt
version: 2.4.0
*/
/**
* The image loader is a framework to dynamically load images
* according to certain triggers, enabling faster load times
* and a more responsive UI.
*
* @module imageloader
* @namespace YAHOO.util
* @experimental
*/
if (typeof(YAHOO.util.ImageLoader) == 'undefined') {
YAHOO.util.ImageLoader = {};
}
/**
* A group for images. A group can have one time limit and a series of triggers. Thus the images belonging to this group must share these constraints.
* @class YAHOO.util.ImageLoader.group
* @requires YAHOO.util.Dom
* @requires YAHOO.util.Event
* @constructor
* @param {String|HTMLElement} trigEl The HTML element id or reference to assign the trigger event to. Can be null for no trigger
* @param {String} trigAct The type of event to assign to trigEl. Can be null for no trigger
* @param {Number} timeout Timeout (time limit) length, in seconds. Can be undefined, or <= 0, for no time limit
*/
YAHOO.util.ImageLoader.group = function(trigEl, trigAct, timeout) {
/**
* Name for the group. Only used to identify the group in logging statements
* @property name
* @type String
*/
this.name = 'unnamed';
/**
* Collection of images registered with this group
* @property _imgObjs
* @private
* @type Object
*/
this._imgObjs = {};
/**
* Timeout (time limit) length, in seconds
* @property timeoutLen
* @type Number
*/
this.timeoutLen = timeout;
/**
* Timeout object to keep a handle on the time limit
* @property _timeout
* @private
* @type Object
*/
this._timeout = null;
后面还有 376 行代码,购买后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 积分/个。 规则说明
AI 解读 AI
登录后可用,每次 10 积分,解读结果公开显示在下面。
还没有人解读过这个文件。
