mirror of
https://github.com/servo/servo
synced 2026-04-29 02:47:55 +02:00
25 lines
588 B
HTML
25 lines
588 B
HTML
<!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> |