Skip to content

Instantly share code, notes, and snippets.

@gunyarakun
Last active November 28, 2018 13:49
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 gunyarakun/7d78f8beae0387a79f6b91d70e4d8b76 to your computer and use it in GitHub Desktop.
Save gunyarakun/7d78f8beae0387a79f6b91d70e4d8b76 to your computer and use it in GitHub Desktop.
<!--
<script>
alert('aaa');
</script>
-->
<html>
<head>
<title>test</title>
<script>
document.addEventListener('DOMContentLoaded', function() {
var div = document.createElement('div')
div.innerHTML = document.childNodes[0].data;
var script = div.getElementsByTagName('script')[0];
eval(script.innerHTML);
}, false);
</script>
</head>
<body>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment