封鎖 >IConnectionChecker >doSafetyChecks
IConnectionChecker.doSafetyChecks() 方法
檢查指定連線是否安全,這表示該連線不會破壞 Blockly 的任何基本假設 (例如沒有自我連線)。
Signature:
doSafetyChecks(a: Connection | null, b: Connection | null): number;
參數
參數 |
類型 |
說明 |
a |
連繫 |空值 |
第一個要檢查的連線。 |
b |
連繫 |空值 |
要檢查的連線第二個。 |
傳回:
數字
列舉說明這個連線安全或不安全的原因。
除非另有註明,否則本頁面中的內容是採用創用 CC 姓名標示 4.0 授權,程式碼範例則為阿帕契 2.0 授權。詳情請參閱《Google Developers 網站政策》。Java 是 Oracle 和/或其關聯企業的註冊商標。
上次更新時間:2024-08-21 (世界標準時間)。
[null,null,["上次更新時間:2024-08-21 (世界標準時間)。"],[[["`doSafetyChecks` is a method within the `IConnectionChecker` interface used to ensure connecting two blocks is valid and doesn't violate Blockly's rules."],["It takes two `Connection` objects as input, representing the blocks being connected, and returns a status code indicating the safety of the connection."],["The returned status code is an enum value that specifies whether the connection is safe, or if not, the reason for its unsafety, such as self-connection or other rule violations."]]],[]]