# HtmlDomLimitTracker

Tracks shared HTML DOM traversal node and depth limits for converter packages.

Class 

`OfficeIMO.Html`

**Namespace**

`OfficeIMO.Html`

**Assembly**

`OfficeIMO.Html`

**Source revision**

`be6c300e4ab1` with working tree changes

**Source**

[HtmlDomLimitTracker.cs:16](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.Html/Traversal/HtmlDomLimitTracker.cs#L16)

**Modifiers**

sealed

Tracks shared HTML DOM traversal node and depth limits for converter packages.

## Inheritance

- object
- HtmlDomLimitTracker

## Usage

Explore 1 API references to this type

This type appears in these public API surfaces even when no hand-authored example is attached directly to the page.

### Returned or exposed by 1

- Method [HtmlDomLimitTracker.Create](/api/html/officeimo-html-htmldomlimittracker/#method-create-nullable-system-int32-nullable-system-int32)

Filter members 

Show inherited

## Constructors

`public HtmlDomLimitTracker(int? maxHtmlNodes, int? maxHtmlDepth)` [#](#constructor-ctor-nullable-system-int32-nullable-system-int32)

[HtmlDomLimitTracker.cs:16](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.Html/Traversal/HtmlDomLimitTracker.cs#L16)

Creates a DOM traversal limit tracker.

Parameters

**maxHtmlNodes int? required**

Maximum number of traversed DOM nodes, or null for no node limit.

**maxHtmlDepth int? required**

Maximum element nesting depth, or null for no depth limit.

## Methods

`public static HtmlDomLimitTracker? Create(int? maxHtmlNodes, int? maxHtmlDepth)` [#](#method-create-nullable-system-int32-nullable-system-int32)

[HtmlDomLimitTracker.cs:28](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.Html/Traversal/HtmlDomLimitTracker.cs#L28)

Creates a tracker only when at least one DOM traversal limit is configured.

Parameters

**maxHtmlNodes int? required**

Maximum number of traversed DOM nodes, or null for no node limit.

**maxHtmlDepth int? required**

Maximum element nesting depth, or null for no depth limit.

Returns

`HtmlDomLimitTracker?` A tracker when limits are configured; otherwise null.

`public void RecordElementStart(int depth)` [#](#method-recordelementstart-int32)

[HtmlDomLimitTracker.cs:44](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.Html/Traversal/HtmlDomLimitTracker.cs#L44)

Records a traversed element start and validates its nesting depth.

Parameters

**depth int required**

One-based element nesting depth.

`public void RecordNode()` [#](#method-recordnode)

[HtmlDomLimitTracker.cs:36](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.Html/Traversal/HtmlDomLimitTracker.cs#L36)

Records a traversed text or non-element node.

## Inherited Methods

`public virtual bool Equals(object? obj)` [#](#method-equals-object)

Inherited from object

Parameters

**obj object? required**

Returns

`bool`

`public virtual int GetHashCode()` [#](#method-gethashcode)

Inherited from object

Returns

`int`

`public Type GetType()` [#](#method-gettype)

Inherited from object

Returns

`Type`

`public virtual string? ToString()` [#](#method-tostring)

Inherited from object

Returns

`string?`

<!-- PowerForge markdown artifact sha256:C5A0EFFFEA0DA19E1439F34A0B8B58B4796ADA8BE44C0D4BB673CF89BE16E340 -->
