We would like to know how to handle DOMContentLoaded event.
<!DOCTYPE html>
<html>
<head>
<script type='text/javascript'>
document.addEventListener('DOMContentLoaded', function() {
console.log("good");
});<!-- w ww . ja v a 2s . co m-->
</script>
</head>
<body>
</body>
</html>
The code above is rendered as follows: