Home Identifier Source Repository
public class | source

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

build(proto: CustomElementBuilder.context.proto, on: on)

To specify the logic of the builder.

Public Constructors

public constructor(methName: string) source

Params:

NameTypeAttributeDescription
methName string
  • nullable: false

the name of the method

Public Methods

public build(proto: *, on: *) source

Override:

Builder#build

Params:

NameTypeAttributeDescription
proto *
on *

public invoke(fn: function(el: HTMLElement, args: ...*)): MethodBuilder source

To do something when invoked.

Params:

NameTypeAttributeDescription
fn function(el: HTMLElement, args: ...*)
  • nullable: false

the method's logic

Return:

MethodBuilder

the builder

public wrap(wrappers: function(el: HTMLElement, args: ...*)): MethodBuilder source

To do something around the invocation.

Params:

NameTypeAttributeDescription
wrappers function(el: HTMLElement, args: ...*)

a set of wrappers

Return:

MethodBuilder

the builder