| <html> |
| <head> |
| <script> |
| function test() { |
| if (window.testRunner) |
| testRunner.dumpAsText(); |
| document.getElementById('a').click(); |
| } |
| function OnClick() { |
| document.getElementById('b').innerHTML = "Hooray! All is well!"; |
| } |
| </script> |
| </head> |
| <body onload="test()"> |
| <p>This tests whether an element's onclick attribute can be a function |
| named "OnClick". Some older versions of WebKit had a bug in the DOM |
| binding for Element that would prevent the function from being called |
| because we have an attribute of the same name.</p> |
| <input id="a" type="button" onclick="OnClick();" value="Don't Touch"> |
| <p id="b">If you can read this, then the test failed!</p> |
| </body> |
| </html> |