Skip to content

Instantly share code, notes, and snippets.

@mihaisucan
Created November 17, 2010 21:01
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mihaisucan/704079 to your computer and use it in GitHub Desktop.
Save mihaisucan/704079 to your computer and use it in GitHub Desktop.
<!DOCTYPE html>
<html>
<body>
<p><button>click!</button></p>
<script type="text/javascript"><!--
(function () {
var btn = document.querySelector('button');
btn.addEventListener('click', function() {
console.log("button clicked");
}, false);
var iframe = document.createElement('iframe');
iframe.src = 'data:text/html,little iframe';
document.body.appendChild(iframe);
})();
// --></script>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment