import {PropertyBuilder} from 'custom-elements-builder/lib/builder/PropertyBuilder.js'
PropertyBuilder
Extends:
Builder → PropertyBuilder
Direct Subclass:
The property builder. Its goal is to provide a way to define a property.
Constructor Summary
Public Constructor | ||
public |
constructor(propName: string) |
Method Summary
Public Methods | ||
public |
getter(fn: function(el: HTMLElement): *): PropertyBuilder To set a getter function. |
|
public |
To hide the property name when using |
|
public |
To make an immutable property. |
|
public |
setter(fn: function(el: HTMLElement, value: *)): PropertyBuilder To set a setter function. |
|
public |
value(value: *): PropertyBuilder To set a default value. |
Inherited Summary
From class Builder | ||
public |
To specify the logic of the builder. |
Public Constructors
Public Methods
public getter(fn: function(el: HTMLElement): *): PropertyBuilder source
To set a getter function.
Params:
Name | Type | Attribute | Description |
fn | function(el: HTMLElement): * | the getter function |
public setter(fn: function(el: HTMLElement, value: *)): PropertyBuilder source
To set a setter function.
Params:
Name | Type | Attribute | Description |
fn | function(el: HTMLElement, value: *) | the setter function |
public value(value: *): PropertyBuilder source
To set a default value.
Params:
Name | Type | Attribute | Description |
value | * | the default value |