Skip to content

Commit 251eaa1

Browse files
Add useCapture optional to DOM events
1 parent 5149031 commit 251eaa1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/module-declaration.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ const generateModuleDeclaration = (module, index, API) => {
102102
}
103103

104104
for (let method of ['addEventListener', 'removeEventListener']) {
105-
moduleAPI.push(`${isClass ? 'public ' : ''}${method}(event: '${domEvent.name}', listener: (event: ${eventType}) => void): this;`)
105+
moduleAPI.push(`${isClass ? 'public ' : ''}${method}(event: '${domEvent.name}', listener: (event: ${eventType}) => void${method === 'addEventListener' ? ', useCapture?: boolean' : ''}): this;`)
106106
}
107107
})
108108
}

0 commit comments

Comments
 (0)