@microsoft/fast-element > AttributeDefinition
AttributeDefinition class
An implementation of Accessor that supports reactivity, change callbacks, attribute reflection, and type conversion for custom elements.
Signature:export declare class AttributeDefinition implements Accessor
Constructors
Constructor | Modifiers | Description |
---|---|---|
(constructor)(Owner, name, attribute, mode, converter) | Creates an instance of AttributeDefinition. |
Properties
Property | Modifiers | Type | Description |
---|---|---|---|
attribute | string | The name of the attribute in HTML. | |
converter | ValueConverter | A ValueConverter that integrates with the property getter/setter to convert values to and from a DOM string. | |
mode | AttributeMode | The AttributeMode that describes the behavior of this attribute. | |
name | string | The name of the property associated with the attribute. | |
Owner | Function | The class constructor that owns this attribute. |
Methods
Method | Modifiers | Description |
---|---|---|
getValue(source) | Gets the value of the attribute/property on the source element. | |
setValue(source, newValue) | Sets the value of the attribute/property on the source element. |