Re: [whatwg] DOM Events Proposal: EventListenerOptions 'mayCancel' for improved scroll performance

2015-07-09 Thread Philip Jägenstedt
On Thu, Jul 9, 2015 at 3:44 PM, Rick Byers rby...@chromium.org wrote: On Thu, Jul 9, 2015 at 9:39 AM, Rick Byers rby...@chromium.org wrote: On Thu, Jul 9, 2015 at 9:05 AM, James Ross w3c-20040...@james-ross.co.uk wrote: Date: Thu, 9 Jul 2015 14:42:07 +0200 From: phil...@opera.com I

Re: [whatwg] DOM Events Proposal: EventListenerOptions 'mayCancel' for improved scroll performance

2015-07-09 Thread Anne van Kesteren
On Thu, Jul 9, 2015 at 5:15 PM, Rick Byers rby...@chromium.org wrote: I think there's a big opportunity to substantially improve scroll performance on the web in the relatively short term by doing something incremental. I.e. I'm pretty sure I can get major scroll-blocking libraries like

Re: [whatwg] DOM Events Proposal: EventListenerOptions 'mayCancel' for improved scroll performance

2015-07-09 Thread Rick Byers
On Thu, Jul 9, 2015 at 9:49 AM, Philip Jägenstedt phil...@opera.com wrote: On Thu, Jul 9, 2015 at 3:44 PM, Rick Byers rby...@chromium.org wrote: On Thu, Jul 9, 2015 at 9:39 AM, Rick Byers rby...@chromium.org wrote: On Thu, Jul 9, 2015 at 9:05 AM, James Ross

Re: [whatwg] DOM Events Proposal: EventListenerOptions 'mayCancel' for improved scroll performance

2015-07-09 Thread Anne van Kesteren
On Thu, Jul 9, 2015 at 3:58 PM, Rick Byers rby...@chromium.org wrote: I'd love to hear other ideas! Well, we have had some discussions in the past about introducing a better event API: https://gist.github.com/annevk/5238964 Maybe the time has come... (I agree with Philip that if we add this

Re: [whatwg] Proposal: Two changes to iframe@sandbox

2015-07-09 Thread Daniel Veditz
On Mon, Jul 6, 2015 at 2:47 AM, Mike West mk...@google.com wrote: I've dropped the opener/openee-disowning behavior from my proposal, and renamed the sandboxing keyword to `allow-popups-to-escape-sandbox` in https://wiki.whatwg.org/index.php?title=Iframe_sandbox_improvmentsdiff=9958oldid=9955

Re: [whatwg] DOM Events Proposal: EventListenerOptions 'mayCancel' for improved scroll performance

2015-07-09 Thread Rick Byers
On Thu, Jul 9, 2015 at 11:22 AM, Anne van Kesteren ann...@annevk.nl wrote: On Thu, Jul 9, 2015 at 5:15 PM, Rick Byers rby...@chromium.org wrote: I think there's a big opportunity to substantially improve scroll performance on the web in the relatively short term by doing something

Re: [whatwg] DOM Events Proposal: EventListenerOptions 'mayCancel' for improved scroll performance

2015-07-09 Thread Rick Byers
On Thu, Jul 9, 2015 at 11:05 AM, Anne van Kesteren ann...@annevk.nl wrote: On Thu, Jul 9, 2015 at 3:58 PM, Rick Byers rby...@chromium.org wrote: I'd love to hear other ideas! Well, we have had some discussions in the past about introducing a better event API:

Re: [whatwg] DOM Events Proposal: EventListenerOptions 'mayCancel' for improved scroll performance

2015-07-09 Thread Olli Pettay
On 07/09/2015 06:22 PM, Anne van Kesteren wrote: On Thu, Jul 9, 2015 at 5:15 PM, Rick Byers rby...@chromium.org wrote: I think there's a big opportunity to substantially improve scroll performance on the web in the relatively short term by doing something incremental. I.e. I'm pretty sure I

Re: [whatwg] DOM Events Proposal: EventListenerOptions 'mayCancel' for improved scroll performance

2015-07-09 Thread Philip Jägenstedt
On Thu, Jul 9, 2015 at 6:40 PM, Boris Zbarsky bzbar...@mit.edu wrote: On 7/9/15 8:42 AM, Philip Jägenstedt wrote: Would there be any way to feature detect support for EventListenerOptions as the third argument? Yes. You call addEventListener and pass an object that has getters for the

Re: [whatwg] DOM Events Proposal: EventListenerOptions 'mayCancel' for improved scroll performance

2015-07-09 Thread Rick Byers
On Thu, Jul 9, 2015 at 11:40 AM, Philip Jägenstedt phil...@opera.com wrote: On Thu, Jul 9, 2015 at 5:30 PM, Rick Byers rby...@chromium.org wrote: On Thu, Jul 9, 2015 at 11:22 AM, Anne van Kesteren ann...@annevk.nl wrote: On Thu, Jul 9, 2015 at 5:15 PM, Rick Byers rby...@chromium.org

