docs: add comment about newEvent utility function (#32001)

PR Close #32001
This commit is contained in:
Jakub Pawlot 2019-08-05 10:18:32 +02:00 committed by atscott
parent 0d186dda35
commit e7729b6863
1 changed files with 1 additions and 0 deletions

View File

@ -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