tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

023.xhtml (860B)


      1 <?xml version="1.0" encoding="utf-8"?>
      2 <html xmlns="http://www.w3.org/1999/xhtml">
      3 <head>
      4 <title>Dragging selection from SVG textArea to XHTML element</title>
      5 <style type="text/css">
      6 div[ondragenter]
      7  {width:300px;
      8  height:100px;
      9  margin-top:20px;
     10  padding:10px;
     11  color:white;
     12  background-color:navy;}
     13 </style>
     14 </head>
     15 <body>
     16 <svg xmlns="http://www.w3.org/2000/svg" version="1.1" width="500px" height="100px" viewBox="0 0 500 100">
     17 <textArea x="10" y="10" width="480" height="90" font-size="20">Select part of this text and drag selection to the box below.
     18 Content of selection should be copied once it's dropped in the box.</textArea>
     19 </svg>
     20 <div
     21  ondragenter="event.preventDefault()"
     22  ondragover="return false"
     23  ondrop="document.querySelector('div').appendChild(document.createTextNode(event.dataTransfer.getData('text/plain')))"
     24 />
     25 </body>
     26 </html>