Provides utilities for DOM manipulation

module

  DomUtil

### Hierarchy

- DomUtil

## Index

### Methods

- addClass
- getAttributes
- getStyle
- remove
- removeClass
- setAttributes
- toggleClass
- viewportSize

## Methods

### Static addClass

- addClass(el: HTMLElement, className: string): void

- - Defined in util/dom-util.ts:10

  Adds a class to a HTMLElement.

  #### Parameters

  - ##### el: HTMLElement

  - ##### className: string

  #### Returns void

### Static getAttributes

- getAttributes(el: HTMLElement): object

- - Defined in util/dom-util.ts:56

  Returns an object with all the attributes of a HTMLElement as key / value pairs.

  #### Parameters

  - ##### el: HTMLElement

  #### Returns object

### Static getStyle

- getStyle(el: HTMLElement, styleProp: string): any

- - Defined in util/dom-util.ts:77

  Get a style property of a HTMLElement.

  #### Parameters

  - ##### el: HTMLElement

  - ##### styleProp: string

  #### Returns any

  The value of the style property.

### Static remove

- remove(el: HTMLElement): void

- - Defined in util/dom-util.ts:49

  Removes a HTMLElement from the DOM.

  #### Parameters

  - ##### el: HTMLElement

  #### Returns void

### Static removeClass

- removeClass(el: HTMLElement, className: string): void

- - Defined in util/dom-util.ts:20

  Removes a class form a HTMLElement.

  #### Parameters

  - ##### el: HTMLElement

  - ##### className: string

  #### Returns void

### Static setAttributes

- setAttributes(el: HTMLElement, attributes: object): void

- - Defined in util/dom-util.ts:67

  Sets attributes of a HTMLElement.

  #### Parameters

  - ##### el: HTMLElement

  - ##### attributes: object

  #### Returns void

### Static toggleClass

- toggleClass(el: HTMLElement, className: string): void

- - Defined in util/dom-util.ts:30

  Removes a class from a HTMLElement when present, or adds it when not present.

  #### Parameters

  - ##### el: HTMLElement

  - ##### className: string

  #### Returns void

### Static viewportSize

- viewportSize(): object

- - Defined in util/dom-util.ts:110

  Returns the size of the viewport.

  #### Returns object

  - ##### height: undefined

  - ##### width: undefined