File tree Expand file tree Collapse file tree 3 files changed +18
-23
lines changed Expand file tree Collapse file tree 3 files changed +18
-23
lines changed Original file line number Diff line number Diff line change 38
38
}
39
39
}
40
40
},
41
- "GlobalEventHandlers" : {
42
- "properties" : {
43
- "property" : {
44
- "onerror" : {
45
- "overrideType" : " OnErrorEventHandler"
46
- },
47
- "ontouchcancel" : {
48
- "optional" : true
49
- },
50
- "ontouchend" : {
51
- "optional" : true
52
- },
53
- "ontouchmove" : {
54
- "optional" : true
55
- },
56
- "ontouchstart" : {
57
- "optional" : true
58
- }
59
- }
60
- }
61
- },
62
41
"HTMLOrSVGElement" : {
63
42
"properties" : {
64
43
"property" : {
Original file line number Diff line number Diff line change
1
+ interface-mixin GlobalEventHandlers {
2
+ property ontouchcancel optional= #true
3
+ property ontouchend optional= #true
4
+ property ontouchmove optional= #true
5
+ property ontouchstart optional= #true
6
+ property onerror overrideType= OnErrorEventHandler
7
+ }
Original file line number Diff line number Diff line change @@ -119,10 +119,19 @@ function handleEvent(child: Node): Event {
119
119
* @param child The child node to handle.
120
120
*/
121
121
function handleProperty ( child : Node ) : Partial < Property > {
122
- return {
122
+ const result : Partial < Property > = {
123
123
name : child . values [ 0 ] as string ,
124
- exposed : child . properties ?. exposed as string ,
125
124
} ;
125
+
126
+ const props : ( keyof Property ) [ ] = [ "exposed" , "optional" , "overrideType" ] ;
127
+
128
+ props . forEach ( ( prop ) => {
129
+ const value = child . properties [ prop ] ;
130
+ if ( value !== undefined ) {
131
+ result [ prop ] = value as any ;
132
+ }
133
+ } ) ;
134
+ return result ;
126
135
}
127
136
128
137
/**
You can’t perform that action at this time.
0 commit comments