2 <script src=
"../editing.js"></script>
7 event
.clipboardData
.setData('text/plain', "SUCCESS");
8 event
.preventDefault();
11 function mypaste(event
)
13 var clip
= event
.clipboardData
.getData('text/plain');
14 document
.getElementById('result').innerHTML
= clip
;
15 event
.preventDefault();
21 var e
= document
.getElementById('result');
22 setSelectionCommand(e
, 0, e
, 0);
25 if (window
.testRunner
)
26 testRunner
.dumpAsText();
30 <body onload='test()' onbeforecopy='event.preventDefault()' oncopy='mycopy(event)' onbeforepaste='event.preventDefault()' onpaste='mypaste(event)'
>
32 <div id='result' contenteditable='true'
>FAILURE
</div>