[@bigcommerce/checkout-sdk](../README.md) / DetachmentObserver

# Class: DetachmentObserver

## Table of contents

### Constructors

- [constructor](DetachmentObserver.md#constructor)

### Methods

- [ensurePresence](DetachmentObserver.md#ensurepresence)

## Constructors

### constructor

• **new DetachmentObserver**(`_mutationObserver`): [`DetachmentObserver`](DetachmentObserver.md)

#### Parameters

| Name | Type |
| :------ | :------ |
| `_mutationObserver` | [`MutationObserverFactory`](MutationObserverFactory.md) |

#### Returns

[`DetachmentObserver`](DetachmentObserver.md)

## Methods

### ensurePresence

▸ **ensurePresence**\<`T`\>(`targets`, `promise`): `Promise`\<`T`\>

#### Type parameters

| Name |
| :------ |
| `T` |

#### Parameters

| Name | Type |
| :------ | :------ |
| `targets` | `Node`[] |
| `promise` | `Promise`\<`T`\> |

#### Returns

`Promise`\<`T`\>
