an html parser written in javascript