Re: [whatwg] DOM Events Proposal: EventListenerOptions 'mayCancel' for improved scroll performance

2015-07-09 Thread Boris Zbarsky
On 7/9/15 8:42 AM, Philip Jägenstedt wrote: Would there be any way to feature detect support for EventListenerOptions as the third argument? Yes. You call addEventListener and pass an object that has getters for the properties you care about detecting. If those getters get invoked, the

Re: [whatwg] DOM Events Proposal: EventListenerOptions 'mayCancel' for improved scroll performance

2015-07-09 Thread Rick Byers
On Thu, Jul 9, 2015 at 12:40 PM, Boris Zbarsky bzbar...@mit.edu wrote: On 7/9/15 8:42 AM, Philip Jägenstedt wrote: Would there be any way to feature detect support for EventListenerOptions as the third argument? Yes. You call addEventListener and pass an object that has getters for the

Re: [whatwg] DOM Events Proposal: EventListenerOptions 'mayCancel' for improved scroll performance

2015-07-09 Thread Philip Jägenstedt
On Thu, Jul 9, 2015 at 5:30 PM, Rick Byers rby...@chromium.org wrote: On Thu, Jul 9, 2015 at 11:22 AM, Anne van Kesteren ann...@annevk.nl wrote: On Thu, Jul 9, 2015 at 5:15 PM, Rick Byers rby...@chromium.org wrote: I think there's a big opportunity to substantially improve scroll

Re: [whatwg] DOM Events Proposal: EventListenerOptions 'mayCancel' for improved scroll performance

2015-07-09 Thread Domenic Denicola
From: whatwg [mailto:whatwg-boun...@lists.whatwg.org] On Behalf Of Rick Byers That seems like a nice incremental compromise. Using a new name for addEventListener will help address some of the feature detection / compatiblity concerns too. Filed

Re: [whatwg] DOM Events Proposal: EventListenerOptions 'mayCancel' for improved scroll performance

2015-07-09 Thread Rick Byers
On Thu, Jul 9, 2015 at 2:21 PM, Jonas Sicking jo...@sicking.cc wrote: Speaking of that, having a new function makes it an option to let mayCancel be false by default, compat-wise at least. That's a good question regardless of which approach we take. Filed

Re: [whatwg] DOM Events Proposal: EventListenerOptions 'mayCancel' for improved scroll performance

2015-07-09 Thread Rick Byers
On Thu, Jul 9, 2015 at 2:57 PM, Rick Byers rby...@chromium.org wrote: On Thu, Jul 9, 2015 at 2:24 PM, Jonas Sicking jo...@sicking.cc wrote: On Thu, Jul 9, 2015 at 11:05 AM, Boris Zbarsky bzbar...@mit.edu wrote: On 7/9/15 1:32 PM, Rick Byers wrote: Done. How does example 2 look now?

Re: [whatwg] DOM Events Proposal: EventListenerOptions 'mayCancel' for improved scroll performance

2015-07-09 Thread Rick Byers
On Thu, Jul 9, 2015 at 2:24 PM, Jonas Sicking jo...@sicking.cc wrote: On Thu, Jul 9, 2015 at 11:05 AM, Boris Zbarsky bzbar...@mit.edu wrote: On 7/9/15 1:32 PM, Rick Byers wrote: Done. How does example 2 look now?

Re: [whatwg] DOM Events Proposal: EventListenerOptions 'mayCancel' for improved scroll performance

2015-07-09 Thread Rick Byers
On Thu, Jul 9, 2015 at 12:47 PM, Rick Byers rby...@chromium.org wrote: On Thu, Jul 9, 2015 at 12:40 PM, Boris Zbarsky bzbar...@mit.edu wrote: On 7/9/15 8:42 AM, Philip Jägenstedt wrote: Would there be any way to feature detect support for EventListenerOptions as the third argument? Yes.

Re: [whatwg] DOM Events Proposal: EventListenerOptions 'mayCancel' for improved scroll performance

2015-07-09 Thread Boris Zbarsky
On 7/9/15 1:32 PM, Rick Byers wrote: Done. How does example 2 look now? http://rbyers.github.io/EventListenerOptions/EventListenerOptions.html#example_2 Looks like it would work. Also looks kind of ugly because of the object-truthiness bit, but I'm not sure there's any way to avoid that

Re: [whatwg] DOM Events Proposal: EventListenerOptions 'mayCancel' for improved scroll performance

