-
Notifications
You must be signed in to change notification settings - Fork 139
Suggestion: add more event types (xxxpassive or xxx-ed) instead of EventListenerOptions #24
Comments
I agree that's an option worth considering (I especially like the names like
That said, @annevk, @smaug---- any opinion? |
It's no longer clear to me what the processing model for |
about 2) Looks like event dispatch in a tree which has depth 100 takes about 0.011ms on But anyhow, I don't like adding more event types for this kind of case. |
Sounds like there's general consensus that adding more event types is not the best solution. Closing. |
Currently there are only a few event types (
touchstart
,touchmove
, andwheel
) really benefit frommayCancel
option, so maybe it is not worth to introduce the new concept ofEventListenerOptions
to all events immediately. Instead, we can simply definetouchstartpassive
,touchmovepassive
, andwheelpassive
events, which are the non-cancelable variants. These variants are also available via DOM0 properties (i.e.onxxx
).EventListenerOptions
may be added to some new API in future, as suggested in #18.Update:
"xxxpassive" may be too long names, how about "-ed" names, i.e.
touchstarted
,touchmoved
, andwheelrolled
? Past tense implies that those events just happend, too late to cancel.The text was updated successfully, but these errors were encountered: