【文件属性】:
文件名称:onready-dispatcher:带有 onready() 的事件调度器
文件大小:30KB
文件格式:ZIP
更新时间:2021-05-30 23:59:41
JavaScript
准备好调度员
(无依赖,1kB 缩小)
带有on() 、 off() 、 trigger()和onready()事件调度器。
on和off有标准的发布/订阅行为。
onready当你想同样的分辨率创建监听任何时候非常有用。 例如,延迟 API 回调直到某些数据准备就绪,或在此之后的任何时间立即响应。
onready行为:
事件前:注册回调。
事件:运行所有挂起的回调。
事件之后:立即使用缓存参数运行回调。
alias()也可用于多个事件名称(例如,当支持旧事件名称时)。
例子:
var event = new ReadyDispatcher ( ) ;
// This will run when the event fires
event . onready ( "init" , function ( timestamp ) {
console . log ( ti
【文件预览】:
onready-dispatcher-master
----onready-dispatcher.min.js(975B)
----onready-dispatcher.js(4KB)
----test()
--------index.html(601B)
--------spec()
----LICENSE(1KB)
----lib()
--------jasmine-2.0.0()
----README.md(1KB)