| <html> |
| <head> |
| <script> |
| |
| function keyevent(event) { |
| var p = document.createElement("p"); |
| p.appendChild(document.createTextNode(event.type + " - key: " + event.keyIdentifier + "@" + event.keyLocation + " (keyCode/charCode: " + event.keyCode + "/" + event.charCode + ")" + " modifiers: " + event.ctrlKey + "," + event.altKey + "," + event.shiftKey + "," + event.metaKey)); |
| document.getElementById("result").appendChild(p); |
| } |
| |
| function init() { |
| var input = document.getElementById("testinput"); |
| input.addEventListener("keydown", keyevent, true); |
| input.addEventListener("keypress", keyevent, true); |
| input.addEventListener("keyup", keyevent, true); |
| |
| if (layoutTestController) |
| layoutTestController.dumpAsText(); |
| |
| if (eventSender) |
| eventSender.fireKeyboardEventsToElement(input); |
| } |
| </script> |
| </head> |
| <body onload="init()"> |
| <form> |
| <input type="text" size="50" id="testinput" /> |
| </form> |
| |
| <p>This tests that DOMKeyboardEvents are created correctly in the ObjC API. See bug <a href="http://bugzilla.opendarwin.org/show_bug.cgi?id=9736">9736</a>.</p> |
| |
| <div id="result"></div> |
| </body> |
| </html> |