2015-07-09 Thread Jonas Sicking
Speaking of that, having a new function makes it an option to let mayCancel be false by default, compat-wise at least. That's a good question regardless of which approach we take. Filed https://github.com/RByers/EventListenerOptions/issues/17 I definitely think that if we're going to have

Re: [whatwg] DOM Events Proposal: EventListenerOptions 'mayCancel' for improved scroll performance

2015-07-09 Thread Jonas Sicking
On Thu, Jul 9, 2015 at 11:05 AM, Boris Zbarsky bzbar...@mit.edu wrote: On 7/9/15 1:32 PM, Rick Byers wrote: Done. How does example 2 look now? http://rbyers.github.io/EventListenerOptions/EventListenerOptions.html#example_2 Looks like it would work. Also looks kind of ugly because of the

Re: [whatwg] DOM Events Proposal: EventListenerOptions 'mayCancel' for improved scroll performance

2015-07-09 Thread Elliott Sprehn
On Thu, Jul 9, 2015 at 11:52 AM, Rick Byers rby...@chromium.org wrote: On Thu, Jul 9, 2015 at 2:21 PM, Jonas Sicking jo...@sicking.cc wrote: ... I agree 100% with this principle. Changed mayCancel to default to false:

Re: [whatwg] DOM Events Proposal: EventListenerOptions 'mayCancel' for improved scroll performance

2015-07-09 Thread Rick Byers
On Thu, Jul 9, 2015 at 2:59 PM, Elliott Sprehn espr...@chromium.org wrote: On Thu, Jul 9, 2015 at 11:52 AM, Rick Byers rby...@chromium.org wrote: On Thu, Jul 9, 2015 at 2:21 PM, Jonas Sicking jo...@sicking.cc wrote: ... I agree 100% with this principle. Changed mayCancel to default to

Re: [whatwg] DOM Events Proposal: EventListenerOptions 'mayCancel' for improved scroll performance

2015-07-09 Thread Philip Jägenstedt
On Wed, Jul 8, 2015 at 9:12 PM, Rick Byers rby...@chromium.org wrote: [Cross-posted to www-...@w3.org - please let me know if there's a better way to account for the DOM spec duality] In Chromium we've long worked hard at maximizing scroll performance, with scroll-blocking DOM events (wheel

[whatwg] FW: DOM Events Proposal: EventListenerOptions 'mayCancel' for improved scroll performance

2015-07-09 Thread James Ross
Date: Thu, 9 Jul 2015 14:42:07 +0200 From: phil...@opera.com I think this looks like a very promising approach. Would there be any way to feature detect support for EventListenerOptions as the third argument? It seems like a problem that addEventListener(type, callback, { mayCancel:

Re: [whatwg] DOM Events Proposal: EventListenerOptions 'mayCancel' for improved scroll performance

2015-07-09 Thread Rick Byers
On Thu, Jul 9, 2015 at 9:05 AM, James Ross w3c-20040...@james-ross.co.uk wrote: Date: Thu, 9 Jul 2015 14:42:07 +0200 From: phil...@opera.com I think this looks like a very promising approach. Would there be any way to feature detect support for EventListenerOptions as the third

Re: [whatwg] DOM Events Proposal: EventListenerOptions 'mayCancel' for improved scroll performance

2015-07-09 Thread Rick Byers
On Thu, Jul 9, 2015 at 9:39 AM, Rick Byers rby...@chromium.org wrote: On Thu, Jul 9, 2015 at 9:05 AM, James Ross w3c-20040...@james-ross.co.uk wrote: Date: Thu, 9 Jul 2015 14:42:07 +0200 From: phil...@opera.com I think this looks like a very promising approach. Would there be any

Re: [whatwg] DOM Events Proposal: EventListenerOptions 'mayCancel' for improved scroll performance

2015-07-09 Thread Rick Byers
On Thu, Jul 9, 2015 at 6:03 PM, Jonas Sicking jo...@sicking.cc wrote: On Thu, Jul 9, 2015 at 12:06 PM, Rick Byers rby...@chromium.org wrote: On Thu, Jul 9, 2015 at 2:57 PM, Rick Byers rby...@chromium.org wrote: On Thu, Jul 9, 2015 at 2:24 PM, Jonas Sicking jo...@sicking.cc wrote: On

Re: [whatwg] DOM Events Proposal: EventListenerOptions 'mayCancel' for improved scroll performance

2015-07-09 Thread Jonas Sicking
On Thu, Jul 9, 2015 at 12:06 PM, Rick Byers rby...@chromium.org wrote: On Thu, Jul 9, 2015 at 2:57 PM, Rick Byers rby...@chromium.org wrote: On Thu, Jul 9, 2015 at 2:24 PM, Jonas Sicking jo...@sicking.cc wrote: On Thu, Jul 9, 2015 at 11:05 AM, Boris Zbarsky bzbar...@mit.edu wrote: On