summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/html/editing/dnd/cross-document/003.html
diff options
context:
space:
mode:
Diffstat (limited to 'testing/web-platform/tests/html/editing/dnd/cross-document/003.html')
-rw-r--r--testing/web-platform/tests/html/editing/dnd/cross-document/003.html29
1 files changed, 29 insertions, 0 deletions
diff --git a/testing/web-platform/tests/html/editing/dnd/cross-document/003.html b/testing/web-platform/tests/html/editing/dnd/cross-document/003.html
new file mode 100644
index 000000000..6b7c4d074
--- /dev/null
+++ b/testing/web-platform/tests/html/editing/dnd/cross-document/003.html
@@ -0,0 +1,29 @@
+<!DOCTYPE html>
+<title>drag &amp; drop - cross-document variable retention within event handlers</title>
+<style>
+ body > div {
+ height: 200px;
+ width: 200px;
+ background-color: orange;
+ }
+</style>
+
+<script>
+var evs = {};
+window.onload = function() {
+ var orange = document.getElementsByTagName('div')[0];
+ orange.ondragstart = function(e) {
+ e.dataTransfer.effectAllowed = 'copy';
+ e.dataTransfer.setData('text', 'dummy text');
+ evs[e.type] = {};
+ evs[e.type].dataTransfer = e.dataTransfer;
+ evs[e.type].items = e.dataTransfer.items;
+ evs[e.type].types = e.dataTransfer.types;
+ evs[e.type].files = e.dataTransfer.files;
+ };
+};
+</script>
+
+<div draggable="true"></div>
+<p><iframe src="003-1.html" height="300" width="500"></iframe></p>
+<noscript><p>Enable JavaScript and reload</p></noscript>