92. Event Mechanism
“This” in Event
In Javascript this always refers to the “owner” of
the function we’re executing, or rather, to the
object that a function is a method of
93. Event Mechanism
“This” in Event
In Javascript this always refers to the “owner” of
the function we’re executing, or rather, to the
object that a function is a method of
Example: Register click handler on div1
94. Event Mechanism
“This” in Event
In Javascript this always refers to the “owner” of
the function we’re executing, or rather, to the
object that a function is a method of
Example: Register click handler on div1
95. Event Mechanism
“This” in Event
In Javascript this always refers to the “owner” of
the function we’re executing, or rather, to the
object that a function is a method of
Example: Register click handler on div1
96. Event Mechanism
“This” in Event
In Javascript this always refers to the “owner” of
the function we’re executing, or rather, to the
object that a function is a method of
Example: Register click handler on div1
97. Event Mechanism
“This” in Event
In Javascript this always refers to the “owner” of
the function we’re executing, or rather, to the
object that a function is a method of
Example: Register click handler on div1
98. Event Mechanism
“This” in Event
In Javascript this always refers to the “owner” of
the function we’re executing, or rather, to the
object that a function is a method of
Example: Register click handler on div1
99. Event Mechanism
“This” in Event
In Javascript this always refers to the “owner” of
the function we’re executing, or rather, to the
object that a function is a method of
Example: Register click handler on div1
100. Event Mechanism
“This” in Event
In Javascript this always refers to the “owner” of
the function we’re executing, or rather, to the
object that a function is a method of
Example: Register click handler on div1
101. Event Mechanism
“This” in Event
In Javascript this always refers to the “owner” of
the function we’re executing, or rather, to the
object that a function is a method of
Example: Register click handler on div1
102. Event Mechanism
“This” in Event
In Javascript this always refers to the “owner” of
the function we’re executing, or rather, to the
object that a function is a method of
Example: Register click handler on div1
103. Event Mechanism
“This” in Event
In Javascript this always refers to the “owner” of
the function we’re executing, or rather, to the
object that a function is a method of
Example: Register click handler on div1
104. Event Mechanism
“This” in Event
In Javascript this always refers to the “owner” of
the function we’re executing, or rather, to the
object that a function is a method of
Example: Register click handler on div1
105. Event Mechanism
“This” in Event
In Javascript this always refers to the “owner” of
the function we’re executing, or rather, to the
object that a function is a method of
Example: Register click handler on div1
106. Event Mechanism
“This” in Event
In Javascript this always refers to the “owner” of
the function we’re executing, or rather, to the
object that a function is a method of
Example: Register click handler on div1
107. Event Mechanism
“This” in Event
In Javascript this always refers to the “owner” of
the function we’re executing, or rather, to the
object that a function is a method of
Example: Register click handler on div1