mirror of
https://github.com/servo/servo.git
synced 2025-08-09 23:45:35 +01:00
Update web-platform-tests to revision 0d318188757a9c996e20b82db201fd04de5aa255
This commit is contained in:
parent
b2a5225831
commit
1a81b18b9f
12321 changed files with 544385 additions and 6 deletions
|
@ -0,0 +1,19 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<title>Cross page drag and drop: helper file</title>
|
||||
<style type="text/css">
|
||||
html, body
|
||||
{height:100%;}
|
||||
</style>
|
||||
<script type="application/ecmascript">
|
||||
function addImage(event)
|
||||
{var c = document.createElement('img');
|
||||
c.setAttribute('src',event.dataTransfer.getData('text/uri-list').replace(/\r\n$/,''));
|
||||
document.querySelector('body').appendChild(c);}
|
||||
</script>
|
||||
</head>
|
||||
<body ondragenter="event.preventDefault()" ondragover="return false" ondrop="addImage(event)">
|
||||
<p>Drop canvas now, it should be copied to this page once you drop it here.</p>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,31 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<title>Canvas cross page drag and drop</title>
|
||||
<script type="application/ecmascript">
|
||||
function start(event)
|
||||
{event.dataTransfer.effectAllowed = 'copy';
|
||||
event.dataTransfer.setData('text/uri-list', document.querySelector('canvas').toDataURL('image/png'));
|
||||
window.location = '001-1.xhtml';}
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
<p>
|
||||
<canvas width="100" height="100" draggable="true" ondragstart="start(event)">Canvas</canvas>
|
||||
</p>
|
||||
<p>Drag canvas pattern. You should be redirected to the new page and be able to drop it there.</p>
|
||||
<script type="application/ecmascript">
|
||||
var canvas = document.querySelector('canvas'),
|
||||
c = canvas.getContext('2d');
|
||||
for(var x = 0; x != 50; x++)
|
||||
{c.fillStyle = (x%2 == 0)?'navy':'white';
|
||||
c.beginPath();
|
||||
c.moveTo(x,x);
|
||||
c.lineTo(100-x,x);
|
||||
c.lineTo(100-x,100-x);
|
||||
c.lineTo(x,100-x);
|
||||
c.closePath();
|
||||
c.fill();}
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,14 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<title>PNG image cross page drag and drop</title>
|
||||
<style type="text/css">
|
||||
img
|
||||
{margin:0 2px;}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<p><img ondragstart="event.dataTransfer.effectAllowed = 'copy';window.location = 'helper-drop-image-now.xhtml'" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGQAAABkCAYAAABw4pVUAAAEq0lEQVR42u1dvU4bQRAeR0RCCilSp0peIoKGB4DSXYRDlcZlFClKBI4bB/kV/AymIDwCTahiicaioEOxhCsjWVTJziyKMfYZn+9ud3bvG2mEZB13u9+nndmf2Rki7fKFXtEBbVKD9o22jB4bPaND6hm9Mjo0enevw/vfevKMfbYl/8vv4HdBUkvFALhltG2A7dN3+pur8jv53fwN/hZkjjRo3eiuAatjdJA7CcnkDOSb/G1uQ6mFzUeDagaQrvl764yEJOU22LbUymXaGrRhOt40OvJOQvLIGUkbP9GLeIn4SM9NJ+tOTVI+Jq0ubY9sVFRNxy6DIWKWmEvpQ/ByQNumI+fBEjHrZ86lT8HJV3ptGn8aDRGzxJxKHwMZFe9Mg6+jJWNCyrX0VbUc0nuj4+jJmPiWsfRZodN+ZvSoNETMjpYjwUCFfKaXpjEnpSVjQsqJYOF5ZLw1elF6MiakXAgmnpw378DegIgZUm4EGw8jA2QsIuUbvXHpM2CmljFfhfsUO5uCA0/j6AudfZV5arv6WuVHcYs+ALwqKTkvHnmLoEwr8CJW9Llts9iNwvj3plzsfeWyIRnzrq37kfIzq6naBpA5a6bzlJgOl/SMkl+rklEFgIX5k5THwTYgIdwzcP2jhM/o19KsOeoArnBS6suaqo2gQnXCJWSwXNwXB4gBMFekNBeTwSGUmiMK4yNktDhsleNaAZRrUvYWmasuQHJOSDdpdKyriEIvo9maexWC70gAIF/bKTvzzFUH4HgbJZ3HdFSw9vC6lfKHpq7X8X07AOOblK2HhLQBindC2g/9Rx+gePcj/cnqHIDoUFm1c9gjwNAy/d0kyXIAMLSYrQ8kqScAhhbH3iLJBwIwtBByTJKkBWBoIeSMJHMOwNBCyG+SdEYAQ4tTvyLJMQUwtBAyJEn8BTC0EHIHQhQSApOlzGTBqaty6jzVAhhaCOlhYahuYYitE02EHGNzURchLZItX4ChhZB9HFBpUjmgwhGuHv0feI0gBw1T3j7CgHT5jzYC5XQRsjUdSsrhjADGl7ka0EylBgRb+ySkMy9rww7A8Waududf2MH9Qh9k3CbXLsGVNh/mqrvojuEeQHI+Qmq4Fq1ndIyeruaDxAEuCWk+ncmB0z3gepubtQenMUHyGTWELJl8xk6B15CeqVAyLtPXtUICsyJnVivWs+J0dAAwbzLOkQRTk2YuKsapTQFkXqPjlDILEinnRcZ1fpXdkGo866xqnH9FNyTjz0JIQZXcuPQCAE5rqo6oMEFBl7RknBRfTg8lj5Yl48JdGT0ueIWiYIvIuHFfPg9l85LJcF42b+JTUFjysZnyVlhy2qfA0asovTo9+0JxYnWC8t0KBQXuFYrdkIy3mBj3LbeNQrejZTuqOlbcl8znGTqcfjXoM3pboqgaPhEPxda1qgcVYsRt5TanDkgISWzcV1N1hCS3jdu4dNxUDMIhlBzXysHGGspkcBtsW2pPh3fGLrZ2ya5cXHFp0qxJ6si3E68EQCpy344vQRZxO5jfye+2d/oqgHsV02Z3lvcl9QTnA+EkLZw5h9MZcY4pTvxldXj/W0+esc+25H/5HQGYon+Q5f+MwFz+8QAAAABJRU5ErkJggg==" alt="PNG circle"/></p>
|
||||
<p>Drag circle above. You should be redirected to the new page and be able to drop it there.</p>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,10 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<title>SVG image cross page drag and drop</title>
|
||||
</head>
|
||||
<body>
|
||||
<p><img ondragstart="event.dataTransfer.effectAllowed = 'copy';window.location = 'helper-drop-image-now.xhtml'" src="data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20version%3D%221.1%22%20width%3D%22100px%22%20height%3D%22100px%22%20viewBox%3D%220%200%20100%20100%22%3E%3Ccircle%20cx%3D%2250%22%20cy%3D%2250%22%20r%3D%2250%22%20fill%3D%22green%22/%3E%3C/svg%3E" alt="PNG circle"/></p>
|
||||
<p>Drag circle above. You should be redirected to the new page and be able to drop it there.</p>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,10 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<title>Text input selection cross page drag and drop</title>
|
||||
</head>
|
||||
<body onload="document.querySelector('input').select()">
|
||||
<p><input value="Drag me" ondragstart="event.dataTransfer.effectAllowed = 'copy';window.location = 'helper-drop-now.xhtml'"/></p>
|
||||
<p>Drag selected text. You should be redirected to the new page and be able to drop it there.</p>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,10 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<title>Selection cross page drag and drop</title>
|
||||
</head>
|
||||
<body onload="window.getSelection().selectAllChildren(document.querySelector('p'))">
|
||||
<p ondragstart="event.dataTransfer.effectAllowed = 'copy';window.location = 'helper-drop-now.xhtml'">Drag me</p>
|
||||
<p>Drag selected text. You should be redirected to the new page and be able to drop it there.</p>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,10 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<title>Link cross page drag and drop</title>
|
||||
</head>
|
||||
<body>
|
||||
<p><a href="data:text/plain,1" ondragstart="event.dataTransfer.effectAllowed = 'copy';window.location = 'helper-drop-link-now.xhtml'">Drag me</a></p>
|
||||
<p>Drag link above. You should be redirected to the new page and be able to drop it there.</p>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,13 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<title>Cross page drag and drop: helper file</title>
|
||||
<style type="text/css">
|
||||
html, body
|
||||
{height:100%;}
|
||||
</style>
|
||||
</head>
|
||||
<body ondragenter="event.preventDefault()" ondragover="return false" ondrop="event.preventDefault();document.querySelector('p').firstChild.nodeValue = event.dataTransfer.getData('text/plain')">
|
||||
<p>Drop box now, you should see word PASS once you drop it.</p>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,19 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<title>Cross page drag and drop with text/plain data</title>
|
||||
<style type="text/css">
|
||||
div[ondragstart]
|
||||
{width:40px;
|
||||
min-height:40px;
|
||||
margin-top:20px;
|
||||
padding:40px;
|
||||
color:white;
|
||||
background-color:navy;}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div draggable="true" ondragstart="event.dataTransfer.effectAllowed = 'copy';event.dataTransfer.setData('text/plain','PASS');window.location = '007-1.xhtml'"/>
|
||||
<p>Drag blue box. You should be redirected to the new page and be able to drop it there.</p>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,13 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<title>Cross page drag and drop: helper file</title>
|
||||
<style type="text/css">
|
||||
html, body
|
||||
{height:100%;}
|
||||
</style>
|
||||
</head>
|
||||
<body ondragenter="event.preventDefault()" ondragover="return false" ondrop="event.preventDefault();document.querySelector('p').firstChild.nodeValue = event.dataTransfer.getData('text/uri-list').substr(16,4)">
|
||||
<p>Drop box now, you should see word PASS once you drop it.</p>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,19 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<title>Cross page drag and drop with text/uri-list data</title>
|
||||
<style type="text/css">
|
||||
div[ondragstart]
|
||||
{width:40px;
|
||||
min-height:40px;
|
||||
margin-top:20px;
|
||||
padding:40px;
|
||||
color:white;
|
||||
background-color:navy;}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div draggable="true" ondragstart="event.dataTransfer.effectAllowed = 'copy';event.dataTransfer.setData('text/uri-list','data:text/plain,PASS');window.location = '008-1.xhtml'"/>
|
||||
<p>Drag blue box. You should be redirected to the new page and be able to drop it there.</p>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,13 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<title>Cross page drag and drop: helper file</title>
|
||||
<style type="text/css">
|
||||
html, body
|
||||
{height:100%;}
|
||||
</style>
|
||||
</head>
|
||||
<body ondragenter="event.preventDefault()" ondragover="window.location = 'helper-drop-link-now.xhtml'">
|
||||
<p>Don't drop link yet, you should be redirected to another page.</p>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,10 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<title>Link drag and drop through three pages</title>
|
||||
</head>
|
||||
<body>
|
||||
<p><a href="data:text/plain,1" ondragstart="event.dataTransfer.effectAllowed = 'copy';window.location = '009-1.xhtml'">Drag me</a></p>
|
||||
<p>Drag link above. You should be redirected to the new page.</p>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,27 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<title>Cross page drag and drop: helper file</title>
|
||||
<style type="text/css">
|
||||
div[ondragenter]
|
||||
{margin:200px 0 0 200px;
|
||||
width:200px;
|
||||
height:100px;
|
||||
color:white;
|
||||
background-color:navy;}
|
||||
div[ondragenter]:before
|
||||
{display:block;
|
||||
content:"";
|
||||
border-style:solid;
|
||||
position:relative;
|
||||
top:-50px;
|
||||
left:-200px;
|
||||
border-width:100px;
|
||||
border-color:transparent navy transparent transparent;}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<p>Drag link to the blue arrow but don't drop it yet. You should be returned back to start page.</p>
|
||||
<div ondragenter="event.preventDefault()" ondragover="history.go(-1)"/>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,14 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<title>Link drag and drop and history navigation roundtrip</title>
|
||||
<script type="application/ecmascript">
|
||||
function checkLink(event)
|
||||
{document.querySelector('a').firstChild.nodeValue = (event.dataTransfer.getData('text/uri-list').replace(/\r\n$/,'') == 'data:text/plain,1')?'PASS':'FAIL'}
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
<p><a href="data:text/plain,1" ondragstart="event.dataTransfer.effectAllowed = 'copy';window.location = '010-1.xhtml'" ondragenter="event.preventDefault()" ondrop="checkLink(event)" ondragover="return false">Drag me around and drop here once you return back</a></p>
|
||||
<p>Drag link around. You will be redirected to new page. When you return back drop link on itself. You should see word PASS once you drop it.</p>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,27 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<title>Cross page drag and drop: helper file</title>
|
||||
<style type="text/css">
|
||||
div[ondragenter]
|
||||
{margin:200px 0 0 200px;
|
||||
width:200px;
|
||||
height:100px;
|
||||
color:white;
|
||||
background-color:navy;}
|
||||
div[ondragenter]:before
|
||||
{display:block;
|
||||
content:"";
|
||||
border-style:solid;
|
||||
position:relative;
|
||||
top:-50px;
|
||||
left:-200px;
|
||||
border-width:100px;
|
||||
border-color:transparent navy transparent transparent;}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<p>Drag canvas to the blue arrow but don't drop it yet. You should be returned back to start page.</p>
|
||||
<div ondragenter="event.preventDefault()" ondragover="history.go(-1)"/>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,39 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<title>Canvas drag and drop and history navigation roundtrip</title>
|
||||
<style type="text/css">
|
||||
img
|
||||
{margin:0 2px;}
|
||||
</style>
|
||||
<script type="application/ecmascript">
|
||||
function addImage(event)
|
||||
{var c = document.createElement('img');
|
||||
c.setAttribute('src',event.dataTransfer.getData('text/uri-list').replace(/\r\n$/,''));
|
||||
document.querySelector('p').appendChild(c);}
|
||||
function start(event)
|
||||
{event.dataTransfer.effectAllowed = 'copy';
|
||||
event.dataTransfer.setData('text/uri-list', document.querySelector('canvas').toDataURL('image/png'));
|
||||
window.location = '011-1.xhtml'}
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
<p>
|
||||
<canvas width="100" height="100" draggable="true" ondragstart="start(event)" ondragenter="event.preventDefault()" ondragover="return false" ondrop="addImage(event)">Canvas</canvas>
|
||||
</p>
|
||||
<p>Drag canvas around. You will be redirected to new page. When you return back drop canvas on itself. It should be duplicated once you drop it.</p>
|
||||
<script type="application/ecmascript">
|
||||
var canvas = document.querySelector('canvas'),
|
||||
c = canvas.getContext('2d');
|
||||
for(var x = 0; x != 50; x++)
|
||||
{c.fillStyle = (x%2 == 0)?'navy':'white';
|
||||
c.beginPath();
|
||||
c.moveTo(x,x);
|
||||
c.lineTo(100-x,x);
|
||||
c.lineTo(100-x,100-x);
|
||||
c.lineTo(x,100-x);
|
||||
c.closePath();
|
||||
c.fill();}
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,20 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<title>PNG image drag and drop and history navigation roundtrip</title>
|
||||
<style type="text/css">
|
||||
img
|
||||
{margin:0 2px;}
|
||||
</style>
|
||||
<script type="application/ecmascript">
|
||||
function addImage(event)
|
||||
{var c = document.createElement('img');
|
||||
c.setAttribute('src',event.dataTransfer.getData('text/uri-list').replace(/\r\n$/,''));
|
||||
document.querySelector('p').appendChild(c);}
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
<p><img ondragstart="event.dataTransfer.effectAllowed = 'copy';window.location = 'helper-drag-image-dont-drop.xhtml'" ondragenter="event.preventDefault()" ondrop="addImage(event)" ondragover="return false" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGQAAABkCAYAAABw4pVUAAAEq0lEQVR42u1dvU4bQRAeR0RCCilSp0peIoKGB4DSXYRDlcZlFClKBI4bB/kV/AymIDwCTahiicaioEOxhCsjWVTJziyKMfYZn+9ud3bvG2mEZB13u9+nndmf2Rki7fKFXtEBbVKD9o22jB4bPaND6hm9Mjo0enevw/vfevKMfbYl/8vv4HdBUkvFALhltG2A7dN3+pur8jv53fwN/hZkjjRo3eiuAatjdJA7CcnkDOSb/G1uQ6mFzUeDagaQrvl764yEJOU22LbUymXaGrRhOt40OvJOQvLIGUkbP9GLeIn4SM9NJ+tOTVI+Jq0ubY9sVFRNxy6DIWKWmEvpQ/ByQNumI+fBEjHrZ86lT8HJV3ptGn8aDRGzxJxKHwMZFe9Mg6+jJWNCyrX0VbUc0nuj4+jJmPiWsfRZodN+ZvSoNETMjpYjwUCFfKaXpjEnpSVjQsqJYOF5ZLw1elF6MiakXAgmnpw378DegIgZUm4EGw8jA2QsIuUbvXHpM2CmljFfhfsUO5uCA0/j6AudfZV5arv6WuVHcYs+ALwqKTkvHnmLoEwr8CJW9Llts9iNwvj3plzsfeWyIRnzrq37kfIzq6naBpA5a6bzlJgOl/SMkl+rklEFgIX5k5THwTYgIdwzcP2jhM/o19KsOeoArnBS6suaqo2gQnXCJWSwXNwXB4gBMFekNBeTwSGUmiMK4yNktDhsleNaAZRrUvYWmasuQHJOSDdpdKyriEIvo9maexWC70gAIF/bKTvzzFUH4HgbJZ3HdFSw9vC6lfKHpq7X8X07AOOblK2HhLQBindC2g/9Rx+gePcj/cnqHIDoUFm1c9gjwNAy/d0kyXIAMLSYrQ8kqScAhhbH3iLJBwIwtBByTJKkBWBoIeSMJHMOwNBCyG+SdEYAQ4tTvyLJMQUwtBAyJEn8BTC0EHIHQhQSApOlzGTBqaty6jzVAhhaCOlhYahuYYitE02EHGNzURchLZItX4ChhZB9HFBpUjmgwhGuHv0feI0gBw1T3j7CgHT5jzYC5XQRsjUdSsrhjADGl7ka0EylBgRb+ySkMy9rww7A8Waududf2MH9Qh9k3CbXLsGVNh/mqrvojuEeQHI+Qmq4Fq1ndIyeruaDxAEuCWk+ncmB0z3gepubtQenMUHyGTWELJl8xk6B15CeqVAyLtPXtUICsyJnVivWs+J0dAAwbzLOkQRTk2YuKsapTQFkXqPjlDILEinnRcZ1fpXdkGo866xqnH9FNyTjz0JIQZXcuPQCAE5rqo6oMEFBl7RknBRfTg8lj5Yl48JdGT0ueIWiYIvIuHFfPg9l85LJcF42b+JTUFjysZnyVlhy2qfA0asovTo9+0JxYnWC8t0KBQXuFYrdkIy3mBj3LbeNQrejZTuqOlbcl8znGTqcfjXoM3pboqgaPhEPxda1qgcVYsRt5TanDkgISWzcV1N1hCS3jdu4dNxUDMIhlBzXysHGGspkcBtsW2pPh3fGLrZ2ya5cXHFp0qxJ6si3E68EQCpy344vQRZxO5jfye+2d/oqgHsV02Z3lvcl9QTnA+EkLZw5h9MZcY4pTvxldXj/W0+esc+25H/5HQGYon+Q5f+MwFz+8QAAAABJRU5ErkJggg==" alt="PNG circle"/></p>
|
||||
<p>Drag circle around. You will be redirected to new page. When you return back drop circle on itself. It should be duplicated once you drop it.</p>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,20 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<title>SVG image drag and drop and history navigation roundtrip</title>
|
||||
<style type="text/css">
|
||||
img
|
||||
{margin:0 2px;}
|
||||
</style>
|
||||
<script type="application/ecmascript">
|
||||
function addImage(event)
|
||||
{var c = document.createElement('img');
|
||||
c.setAttribute('src',event.dataTransfer.getData('text/uri-list').replace(/\r\n$/,''));
|
||||
document.querySelector('p').appendChild(c);}
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
<p><img ondragstart="event.dataTransfer.effectAllowed = 'copy';window.location = 'helper-drag-image-dont-drop.xhtml'" ondragenter="event.preventDefault()" ondrop="addImage(event)" ondragover="return false" src="data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20version%3D%221.1%22%20width%3D%22100px%22%20height%3D%22100px%22%20viewBox%3D%220%200%20100%20100%22%3E%3Ccircle%20cx%3D%2250%22%20cy%3D%2250%22%20r%3D%2250%22%20fill%3D%22green%22/%3E%3C/svg%3E" alt="SVG circle"/></p>
|
||||
<p>Drag circle around. You will be redirected to new page. When you return back drop circle on itself. It should be duplicated once you drop it.</p>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,10 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<title>Text input selection drag and drop and history navigation roundtrip</title>
|
||||
</head>
|
||||
<body onload="document.querySelector('input').select()">
|
||||
<p><input value="Drag me" ondragstart="window.location = 'helper-drag-selection-dont-drop.xhtml'" ondragenter="event.preventDefault()" ondragover="return false" ondrop="event.preventDefault();this.value = (event.dataTransfer.getData('text/plain') == 'Drag me')?'PASS':'FAIL'"/></p>
|
||||
<p>Drag selected text around. You will be redirected to new page. When you return back drop selection on itself. You should see word PASS once you drop it.</p>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,10 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<title>Selection drag and drop and history navigation roundtrip</title>
|
||||
</head>
|
||||
<body onload="window.getSelection().selectAllChildren(document.querySelector('span'))">
|
||||
<p><span ondragstart="window.location = 'helper-drag-selection-dont-drop.xhtml'" ondragenter="event.preventDefault()" ondragover="return false" ondrop="document.querySelector('span').firstChild.nodeValue = (event.dataTransfer.getData('text/plain') == 'Drag me')?'PASS':'FAIL'">Drag me</span></p>
|
||||
<p>Drag selected text around. You will be redirected to new page. When you return back drop selection on itself. You should see word PASS once you drop it.</p>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,30 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<title>Cross page drag and drop: helper file</title>
|
||||
<style type="text/css">
|
||||
p
|
||||
{border:solid medium navy;
|
||||
height:200px;
|
||||
padding:1em;
|
||||
margin:0;}
|
||||
div
|
||||
{margin:100px;
|
||||
padding:50px;}
|
||||
img
|
||||
{display:block;
|
||||
margin:1em;}
|
||||
</style>
|
||||
<script type="application/ecmascript">
|
||||
function addImage(event)
|
||||
{var c = document.createElement('img');
|
||||
c.setAttribute('src',event.dataTransfer.getData('text/uri-list').replace(/\r\n$/,''));
|
||||
document.querySelector('p').appendChild(c);}
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
<div ondragenter="window.location.reload()">
|
||||
<p ondragenter="event.stopPropagation()" dropzone="copy string:text/uri-list" ondrop="addImage(event)">Drop canvas here, it should be copied to this page once you drop it here.</p>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,31 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<title>Reload during canvas cross page drag and drop</title>
|
||||
<script type="application/ecmascript">
|
||||
function start(event)
|
||||
{event.dataTransfer.effectAllowed = 'copy';
|
||||
event.dataTransfer.setData('text/uri-list', document.querySelector('canvas').toDataURL('image/png'));
|
||||
window.location = '016-1.xhtml';}
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
<p>
|
||||
<canvas width="100" height="100" draggable="true" ondragstart="start(event)">Canvas</canvas>
|
||||
</p>
|
||||
<p>Drag canvas pattern. You should be redirected to the new page and be able to drop it there.</p>
|
||||
<script type="application/ecmascript">
|
||||
var canvas = document.querySelector('canvas'),
|
||||
c = canvas.getContext('2d');
|
||||
for(var x = 0; x != 50; x++)
|
||||
{c.fillStyle = (x%2 == 0)?'navy':'white';
|
||||
c.beginPath();
|
||||
c.moveTo(x,x);
|
||||
c.lineTo(100-x,x);
|
||||
c.lineTo(100-x,100-x);
|
||||
c.lineTo(x,100-x);
|
||||
c.closePath();
|
||||
c.fill();}
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,14 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<title>Reload during PNG image cross page drag and drop</title>
|
||||
<style type="text/css">
|
||||
img
|
||||
{margin:0 2px;}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<p><img ondragstart="event.dataTransfer.effectAllowed = 'copy';window.location = 'helper-drop-here-reload.xhtml'" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGQAAABkCAYAAABw4pVUAAAEq0lEQVR42u1dvU4bQRAeR0RCCilSp0peIoKGB4DSXYRDlcZlFClKBI4bB/kV/AymIDwCTahiicaioEOxhCsjWVTJziyKMfYZn+9ud3bvG2mEZB13u9+nndmf2Rki7fKFXtEBbVKD9o22jB4bPaND6hm9Mjo0enevw/vfevKMfbYl/8vv4HdBUkvFALhltG2A7dN3+pur8jv53fwN/hZkjjRo3eiuAatjdJA7CcnkDOSb/G1uQ6mFzUeDagaQrvl764yEJOU22LbUymXaGrRhOt40OvJOQvLIGUkbP9GLeIn4SM9NJ+tOTVI+Jq0ubY9sVFRNxy6DIWKWmEvpQ/ByQNumI+fBEjHrZ86lT8HJV3ptGn8aDRGzxJxKHwMZFe9Mg6+jJWNCyrX0VbUc0nuj4+jJmPiWsfRZodN+ZvSoNETMjpYjwUCFfKaXpjEnpSVjQsqJYOF5ZLw1elF6MiakXAgmnpw378DegIgZUm4EGw8jA2QsIuUbvXHpM2CmljFfhfsUO5uCA0/j6AudfZV5arv6WuVHcYs+ALwqKTkvHnmLoEwr8CJW9Llts9iNwvj3plzsfeWyIRnzrq37kfIzq6naBpA5a6bzlJgOl/SMkl+rklEFgIX5k5THwTYgIdwzcP2jhM/o19KsOeoArnBS6suaqo2gQnXCJWSwXNwXB4gBMFekNBeTwSGUmiMK4yNktDhsleNaAZRrUvYWmasuQHJOSDdpdKyriEIvo9maexWC70gAIF/bKTvzzFUH4HgbJZ3HdFSw9vC6lfKHpq7X8X07AOOblK2HhLQBindC2g/9Rx+gePcj/cnqHIDoUFm1c9gjwNAy/d0kyXIAMLSYrQ8kqScAhhbH3iLJBwIwtBByTJKkBWBoIeSMJHMOwNBCyG+SdEYAQ4tTvyLJMQUwtBAyJEn8BTC0EHIHQhQSApOlzGTBqaty6jzVAhhaCOlhYahuYYitE02EHGNzURchLZItX4ChhZB9HFBpUjmgwhGuHv0feI0gBw1T3j7CgHT5jzYC5XQRsjUdSsrhjADGl7ka0EylBgRb+ySkMy9rww7A8Waududf2MH9Qh9k3CbXLsGVNh/mqrvojuEeQHI+Qmq4Fq1ndIyeruaDxAEuCWk+ncmB0z3gepubtQenMUHyGTWELJl8xk6B15CeqVAyLtPXtUICsyJnVivWs+J0dAAwbzLOkQRTk2YuKsapTQFkXqPjlDILEinnRcZ1fpXdkGo866xqnH9FNyTjz0JIQZXcuPQCAE5rqo6oMEFBl7RknBRfTg8lj5Yl48JdGT0ueIWiYIvIuHFfPg9l85LJcF42b+JTUFjysZnyVlhy2qfA0asovTo9+0JxYnWC8t0KBQXuFYrdkIy3mBj3LbeNQrejZTuqOlbcl8znGTqcfjXoM3pboqgaPhEPxda1qgcVYsRt5TanDkgISWzcV1N1hCS3jdu4dNxUDMIhlBzXysHGGspkcBtsW2pPh3fGLrZ2ya5cXHFp0qxJ6si3E68EQCpy344vQRZxO5jfye+2d/oqgHsV02Z3lvcl9QTnA+EkLZw5h9MZcY4pTvxldXj/W0+esc+25H/5HQGYon+Q5f+MwFz+8QAAAABJRU5ErkJggg==" alt="PNG circle"/></p>
|
||||
<p>Drag circle above. You should be redirected to the new page and be able to drop it there.</p>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,10 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<title>Reload during SVG image cross page drag and drop</title>
|
||||
</head>
|
||||
<body>
|
||||
<p><img ondragstart="event.dataTransfer.effectAllowed = 'copy';window.location = 'helper-drop-here-reload.xhtml'" src="data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20version%3D%221.1%22%20width%3D%22100px%22%20height%3D%22100px%22%20viewBox%3D%220%200%20100%20100%22%3E%3Ccircle%20cx%3D%2250%22%20cy%3D%2250%22%20r%3D%2250%22%20fill%3D%22green%22/%3E%3C/svg%3E" alt="PNG circle"/></p>
|
||||
<p>Drag circle above. You should be redirected to the new page and be able to drop it there.</p>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,10 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<title>Reload during text input selection cross page drag and drop</title>
|
||||
</head>
|
||||
<body onload="document.querySelector('input').select()">
|
||||
<p><input value="Drag me" ondragstart="event.dataTransfer.effectAllowed = 'copy';window.location = 'helper-drop-selection-here.xhtml'"/></p>
|
||||
<p>Drag selected text. You should be redirected to the new page and be able to drop it there.</p>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,10 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<title>Reload during selection cross page drag and drop</title>
|
||||
</head>
|
||||
<body onload="window.getSelection().selectAllChildren(document.querySelector('p'))">
|
||||
<p ondragstart="event.dataTransfer.effectAllowed = 'copy';window.location = 'helper-drop-selection-here.xhtml'">Drag me</p>
|
||||
<p>Drag selected text. You should be redirected to the new page and be able to drop it there.</p>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,25 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<title>Cross page drag and drop: helper file</title>
|
||||
<style type="text/css">
|
||||
p
|
||||
{border:solid medium navy;
|
||||
height:200px;
|
||||
padding:1em;
|
||||
margin:0;}
|
||||
div
|
||||
{margin:100px;
|
||||
padding:50px;}
|
||||
</style>
|
||||
<script type="application/ecmascript">
|
||||
function checkLink(event)
|
||||
{document.querySelector('p').firstChild.nodeValue = (event.dataTransfer.getData('text/uri-list').replace(/\r\n$/,'') == 'data:text/plain,1')?'PASS':'FAIL'}
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
<div ondragenter="window.location.reload()">
|
||||
<p ondragenter="event.stopPropagation()" dropzone="copy string:text/uri-list" ondrop="checkLink(event)">Drop link here, you should see word PASS once you drop it.</p>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,10 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<title>Reload during link cross page drag and drop</title>
|
||||
</head>
|
||||
<body>
|
||||
<p><a href="data:text/plain,1" ondragstart="event.dataTransfer.effectAllowed = 'copy';window.location = '021-1.xhtml'">Drag me</a></p>
|
||||
<p>Drag link above. You should be redirected to the new page and be able to drop it there.</p>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,21 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<title>Cross page drag and drop: helper file</title>
|
||||
<style type="text/css">
|
||||
p
|
||||
{border:solid medium navy;
|
||||
height:200px;
|
||||
padding:1em;
|
||||
margin:0;}
|
||||
div
|
||||
{margin:100px;
|
||||
padding:50px;}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div ondragenter="window.location.reload()">
|
||||
<p ondragenter="event.stopPropagation()" dropzone="copy string:text/plain" ondrop="event.preventDefault();document.querySelector('p').firstChild.nodeValue = event.dataTransfer.getData('text/plain')">Drop box here, you should see word PASS once you drop it.</p>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,19 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<title>Reload during cross page drag and drop with text/plain data</title>
|
||||
<style type="text/css">
|
||||
div[ondragstart]
|
||||
{width:40px;
|
||||
min-height:40px;
|
||||
margin-top:20px;
|
||||
padding:40px;
|
||||
color:white;
|
||||
background-color:navy;}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div draggable="true" ondragstart="event.dataTransfer.effectAllowed = 'copy';event.dataTransfer.setData('text/plain','PASS');window.location = '022-1.xhtml'"/>
|
||||
<p>Drag blue box. You should be redirected to the new page and be able to drop it there.</p>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,21 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<title>Cross page drag and drop: helper file</title>
|
||||
<style type="text/css">
|
||||
p
|
||||
{border:solid medium navy;
|
||||
height:200px;
|
||||
padding:1em;
|
||||
margin:0;}
|
||||
div
|
||||
{margin:100px;
|
||||
padding:50px;}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div ondragenter="window.location.reload()">
|
||||
<p ondragenter="event.stopPropagation()" dropzone="copy string:text/uri-list" ondrop="event.preventDefault();document.querySelector('p').firstChild.nodeValue = event.dataTransfer.getData('text/uri-list').substr(16,4)">Drop box here, you should see word PASS once you drop it.</p>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,19 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<title>Reload during cross page drag and drop with text/uri-list data</title>
|
||||
<style type="text/css">
|
||||
div[ondragstart]
|
||||
{width:40px;
|
||||
min-height:40px;
|
||||
margin-top:20px;
|
||||
padding:40px;
|
||||
color:white;
|
||||
background-color:navy;}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div draggable="true" ondragstart="event.dataTransfer.effectAllowed = 'copy';event.dataTransfer.setData('text/uri-list','data:text/plain,PASS');window.location = '023-1.xhtml'"/>
|
||||
<p>Drag blue box. You should be redirected to the new page and be able to drop it there.</p>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,27 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<title>Cross page drag and drop: helper file</title>
|
||||
<style type="text/css">
|
||||
div[ondragenter]
|
||||
{margin:200px 0 0 200px;
|
||||
width:200px;
|
||||
height:100px;
|
||||
color:white;
|
||||
background-color:navy;}
|
||||
div[ondragenter]:before
|
||||
{display:block;
|
||||
content:"";
|
||||
border-style:solid;
|
||||
position:relative;
|
||||
top:-50px;
|
||||
left:-200px;
|
||||
border-width:100px;
|
||||
border-color:transparent navy transparent transparent;}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<p>Drag image to the blue arrow but don't drop it yet. You should be returned back to start page.</p>
|
||||
<div ondragenter="event.preventDefault()" ondragover="history.go(-1)"/>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,27 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<title>Cross page drag and drop: helper file</title>
|
||||
<style type="text/css">
|
||||
div[ondragenter]
|
||||
{margin:200px 0 0 200px;
|
||||
width:200px;
|
||||
height:100px;
|
||||
color:white;
|
||||
background-color:navy;}
|
||||
div[ondragenter]:before
|
||||
{display:block;
|
||||
content:"";
|
||||
border-style:solid;
|
||||
position:relative;
|
||||
top:-50px;
|
||||
left:-200px;
|
||||
border-width:100px;
|
||||
border-color:transparent navy transparent transparent;}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<p>Drag selection to the blue arrow but don't drop it yet. You should be returned back to start page.</p>
|
||||
<div ondragenter="event.preventDefault()" ondragover="history.go(-1)"/>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,30 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<title>Cross page drag and drop: helper file</title>
|
||||
<style type="text/css">
|
||||
p
|
||||
{border:solid medium navy;
|
||||
height:200px;
|
||||
padding:1em;
|
||||
margin:0;}
|
||||
div
|
||||
{margin:100px;
|
||||
padding:50px;}
|
||||
img
|
||||
{display:block;
|
||||
margin:1em;}
|
||||
</style>
|
||||
<script type="application/ecmascript">
|
||||
function addImage(event)
|
||||
{var c = document.createElement('img');
|
||||
c.setAttribute('src',event.dataTransfer.getData('text/uri-list').replace(/\r\n$/,''));
|
||||
document.querySelector('p').appendChild(c);}
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
<div ondragenter="window.location.reload()">
|
||||
<p ondragenter="event.stopPropagation()" dropzone="copy string:text/uri-list" ondrop="addImage(event)">Drop image here, it should be copied to this page once you drop it here.</p>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,19 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<title>Cross page drag and drop: helper file</title>
|
||||
<style type="text/css">
|
||||
html, body
|
||||
{height:100%;}
|
||||
</style>
|
||||
<script type="application/ecmascript">
|
||||
function addImage(event)
|
||||
{var c = document.createElement('img');
|
||||
c.setAttribute('src',event.dataTransfer.getData('text/uri-list').replace(/\r\n$/,''));
|
||||
document.querySelector('body').appendChild(c);}
|
||||
</script>
|
||||
</head>
|
||||
<body ondragenter="event.preventDefault()" ondragover="return false" ondrop="addImage(event)">
|
||||
<p>Drop image now, it should be copied to this page once you drop it here.</p>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,17 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<title>Cross page drag and drop: helper file</title>
|
||||
<style type="text/css">
|
||||
html, body
|
||||
{height:100%;}
|
||||
</style>
|
||||
<script type="application/ecmascript">
|
||||
function checkLink(event)
|
||||
{document.querySelector('p').firstChild.nodeValue = (event.dataTransfer.getData('text/uri-list').replace(/\r\n$/,'') == 'data:text/plain,1')?'PASS':'FAIL'}
|
||||
</script>
|
||||
</head>
|
||||
<body ondragenter="event.preventDefault()" ondrop="checkLink(event)" ondragover="return false">
|
||||
<p>Drop link now, you should see word PASS once you drop it.</p>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,13 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<title>Cross page drag and drop: helper file</title>
|
||||
<style type="text/css">
|
||||
html, body
|
||||
{height:100%;}
|
||||
</style>
|
||||
</head>
|
||||
<body ondragenter="event.preventDefault()" ondragover="return false" ondrop="event.preventDefault();document.querySelector('p').firstChild.nodeValue = (event.dataTransfer.getData('text/plain') == 'Drag me')?'PASS':'FAIL'">
|
||||
<p>Drop selection now, you should see word PASS once you drop it.</p>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,21 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<title>Cross page drag and drop: helper file</title>
|
||||
<style type="text/css">
|
||||
p
|
||||
{border:solid medium navy;
|
||||
height:200px;
|
||||
padding:1em;
|
||||
margin:0;}
|
||||
div
|
||||
{margin:100px;
|
||||
padding:50px;}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div ondragenter="window.location.reload()">
|
||||
<p ondragenter="event.stopPropagation()" dropzone="copy string:text/plain" ondrop="document.querySelector('p').firstChild.nodeValue = (event.dataTransfer.getData('text/plain') == 'Drag me')?'PASS':'FAIL'">Drop selection here, you should see word PASS once you drop it.</p>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
Loading…
Add table
Add a link
Reference in a new issue