flymis/WebRoot/dojojs/src/event/common.js
(开头部分) 28KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
/*
Copyright (c) 2004-2006, The Dojo Foundation
All Rights Reserved.
Licensed under the Academic Free License version 2.1 or above OR the
modified BSD license. For more information on Dojo licensing, see:
http://dojotoolkit.org/community/licensing.shtml
*/
dojo.provide("dojo.event.common");
dojo.require("dojo.lang.array");
dojo.require("dojo.lang.extras");
dojo.require("dojo.lang.func");
// TODO: connection filter functions
// these are functions that accept a method invocation (like around
// advice) and return a boolean based on it. That value determines
// whether or not the connection proceeds. It could "feel" like around
// advice for those who know what it is (calling proceed() or not),
// but I think presenting it as a "filter" and/or calling it with the
// function args and not the MethodInvocation might make it more
// palletable to "normal" users than around-advice currently is
// TODO: execution scope mangling
// YUI's event facility by default executes listeners in the context
// of the source object. This is very odd, but should probably be
// supported as an option (both for the source and for the dest). It
// can be thought of as a connection-specific hitch().
// TODO: more resiliency for 4+ arguments to connect()
dojo.event = new function(){
this._canTimeout = dojo.lang.isFunction(dj_global["setTimeout"])||dojo.lang.isAlien(dj_global["setTimeout"]);
// FIXME: where should we put this method (not here!)?
function interpolateArgs(args, searchForNames){
var dl = dojo.lang;
var ao = {
srcObj: dj_global,
srcFunc: null,
adviceObj: dj_global,
adviceFunc: null,
aroundObj: null,
aroundFunc: null,
adviceType: (args.length>2) ? args[0] : "after",
precedence: "last",
once: false,
delay: null,
rate: 0,
adviceMsg: false
};
switch(args.length){
case 0: return;
case 1: return;
case 2:
ao.srcFunc = args[0];
ao.adviceFunc = args[1];
break;
case 3:
后面还有 818 行代码,购买后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明
AI 解读 AI
登录后可用,每次 10 算力,解读结果公开显示在下面。
还没有人解读过这个文件。