Last active
February 26, 2017 13:34
-
-
Save raloliver/87ec89c80458f099eed9bb032b30aef4 to your computer and use it in GitHub Desktop.
// source http://jsbin.com/xiruxov
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <!DOCTYPE html> | |
| <html> | |
| <body> | |
| <template id=t> | |
| <div>Hello World!</div> | |
| </template> | |
| <button onclick="stamp()">Stamp</button> | |
| <script> | |
| function stamp() { | |
| var node = document.importNode(document.querySelector('#t').content, true); | |
| document.body.appendChild(node); | |
| }; | |
| </script> | |
| </body> | |
| </html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment