Add support for running in a browser; update documentation