chore: comment

This commit is contained in:
shirakaba
2022-12-21 11:11:25 +09:00
parent 1f3a62c3fb
commit b4f69987ae

View File

@@ -393,6 +393,10 @@ export class DOMEvent implements Event {
// nanoseconds per dispatchTo() call.
private handleEvent(data: EventData, isGlobal: boolean, phase: 0 | 1 | 2 | 3, removeEventListener: (eventName: string, callback?: any, thisArg?: any, capture?: boolean) => void, removeEventListenerContext: unknown) {
// Set a listener to clone the array just before any mutations.
//
// Lazy-binding this (binding it just before being called, rather than
// up-front) unexpectedly seems to slow things down - v8 may be
// optimising it for us or something.
this.listenersLive.onMutation = this.onCurrentListenersMutation.bind(this);
for (let i = this.listenersLazyCopy.length - 1; i >= 0; i--) {