This commit is contained in:
Ilya Kantor 2017-10-14 23:52:37 +03:00
parent de725bd171
commit 217eb0e5fa
2 changed files with 6 additions and 4 deletions

View file

@ -2,7 +2,9 @@
form.onclick = function(event) {
event.target.style.backgroundColor = 'yellow';
alert("target = " + event.target.tagName + ", this=" + this.tagName);
event.target.style.backgroundColor = '';
// chrome needs some time to paint yellow
setTimeout(() => {
alert("target = " + event.target.tagName + ", this=" + this.tagName);
event.target.style.backgroundColor = ''
}, 0);
};