Skip welcome & menu and move to editor
Welcome to JS Bin
Load cached copy from
 
<!DOCTYPE html>
<html>
<head>
  <meta charset="utf-8">
  <title>JS Bin</title>
</head>
<body>
  <iframe src="about:blank"></iframe>
</body>
</html>
 
var iframe = document.querySelector('iframe');
function setUpIframe(){
  iframe.contentDocument.body.innerHTML = '<textarea>hello cheaters</textarea>';
  iframe.contentDocument.body.addEventListener('copy', function(){
    console.log('cheater');
    return false;
  }, false);
}
//be sure the iframe is loaded 
if(iframe.readystate === 4){
  setUpIframe();
} else {
 iframe.addEventListener('load', function(){
   setUpIframe();
 }, false);
}
Output

You can jump to the latest bin by adding /latest to your URL

Dismiss x
public
Bin info
anonymouspro
0viewers