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:
JiaLiPassion
2022-03-06 21:11:16 +09:00
committed by Andrew Scott
parent 89d71b545e
commit 225e4f2dbe
5 changed files with 10 additions and 10 deletions
+1 -1
View File
@@ -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[] = [];