Skip to content

Commit

Permalink
Fix Touch Event Constructor
Browse files Browse the repository at this point in the history
  • Loading branch information
YuichiNukiyama committed Apr 2, 2017
1 parent 537df01 commit 9680396
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 1 deletion.
8 changes: 7 additions & 1 deletion baselines/dom.generated.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11770,7 +11770,7 @@ interface TouchEvent extends UIEvent {

declare var TouchEvent: {
prototype: TouchEvent;
new(): TouchEvent;
new(type: string, touchEventInit?: TouchEventInit): TouchEvent;
}

interface TouchList {
Expand Down Expand Up @@ -14187,6 +14187,12 @@ interface AddEventListenerOptions extends EventListenerOptions {
once?: boolean;
}

interface TouchEventInit extends EventModifierInit {
touches?: Touch[];
targetTouches?: Touch[];
changedTouches?: Touch[];
}

declare type EventListenerOrEventListenerObject = EventListener | EventListenerObject;

interface ErrorEventHandler {
Expand Down
16 changes: 16 additions & 0 deletions inputfiles/addedTypes.json
Original file line number Diff line number Diff line change
Expand Up @@ -1600,5 +1600,21 @@
"name": "once?",
"type": "boolean"
}]
},
{
"kind": "interface",
"name": "TouchEventInit",
"flavor": "Web",
"extends": "EventModifierInit",
"properties": [{
"name": "touches?",
"type": "Touch[]"
}, {
"name": "targetTouches?",
"type": "Touch[]"
}, {
"name": "changedTouches?",
"type": "Touch[]"
}]
}
]
7 changes: 7 additions & 0 deletions inputfiles/overridingTypes.json
Original file line number Diff line number Diff line change
Expand Up @@ -1059,5 +1059,12 @@
"interface": "EventTarget",
"name": "removeEventListener",
"signatures": ["removeEventListener(type: string, listener?: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void"]
},
{
"kind": "constructor",
"interface": "TouchEvent",
"signatures": [
"new(type: string, touchEventInit?: TouchEventInit): TouchEvent"
]
}
]

0 comments on commit 9680396

Please sign in to comment.