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