◐ Shell
reader mode source ↗
Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
File filter
Conversations
Jump to
Diff view
Apply and reload
Show whitespace
Diff view
Apply and reload
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
</head>

<body>
A click shows both <code>event.target</code> and <code>this</code> to compare:

<form id="form">FORM
<div>DIV
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
form.onclick = function(event) {
event.target.style.backgroundColor = 'yellow';

// chrome needs some time to paint yellow
setTimeout(() => {
alert("target = " + event.target.tagName + ", this=" + this.tagName);
event.target.style.backgroundColor = ''
2 changes: 1 addition & 1 deletion 2-ui/2-events/02-bubbling-and-capturing/eventflow.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 2 additions & 2 deletions 2-ui/2-events/index.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
# Introduction to Events

An introduction to browser events, event properties and handling patterns.
Toggle all file notes Toggle all file annotations