Adding Link.document support, but changing the signature of asHtml