Name of the element attribute. This is always defined
Optional converter function and some other options controlling the attribute's behavior
Name of the element property. This can be undefined if the attribute definition was created
not via the @attr
decorator but either in the @webElm
decorator or in the registerWebElm
function. This can be useful if there is no need to have a property reflecting the attribute
in the custom Web elemetn class, but there is a need to be notified when the attribute's
value is changed.
Function that returns a class from which regular custom Web elements (which don't need to customize existing built-in elements) should inherit. The return class derives directly from HTMLElement.
Usage:
@mim.webElm("my-elelemnt")
class MyCustomElement extends mim.WebElm()
{
render(): any { return ... }
}
Type that maps attribute names to attribute types.
Type that maps event names (a.k.a event types) to either Event-derived
classes (e.g. MouseEvent) or any other type. The latter will be interpreted as a type of the
detail
property of a CustomEvent.
Creates and returns a new class from which custom Web elements should derive. The class returned from this function inherits from the HTMLElement-derived class specified as the parameter and implements the IComponent and IComponentEx interfaces.
Usage:
@mim.webElm("custom-button")
class MyCustomButton extends mim.WebElmEx(HTMLButtonElement)
{
render(): any { return ... }
}
Class deriving from HTMLElement, from which the resulting class will inherit.
Type that maps attribute names to attribute types.
Type that maps event names (a.k.a event types) to either Event-derived
classes (e.g. MouseEvent) or any other type. The latter will be interpreted as a type of the
detail
property of a CustomEvent.
HTMLElement-derived class from which the returned class will derive.
Class that inherits from the given HTMLElement-derived class that imlements all the internal logic of custom Web elements.
Decorates a property of custom Web Element class without providing any options. The name of the HTML attribute is set to be the name of the property.
Custom Web Element class
Property name to which the decorator was applied
Decorates a property of custom Web Element class specifying the name of the HTML attribute.
Name of HTML attribute to be reflected by the property.
Decorates a property of custom Web Element class specifying some attribute options.
Options defining attribute/property behavior.
Decorates a property of custom Web Element class specifying the name of the HTML attribute and some attribute options.
Name of HTML attribute to be reflected by the property.
Options defining attribute/property behavior.
Built-in attribute converter that converts string value to a Boolean value.
Built-in attribute converter that converts string value to a number.
Built-in attribute converter that converts string value to an integer number.
Built-in attribute converter that converts string value to a Boolean value.
Built-in converter that converts property object value to a string by using JSON.stringify.
Registers the given Web Element with optional parameters.
custom Web Element class
Name of the custom Web Element to use in HTML
Shadow DOM and form-related options
Information about the element's attributes
Decorator function for custom element components.
Name of the custom HTML element
Configuration options for the custom element.
Structure defining options that determine an attribute behavior.