summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/html/editing/dnd/events/031-1.html
blob: 1574c590471728ee9703254d6c3e28897f0ceb91 (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>