OLD | NEW |
1 <body> | 1 <body> |
2 <style> | 2 <style> |
3 .blue { | 3 .blue { |
4 border: 2px solid blue; | 4 border: 2px solid blue; |
5 display: paragraph; | |
6 } | 5 } |
7 </style> | 6 </style> |
8 <div class="blue" contenteditable></div> | 7 <p class="blue" contenteditable></p> |
9 <script> | 8 <script> |
10 import "../resources/event-sender.dart" as eventSender; | 9 import "../resources/event-sender.dart" as eventSender; |
11 import "dart:sky"; | 10 import "dart:sky"; |
12 import "package:mojo/services/input_events/public/interfaces/input_key_codes.moj
om.dart"; | 11 import "package:mojo/services/input_events/public/interfaces/input_key_codes.moj
om.dart"; |
13 | 12 |
14 void main() { | 13 void main() { |
15 var control = document.querySelector('.blue'); | 14 var control = document.querySelector('.blue'); |
16 control.focus(); | 15 control.focus(); |
17 eventSender.keyDown(KeyboardCode_A); | 16 eventSender.keyDown(KeyboardCode_A); |
18 eventSender.keyDown(KeyboardCode_B); | 17 eventSender.keyDown(KeyboardCode_B); |
19 eventSender.keyDown(KeyboardCode_BACK); | 18 eventSender.keyDown(KeyboardCode_BACK); |
20 eventSender.done(); | 19 eventSender.done(); |
21 } | 20 } |
22 </script> | 21 </script> |
23 </body> | 22 </body> |
OLD | NEW |