# DOMParser: DOMParser() constructor



The **`DOMParser()`** constructor creates a new [`DOMParser`](https://developer.mozilla.org/en-US/docs/Web/API/DOMParser) object. This object can be used to parse the text of a document using the `parseFromString()` method.

## Syntax

```js-nolint
new DOMParser()
```

### Parameters

None.

### Return value

A new [`DOMParser`](https://developer.mozilla.org/en-US/docs/Web/API/DOMParser) object. This object can be used to parse the text of a document using the `parseFromString()` method.

## Specifications

## Browser compatibility
