That's what I figured, but the articles about it didn't seem to say, and
the late hour caused me not to think to look at the spec itself. Good deal.
> That's a no-op per https://dom.spec.whatwg.org/#dom-event-preventdefault.
--
Eric Shepherd
Senior Technical Writer
Mozilla Developer Network
Correct, the preventDefault() is ignored from a passive listener, and
we will probably log a warning to the console (I have a patch up for
review that does that, let's see what smaug says).
On Fri, May 6, 2016 at 1:01 AM, Anne van Kesteren wrote:
> On Fri, May 6, 2016 at 4:43 AM, Eric Shepherd w
On Fri, May 6, 2016 at 4:43 AM, Eric Shepherd wrote:
> What happens if the developer specifies passive yet calls
> preventDefault() anyway?
That's a no-op per https://dom.spec.whatwg.org/#dom-event-preventdefault.
--
https://annevankesteren.nl/
___
d
ship: "passive" option for
AddEventListenerOptions
> Summary: Authors can declare in their addEventListener call that the
> listener will not be calling preventDefault() on the event. This
> unlocks certain performance optimizations.
--
Eric Shepherd
Senior Technical Write
On 2016-05-05 3:21 PM, Justin Dolske wrote:
How will a developer know when it would be worthwhile to mark their event
listener as passive? Do we perhaps log something to the console?
The Chrome devtools have two features to help with this: They have a
checkbox for "Show scrolling perf issues"
In general developers should probably default to marking their
listeners as passive, unless their listeners are actually going to
call preventDefault(). We don't have a console log for saying "use a
passive listener", no. We can easily detect listeners that are not
marked passive and that are impac
How will a developer know when it would be worthwhile to mark their event
listener as passive? Do we perhaps log something to the console?
Justin
On Wed, May 4, 2016 at 3:19 PM, Kartikaya Gupta wrote:
> Summary: Authors can declare in their addEventListener call that the
> listener will not be
Summary: Authors can declare in their addEventListener call that the
listener will not be calling preventDefault() on the event. This
unlocks certain performance optimizations.
Bug: https://bugzilla.mozilla.org/show_bug.cgi?id=1266066
Link to standard:
https://dom.spec.whatwg.org/#dom-addeventlis
8 matches
Mail list logo