Page - AddHandler - TestCases #15 - Cross Browers Event Stacking |
|
$Id: test_15_page_addhandler.html,v 1.16 2005/10/23 07:57:32 james Exp $
Click on the link below.
On Firefox and Safari the events fire in the order f1,f2,f4
For IE6 and Opera I get just f4.
MetaWrap.Page.Element.addEventListener(l_a1,"click",f1,true);
MetaWrap.Page.Element.addEventListener(l_a1,"click",f2,true);
l_a1.onclick = f3;
l_a1.onclick = f4;
[CLICK ME]
Click on the link below.
On Firefox the events fire in the order f4,f1,f2
For IE6, Opera and Safari I used to get f1,f2 but now that addEventListener deals with existing inline and assigned handlers (Trial tweak #1) I get f4,f1,f2.
l_a2.onclick = f3;
l_a2.onclick = f4;
MetaWrap.Page.Element.addEventListener(l_a2,"click",f1,true);
MetaWrap.Page.Element.addEventListener(l_a2,"click",f2,true);
[CLICK ME]
Click on the link below.
On Firefox and Safari the events fire in the order f1,f4,f2
For IE6 and Opera I used to just get f4, but now that addEventListener deals with existing inline and assigned handlers (Trial tweak #2) I get f1,f4,f2
MetaWrap.Page.Element.addEventListener(l_a3,"click",f1,true);
l_a3.onclick = f3;
l_a3.onclick = f4;
MetaWrap.Page.Element.addEventListener(l_a3,"click",f2,true);
[CLICK ME]
Click on the link below.
On Firefox and Opera and Netscape and IE the events fire in the order f1,f2
Safari they fire in the order f2,f1
l_a4.onclick = f1;
MetaWrap.Page.Element.addEventListener(l_a4,"click",f2,true);
[CLICK ME]
Click on the link below.
On Safari the events fire in the order f2,f1
Firefox,Mozilla and Netscape just f2 fires
l_a5.onclick = f1;
l_a5.onclick = null;
l_a5.addEventListener("click",f2,true);
[CLICK ME]