---
title: "Document | JavaScript maps SDK"
description: "Documentation for MapTiler SDK"
---

> For AI agents: a documentation index is available at [/llms.txt](https://docs.maptiler.com/llms.txt). Markdown versions of all pages are available by appending .md to any URL.

# Variable Document

Document: {  
    prototype: [Document](https://docs.maptiler.com/sdk-js/api-reference/interfaces/Externals.Document/);  
    parseHTMLUnsafe(html: string): [Document](https://docs.maptiler.com/sdk-js/api-reference/interfaces/Externals.Document/);  
    new (): [Document](https://docs.maptiler.com/sdk-js/api-reference/interfaces/Externals.Document/);  
}

#### Type Declaration

-   -   new (): [Document](https://docs.maptiler.com/sdk-js/api-reference/interfaces/Externals.Document/)
    -   #### Returns [Document](https://docs.maptiler.com/sdk-js/api-reference/interfaces/Externals.Document/)
        
-   ##### prototype: [Document](https://docs.maptiler.com/sdk-js/api-reference/interfaces/Externals.Document/)
    
-   ##### parseHTMLUnsafe: function
    
    -   parseHTMLUnsafe(html: string): [Document](https://docs.maptiler.com/sdk-js/api-reference/interfaces/Externals.Document/)[](#parsehtmlunsafe-1)
        
        The **`parseHTMLUnsafe()`** static method of the Document object is used to parse HTML input, optionally filtering unwanted HTML elements and attributes, in order to create a new Document instance.
        
        [MDN Reference](https://developer.mozilla.org/docs/Web/API/Document/parseHTMLUnsafe_static)
        
        #### Parameters
        
        -   html: string
        
        #### Returns [Document](https://docs.maptiler.com/sdk-js/api-reference/interfaces/Externals.Document/)
