Teact: load event can not be delegated

This commit is contained in:
Alexander Zinchuk 2022-04-01 20:43:30 +02:00
parent b52ee4afe5
commit b352924f6f

View File

@ -3,7 +3,7 @@ import { DEBUG } from '../../config';
type Handler = (e: Event) => void;
type DelegationRegistry = Map<HTMLElement, Handler>;
const NON_BUBBLEABLE_EVENTS = new Set(['scroll', 'mouseenter', 'mouseleave']);
const NON_BUBBLEABLE_EVENTS = new Set(['scroll', 'mouseenter', 'mouseleave', 'load']);
const documentEventCounters: Record<string, number> = {};
const delegationRegistryByEventType: Record<string, DelegationRegistry> = {};