# Mixin: AttributeHolder

## domjscomp. AttributeHolder

Mixin thats adds shortcuts for attribute manipulations

### Methods

#### attr(name, value)

  Get or set attribute. If value is undefined it will return value of attribute, if not then it sets value

  ##### Parameters:

  Name | Type | Description
  --- | --- | ---
  `name` | string | name of attribute
  `value` | * | undefined | attribute value

  ##### Returns:

  Type
    * | undefined

#### data(name, value)

  Set or get data attribute.

  ##### Parameters:

  Name | Type | Description
  --- | --- | ---
  `name` | string | name of attribute
  `value` | * | undefined | attribute value

  ##### Returns:

  Type
    * | undefined

#### hasAttr(name)

  Check if attribute exists

  ##### Parameters:

  Name | Type | Description
  --- | --- | ---
  `name` | string | name of attribute

  ##### Returns:

  has / has not
  Type
    boolean

#### isProtectedAttribute(attribute)

  Check if attribute is in protected attribute list

  ##### Parameters:

  Name | Type | Description
  --- | --- | ---
  `attribute` | string | attribute name

  ##### Returns:

  is / is not
  Type
    boolean

#### prop(name, value)

  Set or get property If value is undefined it will return value of property, if not then it sets value

  ##### Parameters:

  Name | Type | Description
  --- | --- | ---
  `name` | string | name of property
  `value` | * | undefined | property value

  ##### Returns:

  Type
    * | undefined

#### removeAttr(name)

  Remove attribute

  ##### Parameters:

  Name | Type | Description
  --- | --- | ---
  `name` | string | name of attribute

#### Search results