Added document as an option

The html string of the url can be passed as an option on init