- From: Anne van Kesteren <annevk@opera.com>
- Date: Mon, 21 Nov 2011 14:36:54 +0100
- To: public-script-coord <public-script-coord@w3.org>, "Marcos Caceres" <marcosscaceres@gmail.com>
On Fri, 18 Nov 2011 18:46:19 +0100, Marcos Caceres <marcosscaceres@gmail.com> wrote: > Had the following discussion on IRC, but wanted to follow up hereā¦. See > if we can come to some agreement or leave it as is. > > [[ > 1:46 Marcos > In WebIDL, can you please add Function as a type. More specs are going > to make use of it and it would be good not to have a dependency on HTML5 > (or having to copy and paste it all the time from HTML5 to break the > depedency). > Seehttp://www.whatwg.org/specs/web-apps/current-work/#function > Also, HTML5 can then just point to WebiIDL for the definition of Function > > > 2:02 anne > if you want it for event listeners > you are stuck > because you cannot define event handlers (did not mean listeners) with > just Function > ]] Basically, you cannot just look at the interfaces here. If you look at the definition of event handler attributes you will notice that you need to reference those if you want to define your own event handler attribute. We have thought of moving this definition over to the DOM, but there are some parts that are sort of intertwined with higher-level aspects, such as the mouseover even type and the BeforeUnloadEvent interface. (Although whether those are supposed to happen for all such events or only "trusted events" is unclear I just realize.) The other issue is the dependency on "form owner" when setting to determine the lexical scope. And potentially the "onerror" special casing but there should be some way to abstract that out. Not sure it will get any prettier though and whether there will be any "win" if we do that. -- Anne van Kesteren http://annevankesteren.nl/
Received on Monday, 21 November 2011 13:37:35 UTC