We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent eb8020a commit ab56e11Copy full SHA for ab56e11
packages/core/data/dom-events/dom-event.ts
@@ -331,7 +331,10 @@ export class DOMEvent implements Event {
331
const eventPath = this.getEventPath(target, 'capture');
332
333
// Capturing phase, e.g. [Page, StackLayout, Button]
334
- for (const currentTarget of eventPath) {
+ // This traditional C loop runs 150 nanoseconds faster than a for...of
335
+ // loop.
336
+ for (let i = 0; i < eventPath.length; i++) {
337
+ const currentTarget = eventPath[i];
338
this.currentTarget = currentTarget;
339
this.eventPhase = this.target === this.currentTarget ? this.AT_TARGET : this.CAPTURING_PHASE;
340
0 commit comments