<s>
Event	B-Language
bubbling	I-Language
is	O
a	O
type	O
of	O
DOM	B-General_Concept
event	O
propagation	O
where	O
the	O
event	O
first	O
triggers	O
on	O
the	O
innermost	O
target	O
element	O
,	O
and	O
then	O
successively	O
triggers	O
on	O
the	O
ancestors	O
(	O
parents	O
)	O
of	O
the	O
target	O
element	O
in	O
the	O
same	O
nesting	O
hierarchy	O
till	O
it	O
reaches	O
the	O
outermost	O
DOM	B-General_Concept
element	O
or	O
document	O
object	O
(	O
Provided	O
the	O
handler	O
is	O
initialized	O
)	O
.	O
</s>
<s>
Consider	O
the	B-General_Concept
DOM	I-General_Concept
structure	O
where	O
there	O
are	O
3	O
elements	O
nested	O
in	O
the	O
following	O
order	O
:	O
Element	O
1	O
(	O
Div	O
)	O
,	O
Element	O
2	O
(	O
Span	O
)	O
,	O
Element	O
3	O
(	O
Button	O
)	O
whose	O
on-click	O
handlers	O
are	O
handler1( )	O
,	O
handler2( )	O
and	O
handler3( )	O
respectively	O
.	O
</s>
<s>
When	O
the	O
Element3	O
button	O
is	O
clicked	O
,	O
an	O
event	O
handler	O
for	O
Element	O
3	O
is	O
triggered	O
first	O
,	O
then	O
event	O
bubbles	O
up	O
and	O
the	O
handler	O
for	O
immediate	O
parent	O
element	O
-	O
Element	O
2	O
is	O
called	O
,	O
followed	O
by	O
the	O
handler	O
for	O
Element	O
1	O
and	O
so	O
on	O
till	O
it	O
reaches	O
the	O
outermost	O
DOM	B-General_Concept
element	O
.	O
</s>
<s>
Most	O
of	O
the	O
browsers	O
consider	O
event	B-Language
bubbling	I-Language
as	O
the	O
default	O
way	O
of	O
event	O
propagation	O
.	O
</s>
<s>
However	O
,	O
there	O
is	O
another	O
approach	O
for	O
event	O
propagation	O
known	O
as	O
Event	O
Capturing	O
,	O
which	O
is	O
the	O
direct	O
opposite	O
of	O
event	B-Language
bubbling	I-Language
,	O
where	O
event	O
handling	O
starts	O
from	O
the	O
outermost	O
element	O
(	O
or	O
Document	O
)	O
of	O
the	B-General_Concept
DOM	I-General_Concept
structure	O
and	O
goes	O
all	O
the	O
way	O
to	O
the	O
target	O
element	O
,	O
executing	O
the	O
target	O
element	O
handler	O
last	O
in	O
order	O
.	O
</s>
<s>
All	O
the	O
event	O
handlers	O
consider	O
event	B-Language
bubbling	I-Language
as	O
the	O
default	O
way	O
of	O
event	O
handling	O
.	O
</s>
<s>
If	O
the	O
CaptureMode	O
is	O
False	O
,	O
the	O
event	O
will	O
be	O
handled	O
using	O
event	B-Language
bubbling	I-Language
.	O
</s>
<s>
If	O
a	O
user	O
does	O
n’t	O
specify	O
any	O
value	O
of	O
CaptureMode	O
argument	O
,	O
then	O
it	O
is	O
by	O
default	O
considered	O
as	O
event	B-Language
bubbling	I-Language
.	O
</s>
<s>
Most	O
of	O
the	O
browser	O
support	O
both	O
event	B-Language
bubbling	I-Language
and	O
event	O
capturing	O
(	O
Except	O
IE	O
<	O
9	O
and	O
Opera	O
<	O
7.0	O
which	O
do	O
not	O
support	O
event	O
capturing	O
)	O
.	O
</s>
<s>
It	O
returns	O
a	O
Boolean	O
value	O
True	O
or	O
False	O
depending	O
on	O
whether	O
the	O
event	O
can	O
bubble	O
up	O
to	O
the	O
parent	O
elements	O
in	O
DOM	B-General_Concept
structure	O
or	O
not	O
.	O
</s>
<s>
To	O
handle	O
cases	O
where	O
one	O
event	O
has	O
more	O
than	O
one	O
handler	O
,	O
event	B-Language
bubbling	I-Language
concept	O
can	O
be	O
implemented	O
.	O
</s>
<s>
The	O
major	O
use	O
of	O
event	B-Language
bubbling	I-Language
is	O
the	O
registration	O
of	O
default	O
functions	O
present	O
in	O
the	O
program	O
.	O
</s>
<s>
It	O
is	O
not	O
necessary	O
to	O
implement	O
event	B-Language
bubbling	I-Language
;	O
it	O
may	O
become	O
complicated	O
for	O
the	O
users	O
to	O
keep	O
track	O
of	O
the	O
actions	O
getting	O
executed	O
because	O
of	O
an	O
event	O
.	O
</s>
<s>
JavaScript	O
provides	O
the	O
following	O
methods	O
to	O
prevent	O
event	B-Language
bubbling	I-Language
:	O
</s>
<s>
In	O
the	B-General_Concept
DOM	I-General_Concept
,	O
the	O
same	O
event	O
can	O
have	O
multiple	O
independent	O
handlers	O
,	O
so	O
stopping	O
the	O
execution	O
of	O
one	O
event	O
handler	O
generally	O
does	O
n’t	O
affect	O
the	O
other	O
handlers	O
of	O
the	O
same	O
target	O
.	O
</s>
<s>
Another	O
approach	O
to	O
stop	O
event	B-Language
bubbling	I-Language
is	O
to	O
cancel	O
the	O
event	O
itself	O
,	O
however	O
this	O
prevents	O
the	O
target	O
handler	O
execution	O
as	O
well	O
.	O
</s>
