Polymer / old-docs-site

Old Polymer site. Replaced by these repos: polymer-project.org, polymer-library-docs
https://www.polymer-project.org
1.02k stars 2.45k forks source link

polymer 2.0 upgrade guide fire equivalent missing cancellable #2641

Open davidmaxwaterman opened 6 years ago

davidmaxwaterman commented 6 years ago

IINM, the polymer fire() method also sets the cancellable flag to true. This tripped me up in a recent upgrade since the code was testing defaultPrevented which was always false, even though preventDefault() had been called.

ghost commented 5 years ago

API docs say that the default for cancelable in the fire method is false https://www.polymer-project.org/1.0/docs/api/#method-fire ... this matches up with the Web API defaults for Event and CustomEvent as far as i can work out. I'm curious what caused you to think cancelable gets set to true? If you can point it out in the docs or give a code sample I will try to clear up any confusion, or raise a bug if needed :)