WICG / EventListenerOptions

An extension to the DOM event pattern to allow authors to disable support for preventDefault
Other
1.17k stars 140 forks source link

booleans should default to false #15

Closed domenic closed 8 years ago

domenic commented 9 years ago

It looks like there are already lots of threads covering potential changes to the name and semantics that might impact this. But, wherever they land, they should not end up with a boolean that defaults to true. Web IDL even explicitly warns against this:

Warning

It is strongly suggested not to use default value of true for boolean-typed arguments, as this can be confusing for authors who might otherwise expect the default conversion of undefined to be used (i.e., false).

RByers commented 9 years ago

Ah, I wasn't aware of that guidance - thanks. I was trying to avoid double negative, but it's easy to just do that. I.e. doesntCancel instead of 'mayCancel.