연구 설문조사: Blockly 사용 경험을 알려주세요
설문조사 시작
컬렉션을 사용해 정리하기
내 환경설정을 기준으로 콘텐츠를 저장하고 분류하세요.
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 |
리슨할 노드입니다. |
이름 |
문자열 |
수신 대기할 이벤트 이름 (예: 'mousedown')입니다. |
thisObject |
object | null |
함수의 'this' 값입니다. |
func |
함수 |
이벤트가 트리거될 때 호출할 함수입니다. |
opt_noCaptureIdentifier |
부울 |
(선택사항) 이 이벤트에서 트리거해도 이 터치 또는 다른 동시 터치에서 다른 이벤트 핸들러의 실행이 차단되지 않아야 하는 경우 true입니다. 기본값은 false입니다. |
반환:
데이터
unbindEvent_에 전달할 수 있는 불투명 데이터입니다.
달리 명시되지 않는 한 이 페이지의 콘텐츠에는 Creative Commons Attribution 4.0 라이선스에 따라 라이선스가 부여되며, 코드 샘플에는 Apache 2.0 라이선스에 따라 라이선스가 부여됩니다. 자세한 내용은 Google Developers 사이트 정책을 참조하세요. 자바는 Oracle 및/또는 Oracle 계열사의 등록 상표입니다.
최종 업데이트: 2025-05-16(UTC)
[[["이해하기 쉬움","easyToUnderstand","thumb-up"],["문제가 해결됨","solvedMyProblem","thumb-up"],["기타","otherUp","thumb-up"]],[["필요한 정보가 없음","missingTheInformationINeed","thumb-down"],["너무 복잡함/단계 수가 너무 많음","tooComplicatedTooManySteps","thumb-down"],["오래됨","outOfDate","thumb-down"],["번역 문제","translationIssue","thumb-down"],["샘플/코드 문제","samplesCodeIssue","thumb-down"],["기타","otherDown","thumb-down"]],["최종 업데이트: 2025-05-16(UTC)"],[[["`utils.browserEvents.conditionalBind()` allows binding event handlers that can be selectively ignored based on touch stream activity, making it suitable for multi-part gestures like dragging or clicking."],["The function takes parameters for the target node, event name, function to execute, context (`this` value), and an optional flag to control blocking behavior."],["It returns an opaque data object that can be later used to unbind the event using `unbindEvent_`."]]],["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"]]