Added document as an option to allow passing the url html. Added specs for the new option