blob: 22adda8720fc0476198fd39b6c31e2d8fae8d38f (
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
|
<?xml version="1.0" encoding="utf-8"?>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Canvas drag and drop: helper file</title>
<style type="text/css">
div
{width:20px;
height:20px;
background-color:green;}
body
/* Center the div in this iframe since we know the iframe size (it's fixed
* in the parent page to 'width:150px; height:150px;') */
{margin-top:65px;
margin-left:65px;}
</style>
<script type="application/ecmascript">
function start(event)
{event.dataTransfer.effectAllowed = 'copy';
event.dataTransfer.setData('text/plain', 'green');}
</script>
</head>
<body>
<div draggable="true" ondragstart="start(event)"/>
</body>
</html>
|