コレクションでコンテンツを整理
必要に応じて、コンテンツの保存と分類を行います。
blockly > utils > browserEvents > conditionalBind
utils.browserEvents.conditionalBind() 関数
アクティブなタッチ ストリームの一部でない場合は無視できるイベント ハンドラをバインドします。マルチパート ジェスチャーの開始または継続のイベントに使用します(ドラッグやクリックの一部となる mousedown や mousemove など)。
署名:
export declare function conditionalBind(node: EventTarget, name: string, thisObject: object | null, func: Function, opt_noCaptureIdentifier?: boolean): Data;
パラメータ
パラメータ |
型 |
説明 |
ノード |
EventTarget |
リッスンするノード。 |
name |
文字列 |
リッスンするイベント名(例: mousedown)。 |
thisObject |
object | null |
関数の「this」の値。 |
func |
関数 |
イベントがトリガーされたときに呼び出す関数。 |
opt_noCaptureIdentifier |
ブール値 |
(省略可)このイベントのトリガーで、このタップまたは他の同時タップに対する他のイベント ハンドラの実行がブロックされないようにする場合は true にします。デフォルトは false です。 |
戻り値:
データ
unbindEvent_ に渡すことができる不透明データ。
特に記載のない限り、このページのコンテンツはクリエイティブ・コモンズの表示 4.0 ライセンスにより使用許諾されます。コードサンプルは Apache 2.0 ライセンスにより使用許諾されます。詳しくは、Google Developers サイトのポリシーをご覧ください。Java は Oracle および関連会社の登録商標です。
最終更新日 2025-07-25 UTC。
[null,null,["最終更新日 2025-07-25 UTC。"],[],["The `conditionalBind` function binds an event handler to a specified node. It takes the node, event name, a `this` object, the handler function, and an optional boolean to control blocking of other event handlers. When the event is triggered, the provided function is executed. This is intended for events related to multi-part gestures. It returns data used for unbinding the event later. This allows to control whether to block execution of other handlers for touches.\n"],null,[]]