mirror of
https://github.com/angular/angular.git
synced 2026-09-14 13:54:52 +08:00
feat(core): triggerEventHandler accept optional eventObj (#45279)
Close #44724 `DebugNode.triggerEventHandler()` should accept the `eventObj` as an optional parameter. So the user don't have to write code like ``` elem.triggerEventHandler('click', null); ``` PR Close #45279
This commit is contained in:
committed by
Andrew Scott
parent
89d71b545e
commit
225e4f2dbe
@@ -343,7 +343,7 @@ export class DebugElement extends DebugNode {
|
||||
*
|
||||
* @see [Testing components scenarios](guide/testing-components-scenarios#trigger-event-handler)
|
||||
*/
|
||||
triggerEventHandler(eventName: string, eventObj: any): void {
|
||||
triggerEventHandler(eventName: string, eventObj?: any): void {
|
||||
const node = this.nativeNode as any;
|
||||
const invokedListeners: Function[] = [];
|
||||
|
||||
|
||||
Reference in New Issue
Block a user