简要:$.Callbacks是一个生成回调管家Callback的工厂,Callback提供一系列方法来管理一个回调列表($.Callbacks的一个私有变量list),包括添加回调函数, 删除回调函数等等...,话不多说看正文: var memory, // Last fire value (for non-forgettable lists) fired, // Flag to know if list was already fired //是否回调过 firing, // Flag to…
function writeCode(callback){ console.log("i am waiting....") callback(); console.log("i am ready")}function prepare(){ console.log("i am preparing...")} writeCode(prepare)…
/** * @preserve Tiny-Loader: A small loader that load CSS/JS in best way for page performanceIs. * * @version 1.0.1 * @copyright The Youzan Limited [All Rights Reserved] * @license MIT License (see LICENSE.txt) */(function(window, document) { 'use st…