Re: [webkit-dev] JS bindings: Adding EventTarget to the prototype chain

2011-08-06 Thread Dominic Cooney
Thread necromancy! To summarize the original post: Currently WebKit’s JS binding implements EventTarget as a mixin—all event targets have addEventListener, removeEventListener and dispatchEvent methods. I propose WebKit put EventTarget on the prototype chain. There were two basic questions in

Re: [webkit-dev] JS bindings: Adding EventTarget to the prototype chain

2011-06-09 Thread Sam Weinig
I don't think we should do this. EventTarget is really just an abstract interface, and changing its implementation globally is of limited utility. -Sam On Jun 8, 2011, at 5:54 PM, Dominic Cooney wrote: [If you don't care about JSC or V8 bindings you can safely ignore this.] TL;DR I want

Re: [webkit-dev] JS bindings: Adding EventTarget to the prototype chain

2011-06-09 Thread Maciej Stachowiak
I don't have a personal opinion on which way is technically better myself. But I think the key is getting our code aligned with where standards are going, wether by changing he code or the standards. EventTarget in the prototype chain seems neither especially awesome nor especially terrible to

[webkit-dev] JS bindings: Adding EventTarget to the prototype chain

2011-06-08 Thread Dominic Cooney
[If you don't care about JSC or V8 bindings you can safely ignore this.] TL;DR I want to change the JavaScript bindings to put EventTarget on the prototype chain so it is easier to work with event targets from JavaScript. What do you think? Here is the prototype chain for a button today: