Defensive Coding for JavaScript and HTML5