import {DelegateBuilder} from 'custom-elements-builder/lib/builder/DelegateBuilder.js'
DelegateBuilder
Extends:
The delegate builder. Its goal is to provide a way to delegate methods, properties and attributes.
Constructor Summary
Public Constructor | ||
public |
constructor(fieldBuilder: PropertyBuilder | AttributeBuilder | MethodBuilder) |
Method Summary
Public Methods | ||
public |
attribute(attrName: string): DelegateBuilder To force the delegation to an attribute. |
|
public |
build(proto: *, on: *) |
|
public |
method(methName: string): DelegateBuilder To force the delegation to a method. |
|
public |
property(propName: string): DelegateBuilder To force the delegation to a property. |
|
public |
to(selector: string): DelegateBuilder The target of the delegate. |
Inherited Summary
From class Builder | ||
public |
To specify the logic of the builder. |
Public Constructors
public constructor(fieldBuilder: PropertyBuilder | AttributeBuilder | MethodBuilder) source
Params:
Name | Type | Attribute | Description |
fieldBuilder | PropertyBuilder | AttributeBuilder | MethodBuilder |
|
the field builder |
Public Methods
public attribute(attrName: string): DelegateBuilder source
To force the delegation to an attribute.
Params:
Name | Type | Attribute | Description |
attrName | string |
|
the name of the attribute |
public build(proto: *, on: *) source
Override:
Builder#buildParams:
Name | Type | Attribute | Description |
proto | * | ||
on | * |
public method(methName: string): DelegateBuilder source
To force the delegation to a method.
Params:
Name | Type | Attribute | Description |
methName | string |
|
the name of the method |
public property(propName: string): DelegateBuilder source
To force the delegation to a property.
Params:
Name | Type | Attribute | Description |
propName | string |
|
the name of the property |
public to(selector: string): DelegateBuilder source
The target of the delegate.
Params:
Name | Type | Attribute | Description |
selector | string |
|
a valid css query |