Survei Riset: Ceritakan pengalaman Anda dengan Blockly
Mulai survei
blockly > utils > dom > startTextWidthCache
Fungsi utils.dom.startTextWidthCache()
Mulai cache lebar teks. Setiap panggilan ke fungsi ini HARUS memanggil stopTextWidthCache. Cache tidak boleh ada di antara thread eksekusi.
Tanda Tangan:
export declare function startTextWidthCache(): void;
Hasil:
void
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-22 UTC.
[null,null,["Terakhir diperbarui pada 2024-08-22 UTC."],[[["Initializes a cache for measuring text widths, improving performance for frequent text measurements."],["This function must be paired with `stopTextWidthCache()` to properly manage the cache and prevent memory leaks."],["Text width caches should not persist across different execution threads to avoid data inconsistencies."],["The function primarily serves as an internal optimization for Blockly and does not typically require direct user interaction."]]],[]]