The documentURI read-only property of the Document interface returns the document location as a string.
documentURI
external String get documentURI;