use Iterator instead of forEach (for performance optimization)
This commit is contained in:
parent
59444c68a6
commit
d02eb93c8a
@ -952,12 +952,10 @@ var TreeStyleTabUtils = {
|
||||
|
||||
var event = document.createEvent('DataContainerEvent');
|
||||
event.initEvent(type, canBubble, cancellable);
|
||||
for (let i in data)
|
||||
for (let [property, value] in Iterator(data))
|
||||
{
|
||||
if (!data.hasOwnProperty(i))
|
||||
continue;
|
||||
event.setData(i, data[i]);
|
||||
event[i] = data[i]; // for backward compatibility
|
||||
event.setData(property, value);
|
||||
event[property] = value; // for backward compatibility
|
||||
}
|
||||
|
||||
return target.dispatchEvent(event);
|
||||
|
Loading…
x
Reference in New Issue
Block a user