new Attribute(nameParam, requiredParam, verifyParam, valueParam) → {Attribute}
An object that semi-represents an HTML attribute.
Parameters:
Name | Type | Description |
---|---|---|
nameParam |
String | The name of the attribute. |
requiredParam |
Boolean | Weather or not the attribute is required, or if an error should be thrown if it is missing. |
verifyParam |
function | A callback to be called to verify if an attribute's value is valid. |
valueParam |
String | The value of the attribute. Is undefined unless set. |
Properties:
Name | Type | Description |
---|---|---|
name |
String | The name of the attribute. |
required |
Boolean | Weather or not the attribute is required, or if an error should be thrown if it is missing. |
verify |
function | A callback to be called to verify if an attribute's value is valid. |
value |
String | The value of the attribute. Is undefined unless set. |
- Source:
Returns:
The new attribute.
- Type
- Attribute
Members
(static) verifyPresets :Object
An object of preset verification methods.
Type:
- Object
Properties:
Name | Type | Description |
---|---|---|
numbers |
function | The verification for if it is a number. |
regex |
function | The verification for if it is a valid regex. |
- Source: