Survei Riset: Ceritakan pengalaman Anda dengan Blockly
Mulai survei
blockly > IConnectionChecker > doSafetyChecks
Metode IConnectionChecker.doSafetyChecks()
Periksa keamanan koneksi yang diberikan, artinya koneksi tersebut tidak akan merusak asumsi dasar Blockly (mis. tidak ada koneksi mandiri).
Tanda Tangan:
doSafetyChecks(a: Connection | null, b: Connection | null): number;
Parameter
Parameter |
Jenis |
Deskripsi |
a |
Koneksi | null (kosong) |
Koneksi pertama yang akan diperiksa. |
b |
Koneksi | null (kosong) |
Bagian kedua koneksi yang akan diperiksa. |
Hasil:
angka
Enum dengan alasan koneksi ini aman atau tidak aman.
Kecuali dinyatakan lain, konten di halaman ini dilisensikan berdasarkan Lisensi Creative Commons Attribution 4.0, sedangkan contoh kode dilisensikan berdasarkan Lisensi Apache 2.0. Untuk mengetahui informasi selengkapnya, lihat Kebijakan Situs Google Developers. Java adalah merek dagang terdaftar dari Oracle dan/atau afiliasinya.
Terakhir diperbarui pada 2024-08-21 UTC.
[null,null,["Terakhir diperbarui pada 2024-08-21 UTC."],[[["`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."]]],[]]