HTML とバインドするイベントハンドラを定義します。
Syntax:
widget.method(name, callback);Arguments:
Name | Type | Required | Default | Description |
|---|---|---|---|---|
name | String | ○ | イベントハンドラの名前 | |
callback | Function | ○ | イベントハンドラ |
callback arguments:
Name | Type | Required | Default | Description |
|---|---|---|---|---|
event | Object | 購読したイベント |
// widgetのステートを次に進めるメソッド例
widget.method("clicked", function(event) {
console.log("clicked!!");
});