3 <script src=
"../../resources/js-test.js"></script>
6 <p>The support of click() method on HTMLElement.
</p>
7 <div id=
"console"></div>
10 function clickHandler(event
) {
14 function runTests(tagName
) {
16 var element
= document
.createElement(tagName
);
17 element
.addEventListener('click', clickHandler
, false);
21 debug("Pass: Click event handler called for: " + tagName
);
23 debug("Pass: Click event handler wasn't called for: " + tagName
);
26 var tagNames
= ["a","abbr","acronym","address","applet","area","article","aside","audio","b","base","basefont","bdo","bgsound","big","blockquote",
27 "body","br","button","canvas","caption","center","cite","code","col","colgroup","command","datalist","dd","del","details","dfn","dir","div","dl","dt",
28 "em","embed","fieldset","figcaption","figure","font","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html",
29 "i","iframe","img","input","ins","isindex","kbd","keygen","label","layer","legend","li","link","listing","main","map","mark","marquee","menu","meta","meter","nav",
30 "nobr","noembed","noframes","nolayer","noscript","object","ol","optgroup","option","output","p","param","plaintext","pre","progress","q","rp","rt","ruby","s",
31 "samp","script","section","select","small","source","span","strike","strong","style","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead",
32 "title","tr","track","tt","u","ul","var","video","wbr","xmp"];
34 for (var i
=0 ; i
< tagNames
.length
; i
++)
35 runTests(tagNames
[i
]);