import {MethodBuilder} from 'custom-elements-builder/lib/builder/MethodBuilder.js'
MethodBuilder
Extends:
Builder → MethodBuilder
The method builder. Its goal is to provide a way to define a method.
Constructor Summary
Public Constructor | ||
public |
constructor(methName: string) |
Method Summary
Public Methods | ||
public |
build(proto: *, on: *) |
|
public |
invoke(fn: function(el: HTMLElement, args: ...*)): MethodBuilder To do something when invoked. |
|
public |
wrap(wrappers: function(el: HTMLElement, args: ...*)): MethodBuilder To do something around the invocation. |
Inherited Summary
From class Builder | ||
public |
To specify the logic of the builder. |
Public Constructors
Public Methods
public build(proto: *, on: *) source
Override:
Builder#buildParams:
Name | Type | Attribute | Description |
proto | * | ||
on | * |
public invoke(fn: function(el: HTMLElement, args: ...*)): MethodBuilder source
To do something when invoked.
Params:
Name | Type | Attribute | Description |
fn | function(el: HTMLElement, args: ...*) |
|
the method's logic |
public wrap(wrappers: function(el: HTMLElement, args: ...*)): MethodBuilder source
To do something around the invocation.
Params:
Name | Type | Attribute | Description |
wrappers | function(el: HTMLElement, args: ...*) | a set of wrappers |