#

API Docs for: 3.10.3
Show: Inherited Protected Private Deprecated

# AttributeExtras Class

Defined in: `attribute/js/AttributeExtras.js:29`
Module: attribute-extras
Parent Module: attribute

A augmentable implementation for AttributeCore, providing less frequently used methods for Attribute management such as modifyAttrs(), removeAttr and reset()

- Index
- Methods

## Item Index

### Methods

- _getAttrCfg
- modifyAttr
- removeAttr
- reset

## Methods

### `_getAttrCfg`

(

- `name`

)
Object protected

Defined in `attribute/js/AttributeExtras.js:114`

Returns an object with the configuration properties (and value) for the given attribute. If attrName is not provided, returns the configuration properties for all attributes.

#### Parameters:

- `name` String

  Optional. The attribute name. If not provided, the method will return the configuration for all attributes.

#### Returns:

Object: The configuration properties for the given attribute, or all attributes.

### `modifyAttr`

(

- `name`
- `config`

)

Defined in `attribute/js/AttributeExtras.js:40`

Updates the configuration of an attribute which has already been added.

The properties which can be modified through this interface are limited to the following subset of attributes, which can be safely modified after a value has already been set on the attribute: readOnly, writeOnce, broadcast and getter.

#### Parameters:

- `name` String

  The name of the attribute whose configuration is to be updated.

- `config` Object

  An object with configuration property/value pairs, specifying the configuration properties to modify.

### `removeAttr`

(

- `name`

)

Defined in `attribute/js/AttributeExtras.js:79`

Removes an attribute from the host object

#### Parameters:

- `name` String

  The name of the attribute to be removed.

### `reset`

(

- `name`

)
Object chainable

Defined in `attribute/js/AttributeExtras.js:89`

Resets the attribute (or all attributes) to its initial value, as long as the attribute is not readOnly, or writeOnce.

#### Parameters:

- `name` String

  Optional. The name of the attribute to reset. If omitted, all attributes are reset.

#### Returns:

Object: A reference to the host object.