nx.ui.nx.dom.Element - Next UI Toolkit

#

API Docs for: trial
Show: Inherited Protected Private Deprecated

# nx.ui.nx.dom.Element Class

Extends nx.dom.Node
Module: nx.ui

Dom Element

## Constructor

### `nx.ui.nx.dom.Element`

()

- Index
- Methods

## Item Index

### Methods

- addClass
- addEventListener
- blur
- border
- focus
- get
- get
- getAttribute
- getAttributes
- getBound
- getDocument
- getHtml
- getOffset
- getRoot
- getStyle
- getText
- getWindow
- hasClass
- hasStyle
- hide
- margin
- padding
- removeAttribute
- removeClass
- removeEventListener
- removeStyle
- selectAll
- set
- setAttribute
- setAttributes
- setClass
- setHtml
- setOffset
- setStyle
- setStyles
- setText
- show
- toggleClass

## Methods

### `addClass`

()

Add class for element

#### Returns:

:

### `addEventListener`

(

- `name`
- `listener`
- `useCapture`

)

Add event listener

#### Parameters:

- `name` Object
- `listener` Object
- `useCapture` Object

### `blur`

()

Blur form an element

### `border`

(

- `inDirection`

)

Get border width information

#### Parameters:

- `inDirection` Object

#### Returns:

:

### `focus`

()

Focus an element

### `get`

(

- `name`

)

Get an attribute from element

#### Parameters:

- `name` Object

#### Returns:

:

### `get`

(

- `inSelector`

)
HTMLElement

Get an element by selector.

#### Parameters:

- `inSelector` Object

#### Returns:

HTMLElement:

### `getAttribute`

(

- `inName`

)

Get attribute

#### Parameters:

- `inName` Object

#### Returns:

:

### `getAttributes`

()

Get all attributes

#### Returns:

}

### `getBound`

() Top: number, right: Number, bottom: Number, left: number, width: Number, height: Number

Get element position information

#### Returns:

Top: number, right: Number, bottom: Number, left: number, width: Number, height: Number:

}

### `getDocument`

()

Get document

#### Returns:

:

### `getHtml`

() | String

Get inner html

#### Returns:

| String:

### `getOffset`

() Top: number, left: number

Get offset information

#### Returns:

Top: number, left: number:

}

### `getRoot`

() Element

Get root element

#### Returns:

Element:

### `getStyle`

(

- `inName`
- `isInline`

)

Get computed style

#### Parameters:

- `inName` Object
- `isInline` Object

#### Returns:

:

### `getText`

()

Get inner text

#### Returns:

:

### `getWindow`

() DocumentView | Window |

Get window

#### Returns:

DocumentView | Window | :

### `hasClass`

(

- `inClassName`

)
Boolean

Whether the element has the class

#### Parameters:

- `inClassName` Object

#### Returns:

Boolean:

### `hasStyle`

(

- `inName`

)
Boolean

Has in line style

#### Parameters:

- `inName` Object

#### Returns:

Boolean:

### `hide`

()

Hide an element

### `margin`

(

- `inDirection`

)

Get margin distance information

#### Parameters:

- `inDirection` Object

#### Returns:

:

### `padding`

(

- `inDirection`

)

Get padding distance information

#### Parameters:

- `inDirection` Object

#### Returns:

:

### `removeAttribute`

(

- `inName`

)

Remove attribute

#### Parameters:

- `inName` Object

### `removeClass`

()

Remove class from element

#### Returns:

:

### `removeEventListener`

(

- `name`
- `listener`
- `useCapture`

)

Remove event listener

#### Parameters:

- `name` Object
- `listener` Object
- `useCapture` Object

### `removeStyle`

(

- `inName`

)

Remove inline style

#### Parameters:

- `inName` Object

### `selectAll`

(

- `inSelector`

)
nx.data.Collection

Get a collection by selector

#### Parameters:

- `inSelector` Object

#### Returns:

nx.data.Collection:

### `set`

(

- `name`
- `value`

)

Set an attribute for an element

#### Parameters:

- `name` Object
- `value` Object

### `setAttribute`

(

- `inName`
- `inValue`

)

Set attribute

#### Parameters:

- `inName` Object
- `inValue` Object

#### Returns:

:

### `setAttributes`

(

- `attrs`

)

Set attributes

#### Parameters:

- `attrs` Object

### `setClass`

(

- `className`
- `has`

)

Set css class existence for element

#### Parameters:

- `className` Object

  the class name

- `has` Object

  existence

#### Returns:

:

### `setHtml`

(

- `html`

)

Set inner html

#### Parameters:

- `html` Object

### `setOffset`

(

- `inStyleObj`

)

Set offset style

#### Parameters:

- `inStyleObj` Object

### `setStyle`

(

- `inName`
- `inValue`

)

Set style for element

#### Parameters:

- `inName` Object
- `inValue` Object

### `setStyles`

(

- `inStyles`

)

Set style by style object

#### Parameters:

- `inStyles` Object

### `setText`

(

- `text`

)

Set inner text

#### Parameters:

- `text` Object

### `show`

()

Show an element

### `toggleClass`

(

- `inClassName`

)

Toggle a class on element

#### Parameters:

- `inClassName` Object

#### Returns:

: