Match-id-ebfb7eb1a6693fb72c23d8ba7798ee6f1ba9772d
This commit is contained in:
parent
d074f507fb
commit
d8f6349c31
|
@ -110,9 +110,12 @@ function extendAttribute(target, source) {
|
||||||
'deltaX', 'deltaY', 'deltaZ', 'deltaMode',
|
'deltaX', 'deltaY', 'deltaZ', 'deltaMode',
|
||||||
];
|
];
|
||||||
|
|
||||||
attributes.forEach(attr => {
|
const length = attributes.length;
|
||||||
if (typeof source[attr] !== 'undefined') {
|
for (let i = 0; i < length; i++) {
|
||||||
if (typeof source[attr] === 'function') {
|
const attr = attributes[i];
|
||||||
|
const type = source[attr];
|
||||||
|
if (type !== 'undefined') {
|
||||||
|
if (type === 'function') {
|
||||||
target[attr] = function() {
|
target[attr] = function() {
|
||||||
return source[attr].apply(source, arguments);
|
return source[attr].apply(source, arguments);
|
||||||
};
|
};
|
||||||
|
@ -120,5 +123,5 @@ function extendAttribute(target, source) {
|
||||||
target[attr] = source[attr];
|
target[attr] = source[attr];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
})
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue