summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/html/editing/dnd/events/031-1.html
blob: b70082ba21eadf6c5f4d827afb1c090a0eb7a444 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
<!doctype html>
<html>
  <head>
    <title>Non-rendered body should still become current target element</title>
    <style type="text/css">
html { background: blue; }
    </style>
  </head>
  <body>

    <script type="text/javascript">
var seentypes = {};
document.body.ondragenter = document.body.ondragover = document.body.ondrop = function (e) {
  e.preventDefault();
  //document.body.innerHTML += e.type;
  if( e.type == 'drop' ) {
    document.body.innerHTML = ( seentypes.dragenter && seentypes.dragover ) ? 'PASS' : 'FAIL';
  } else {
    seentypes[e.type] = true;
  }
}
    </script>

  </body>
</html>