use Iterator instead of forEach (for performance optimization)

This commit is contained in:
Piro / SHIMODA Hiroshi 2012-02-05 04:03:28 +09:00
parent 59444c68a6
commit d02eb93c8a

View File

@ -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);