mirror of
https://github.com/coderaiser/cloudcmd.git
synced 2026-01-23 18:55:26 +00:00
feature(dom) add events.add array
This commit is contained in:
parent
6f9f7c8bf2
commit
be2d0f9a81
2 changed files with 13 additions and 2 deletions
|
|
@ -108,6 +108,8 @@ getJSONfromFileTable.
|
|||
|
||||
* feature(socket) add chdir on cd
|
||||
|
||||
* feature(dom) add events.add array
|
||||
|
||||
|
||||
2012.04.22, v0.2.0
|
||||
|
||||
|
|
|
|||
|
|
@ -455,8 +455,9 @@ var CloudCmd, Util, DOM, CloudFunc;
|
|||
return lRet;
|
||||
};
|
||||
|
||||
function process(pAdd, pType, pListener, pElement, pUseCapture){
|
||||
var lElement = (pElement || window),
|
||||
function process(pAdd, pType, pListener, pElement, pUseCapture){
|
||||
var i, n,
|
||||
lElement = (pElement || window),
|
||||
|
||||
lEventProcess = pAdd ?
|
||||
lElement.addEventListener :
|
||||
|
|
@ -477,6 +478,14 @@ var CloudCmd, Util, DOM, CloudFunc;
|
|||
pListener,
|
||||
pUseCapture
|
||||
);
|
||||
else if (Util.isArray(pType))
|
||||
for (i = 0, n = pType.length; i < n; i++)
|
||||
lProcess(
|
||||
pType[i],
|
||||
pListener,
|
||||
pElement,
|
||||
pUseCapture
|
||||
);
|
||||
else if (Util.isObject(pType)){
|
||||
if (pListener)
|
||||
pElement = pListener;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue