Re: Callback when an event handler has been added to a custom element

2015-11-06 Thread Elliott Sprehn
On Fri, Nov 6, 2015 at 5:12 PM, Domenic Denicola wrote: > In general I would be cautious about this kind of API. Events are not > expected to have side effects, and adding listeners should not cause an > (observable) action. See e.g. > https://dom.spec.whatwg.org/#action-versus-occurance which tr

RE: Callback when an event handler has been added to a custom element

2015-11-06 Thread Domenic Denicola
In general I would be cautious about this kind of API. Events are not expected to have side effects, and adding listeners should not cause an (observable) action. See e.g. https://dom.spec.whatwg.org/#action-versus-occurance which tries to explain this in some detail. A better design in your cas

Re: Callback when an event handler has been added to a custom element

2015-11-06 Thread Jonas Sicking
On Fri, Nov 6, 2015 at 12:44 PM, Olli Pettay wrote: > On 11/06/2015 09:28 PM, Justin Fagnani wrote: >> >> You can also override addEventListener/removeEventListener on your >> element. My concern with that, and possibly an event listener change >> callback, is >> that it only works reliably for no

Re: Callback when an event handler has been added to a custom element

2015-11-06 Thread Boris Zbarsky
On 11/6/15 3:44 PM, Olli Pettay wrote: You need to override addEventListener on EventTarget, and also relevant onfoo EventHandler setters on Window and Document and *Element prototypes Are we trying to just do this best-effort, or reliably? Because this: var ifr = document.createElement("ifr

Re: Callback when an event handler has been added to a custom element

2015-11-06 Thread Justin Fagnani
On Fri, Nov 6, 2015 at 12:44 PM, Olli Pettay wrote: > On 11/06/2015 09:28 PM, Justin Fagnani wrote: > >> You can also override addEventListener/removeEventListener on your >> element. My concern with that, and possibly an event listener change >> callback, is >> that it only works reliably for no

Re: Callback when an event handler has been added to a custom element

2015-11-06 Thread Olli Pettay
On 11/06/2015 09:28 PM, Justin Fagnani wrote: You can also override addEventListener/removeEventListener on your element. My concern with that, and possibly an event listener change callback, is that it only works reliably for non-bubbling events. How even with those? One could just add capturi

Re: Callback when an event handler has been added to a custom element

2015-11-06 Thread Justin Fagnani
You can also override addEventListener/removeEventListener on your element. My concern with that, and possibly an event listener change callback, is that it only works reliably for non-bubbling events. On Thu, Nov 5, 2015 at 4:16 PM, Travis Leithead < travis.leith...@microsoft.com> wrote: > Inter

RE: [Web Components] proposing a f2f...

2015-11-06 Thread LĂ©onie Watson
Quick reminder to please complete the ballot on proposed F2F meeting times. The feeling seems to be to meet sooner rather than later, so getting a decision ASAP would probably be a good thing to do (especially for those of us with travel plans to make): https://modernballots.com/elections/agkedj