Skip to main content
Version: 2.x

AttributeDefinition.(constructor)

@microsoft/fast-element > AttributeDefinition > (constructor)

AttributeDefinition.(constructor)

Creates an instance of AttributeDefinition.

Signature:

constructor(Owner: Function, name: string, attribute?: string, mode?: AttributeMode, converter?: ValueConverter);

Parameters

Parameter

Type

Description

Owner

Function

The class constructor that owns this attribute.

name

string

The name of the property associated with the attribute.

attribute

string

(Optional) The name of the attribute in HTML.

mode

AttributeMode

(Optional) The AttributeMode that describes the behavior of this attribute.

converter

ValueConverter

(Optional) A ValueConverter that integrates with the property getter/setter to convert values to and from a DOM string.