Цитата:
|
Что если было вызвано 2 addEventListener с useCapture true и false?
|
Цитата:
|
Keep in mind that after the listener is registered, subsequent calls to addEventListener() with a different type or useCapture value result in the creation of a separate listener registration. For example, if you first register a listener with useCapture set to true, it listens only during the capture phase. If you call addEventListener() again using the same listener object, but with useCapture set to false, you have two separate listeners: one that listens during the capture phase and another that listens during the target and bubbling phases.
|
Цитата:
|
Как у EventDispatcher посмотреть какой стоит useCapture для определенного типа событий?
|
Стандартными средствами - никак, к сожалению. Придется перекрывать addEventListener и removeEventListener, чтобы запоминать и удалять информацию о слушателях. Причем это весьма обидно, так как оригинальные методы делают абсолютно то же самое, но используют хранилище, недоступное для пользовательского кода.