mirror of
https://github.com/coderaiser/cloudcmd.git
synced 2026-01-23 18:55:26 +00:00
chore(dom) rm unused vars
This commit is contained in:
parent
a9c01fe65b
commit
35c63f59d3
1 changed files with 46 additions and 47 deletions
|
|
@ -270,7 +270,7 @@ var CloudCmd, Util, DOM, CloudFunc, Dialog;
|
|||
* check SVG SMIL animation support
|
||||
*/
|
||||
this.isSVG = function() {
|
||||
var rect, ret, svgNode, name,
|
||||
var ret, svgNode, name,
|
||||
create = document.createElementNS,
|
||||
SVG_URL = 'http://www.w3.org/2000/svg';
|
||||
|
||||
|
|
@ -301,8 +301,52 @@ var CloudCmd, Util, DOM, CloudFunc, Dialog;
|
|||
EventsProto = function() {
|
||||
var Events = this,
|
||||
ADD = true,
|
||||
REMOVE = false;
|
||||
REMOVE = false,
|
||||
process = function(pAdd, pType, pListener, pElement, pUseCapture) {
|
||||
var i, n,
|
||||
lElement = (pElement || window),
|
||||
|
||||
lEventProcess = pAdd ?
|
||||
lElement.addEventListener :
|
||||
lElement.removeEventListener,
|
||||
|
||||
lRet = pType && lEventProcess,
|
||||
lEvent = '';
|
||||
|
||||
lEventProcess = lEventProcess.bind(lElement);
|
||||
|
||||
if (lRet) {
|
||||
if (Util.isString(pType))
|
||||
lEventProcess(
|
||||
pType,
|
||||
pListener,
|
||||
pUseCapture
|
||||
);
|
||||
else if (Util.isArray(pType))
|
||||
for (i = 0, n = pType.length; i < n; i++)
|
||||
process(
|
||||
pAdd,
|
||||
pType[i],
|
||||
pListener,
|
||||
pElement,
|
||||
pUseCapture
|
||||
);
|
||||
else if (Util.isObject(pType)) {
|
||||
if (pListener)
|
||||
pElement = pListener;
|
||||
|
||||
for (lEvent in pType)
|
||||
process(
|
||||
pAdd,
|
||||
lEvent,
|
||||
pType[lEvent],
|
||||
pElement,
|
||||
pUseCapture
|
||||
);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* safe add event listener
|
||||
*
|
||||
|
|
@ -505,51 +549,6 @@ var CloudCmd, Util, DOM, CloudFunc, Dialog;
|
|||
|
||||
return lRet;
|
||||
};
|
||||
|
||||
function process(pAdd, pType, pListener, pElement, pUseCapture) {
|
||||
var i, n,
|
||||
lElement = (pElement || window),
|
||||
|
||||
lEventProcess = pAdd ?
|
||||
lElement.addEventListener :
|
||||
lElement.removeEventListener,
|
||||
|
||||
lRet = pType && lEventProcess,
|
||||
lEvent = '';
|
||||
|
||||
lEventProcess = lEventProcess.bind(lElement);
|
||||
|
||||
if (lRet) {
|
||||
if (Util.isString(pType))
|
||||
lEventProcess(
|
||||
pType,
|
||||
pListener,
|
||||
pUseCapture
|
||||
);
|
||||
else if (Util.isArray(pType))
|
||||
for (i = 0, n = pType.length; i < n; i++)
|
||||
process(
|
||||
pAdd,
|
||||
pType[i],
|
||||
pListener,
|
||||
pElement,
|
||||
pUseCapture
|
||||
);
|
||||
else if (Util.isObject(pType)) {
|
||||
if (pListener)
|
||||
pElement = pListener;
|
||||
|
||||
for(lEvent in pType)
|
||||
process(
|
||||
pAdd,
|
||||
lEvent,
|
||||
pType[lEvent],
|
||||
pElement,
|
||||
pUseCapture
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
CmdProto = function() {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue