From e7729b686325c7303614611abdcd06308db4a715 Mon Sep 17 00:00:00 2001 From: Jakub Pawlot Date: Mon, 5 Aug 2019 10:18:32 +0200 Subject: [PATCH] docs: add comment about newEvent utility function (#32001) PR Close #32001 --- .../examples/testing/src/app/hero/hero-detail.component.spec.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/aio/content/examples/testing/src/app/hero/hero-detail.component.spec.ts b/aio/content/examples/testing/src/app/hero/hero-detail.component.spec.ts index 2989c6e05a..c3fffa3449 100644 --- a/aio/content/examples/testing/src/app/hero/hero-detail.component.spec.ts +++ b/aio/content/examples/testing/src/app/hero/hero-detail.component.spec.ts @@ -206,6 +206,7 @@ function heroModuleSetup() { nameInput.value = 'quick BROWN fOx'; // dispatch a DOM event so that Angular learns of input value change. + // use newEvent utility function (not provided by Angular) for better browser compatibility nameInput.dispatchEvent(newEvent('input')); // Tell Angular to update the display binding through the title pipe