# DestinationRef

## Content

[**DsPdfJS API v9.1.3**](../README)

***

[DsPdfJS API](../globals) / DestinationRef

# Class: DestinationRef

Defines destination as reference to another destination, referenced destination
can be in Dests dictionary of PDF document or in Dests subtree of Name Tree.

## Extends

- [`DestinationBase`](DestinationBase)

## Constructors

### Constructor

> **new DestinationRef**(`om`, `name`, `nameTree?`): `DestinationRef`

Initializes a new instance of the DestinationRef class.

#### Parameters

##### om

[`ObjectManager`](ObjectManager)

[ObjectManager](ObjectManager) that controls the lifetime of the DestinationRef.

##### name

`string`

The name of referenced destination.

##### nameTree?

`boolean`

Specifies where referenced destination is in Dests dictionary of document or in Dests subtree of Name Tree.

#### Returns

`DestinationRef`

#### Overrides

`DestinationBase.constructor`

### Constructor

> **new DestinationRef**(`name`, `nameTree?`): `DestinationRef`

Initializes a new instance of the DestinationRef class.

#### Parameters

##### name

`string`

The name of referenced destination.

##### nameTree?

`boolean`

Specifies where referenced destination is in Dests dictionary of document or in Dests subtree of Name Tree.

#### Returns

`DestinationRef`

#### Overrides

`DestinationBase.constructor`

## Accessors

### id

#### Get Signature

> **get** **id**(): `number`

Gets the reference to the object.

##### Returns

`number`

#### Inherited from

[`DestinationBase`](DestinationBase).[`id`](DestinationBase#id)

***

### name

#### Get Signature

> **get** **name**(): `string`

Gets the name of referenced destination in the Dests dictionary of PDF document.

##### Returns

`string`

***

### nameTree

#### Get Signature

> **get** **nameTree**(): `boolean` \| `null`

Gets a value indicating whether this DestinationRef references 
destination in Dests dictionary of PDF document or in Dests subtree of document's Name Tree.

##### Returns

`boolean` \| `null`

***

### om

#### Get Signature

> **get** **om**(): [`ObjectManager`](ObjectManager)

Gets the owner [ObjectManager](ObjectManager) instance.

##### Returns

[`ObjectManager`](ObjectManager)

#### Inherited from

[`DestinationBase`](DestinationBase).[`om`](DestinationBase#om)

## Methods

### free()

> **free**(): `void`

Detaches the object from the [ObjectManager](ObjectManager) and deallocates its memory, if possible.

#### Returns

`void`

#### Inherited from

[`DestinationBase`](DestinationBase).[`free`](DestinationBase#free)

***

### rebind()

> **rebind**(`omTo`): `void`

Rebinds the object from the current [ObjectManager](ObjectManager) to the specified one.

#### Parameters

##### omTo

[`ObjectManager`](ObjectManager)

The new [ObjectManager](ObjectManager) for the object.

#### Returns

`void`

#### Inherited from

[`DestinationBase`](DestinationBase).[`rebind`](DestinationBase#rebind)
