summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/html/editing/dnd/cross-document/002.html
blob: 7b48d3e16ecfd361a4649855e4025d36c02acca2 (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>
<title>drag &amp; drop - cross-domain cross-document data drop</title>
<script src="../resources/crossorigin.js"></script>
<style>
  body > div {
    height: 200px;
    width: 200px;
    background-color: orange;
  }
</style>

<script>
window.onload = function() {
  var orange = document.getElementsByTagName('div')[0];
  orange.ondragstart = function(e) {
    e.dataTransfer.effectAllowed = 'copy';
		e.dataTransfer.setData('text', 'dummy text');
  };
};
</script>

<div draggable="true"></div>
<p><iframe height="300" width="500"></iframe></p>
<script>document.getElementsByTagName("iframe")[0].src = crossOriginUrl("www", "001-1.html");
<noscript><p>Enable JavaScript and reload</p></noscript>