Indicates how and whether the property becomes an observed attribute.
If the value is false
, the property is not added to observedAttributes
.
If true or absent, the lowercased property name is observed (e.g. fooBar
becomes foobar
). If a string, the string value is observed (e.g
attribute: 'foo-bar'
).
Indicates if the property should reflect to an attribute.
If true
, when the property is set, the attribute is set using the
attribute name determined according to the rules for the attribute
property option and the value of the property serialized using the rules
from the type
property option.
Indicates how to serialize and deserialize the attribute to/from a
property. If this value is a function, it is used to deserialize the
attribute value a the property value. If it's an object, it can have keys
for fromAttribute
and toAttribute
where fromAttribute
is the
deserialize function and toAttribute
is a serialize function used to set
the property to an attribute. If no toAttribute
function is provided and
reflect
is set to true
, the property value is set directly to the
attribute.
A function that indicates if a property should be considered changed when
it is set. The function should take the newValue
and oldValue
and
return true
if an update should be requested.
Generated using TypeDoc
Defines options for a property accessor.