[iOS DnD] Upstream iOS drag and drop implementation into OpenSource WebKit
[WebKit.git] / Tools / TestWebKitAPI / Tests / WebKit2Cocoa / prevent-start.html
1 <head>
2     <meta name="viewport" content="width=device-width">
3         <style>
4         body {
5             width: 100%;
6             height: 100%;
7             margin: 0;
8         }
9
10         a, #editor {
11             width: 100%;
12             height: 200px;
13             font-size: 200px;
14             white-space: nowrap;
15         }
16
17         #editor {
18             border: black 1px solid;
19         }
20         </style>
21 </head>
22
23 <body>
24     <div><a ondragstart="return false" href="https://www.apple.com">Hello world</a></div>
25     <div><textarea id="editor"></textarea></div>
26     <script>
27     function postEventType(event) {
28         webkit.messageHandlers.testHandler.postMessage(event.type);
29     }
30
31     editor.addEventListener("drop", postEventType);
32     editor.addEventListener("dragenter", postEventType);
33     editor.addEventListener("dragover", postEventType);
34     editor.addEventListener("dragleave", postEventType);
35     editor.addEventListener("dragstart", postEventType);
36     </script>
37 </body>