Class: EventBinder

at.pkgs. EventBinder

イベントバインドクラス. チュートリアル: at.pkgs.EventBinder

new EventBinder(instance)

Parameters:
Name Type Argument Description
instance at.pkgs.EventBinder <optional>

インスタンス.

Since:
  • 0.1.0
Source:

Extends

Members

handlers :Function[]

バインドされたイベントハンドラの配列.

Type:
  • Function[]
Since:
  • 0.1.0
Source:

<readonly> parent :Object

親クラスのプロトタイプへの参照.

Type:
  • Object
Since:
  • 0.1.3
Inherited From:
Source:

<readonly> self :Function

コンストラクタへの参照.

Type:
  • Function
Since:
  • 0.1.0
Inherited From:
Source:

Methods

bind(handler, top) → {at.pkgs.EventBinder}

イベントハンドラを登録する.

Parameters:
Name Type Argument Description
handler at.pkgs.EventBinder~EventHandler

イベントハンドラ.

top Boolean <optional>

ハンドラを末尾でなく先頭に追加する場合はtrueを指定.

Since:
  • 0.1.0
Source:
Returns:

イベントバインダ.

Type
at.pkgs.EventBinder

clear() → {at.pkgs.EventBinder}

全てのイベントハンドラを抹消する.

Since:
  • 0.1.0
Source:
Returns:

イベントバインダ.

Type
at.pkgs.EventBinder

fire(arguments) → {at.pkgs.EventBinder}

イベントを発火(通知)する.

Parameters:
Name Type Argument Description
arguments * <repeatable>

イベントハンドラに渡す引数.

Since:
  • 0.1.0
Source:
Returns:

イベントバインダ.

Type
at.pkgs.EventBinder

immediate() → {Boolean}

指定された名称のプロパティを直接持つか取得する.

Parameters:
Name Type Description
プロパティ名. String
Since:
  • 0.1.5
Inherited From:
Source:
Returns:

持つならばtrue.

Type
Boolean

unbind(handler) → {at.pkgs.EventBinder}

イベントハンドラを抹消する.

Parameters:
Name Type Description
handler at.pkgs.EventBinder~EventHandler

イベントハンドラ.

Since:
  • 0.1.0
Source:
Returns:

イベントバインダ.

Type
at.pkgs.EventBinder

Type Definitions

EventHandler(arguments) → {Boolean}

イベントバインダで使用するイベントハンドラ.

イベント発火時の実行コンテキスト(this)にはイベントハンドラ自身が設定される.

Parameters:
Name Type Argument Description
arguments * <repeatable>

イベント発火時に与えられたパラメタ.

Since:
  • 0.1.0
Source:
Returns:

後続のイベントハンドラを実行しない場合はfalse.

Type
Boolean
Copyright (c) 2009-2014, Architector Inc., Japan.
Documentation generated by JSDoc 3.2.0 on Tue Aug 26 2014 22:27:18 GMT+0900 (JST) using the DocStrap template.