RESOLVED FIXED 162806
[iOS] Allow sequence<Touch> input in TouchEvent constructor
https://bugs.webkit.org/show_bug.cgi?id=162806
Summary [iOS] Allow sequence<Touch> input in TouchEvent constructor
Chris Dumez
Reported 2016-09-30 13:55:23 PDT
Allow sequence<Touch> input in TouchEvent constructor in addition to TouchList object. It is convenient for developers to pass arrays of Touch objects.
Attachments
Patch (4.95 KB, patch)
2016-09-30 14:46 PDT, Chris Dumez
no flags
Chris Dumez
Comment 1 2016-09-30 13:55:40 PDT
Chris Dumez
Comment 2 2016-09-30 14:46:32 PDT
Ryosuke Niwa
Comment 3 2016-09-30 15:01:10 PDT
Can't we do this by just overloading constructors instead?
Chris Dumez
Comment 4 2016-09-30 15:21:07 PDT
(In reply to comment #3) > Can't we do this by just overloading constructors instead? Not really, the constructor looks like so: dictionary TouchEventInit : EventModifierInit { TouchList touches; TouchList targetTouches; TouchList changedTouches; }; [Constructor(DOMString type, optional TouchEventInit eventInitDict)] I think the clean way (once we support union) and once we use proper constructors for event interfaces (instead of [ConstructorTemplate=Event] / [InitializedByEventConstructor]) would be: dictionary TouchEventInit : EventModifierInit { (TouchList or sequence<Touch>) touches = []; (TouchList or sequence<Touch>) targetTouches = []; (TouchList or sequence<Touch>) changedTouches = []; }; But we do not support unions just yet.
Chris Dumez
Comment 5 2016-09-30 15:24:23 PDT
Comment on attachment 290388 [details] Patch Clearing flags on attachment: 290388 Committed r206681: <http://trac.webkit.org/changeset/206681>
Chris Dumez
Comment 6 2016-09-30 15:24:29 PDT
All reviewed patches have been landed. Closing bug.
Note You need to log in before you can comment on or make changes to this bug.