Survei Riset: Ceritakan pengalaman Anda dengan Blockly
Mulai survei
Tetap teratur dengan koleksi
Simpan dan kategorikan konten berdasarkan preferensi Anda.
blockly > Events > CommentCreate
Memberi tahu pemroses bahwa komentar ruang kerja telah dibuat.
Tanda Tangan:
export declare class CommentCreate extends CommentBase
Memperluas: CommentBase
Konstruktor
Properti
Properti |
Pengubah |
Jenis |
Deskripsi |
json? |
|
comments.State |
(Opsional) Representasi JSON komentar ruang kerja yang dibuat. |
jenis |
|
EventType |
|
xml? |
|
Elemen | DocumentFragment |
(Opsional) Representasi XML komentar ruang kerja yang dibuat. |
Metode
Metode |
Pengubah |
Deskripsi |
run(forward) |
|
Menjalankan peristiwa pembuatan. |
toJson() |
|
Enkode peristiwa sebagai JSON. |
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 2025-07-25 UTC.
[[["Mudah dipahami","easyToUnderstand","thumb-up"],["Memecahkan masalah saya","solvedMyProblem","thumb-up"],["Lainnya","otherUp","thumb-up"]],[["Informasi yang saya butuhkan tidak ada","missingTheInformationINeed","thumb-down"],["Terlalu rumit/langkahnya terlalu banyak","tooComplicatedTooManySteps","thumb-down"],["Sudah usang","outOfDate","thumb-down"],["Masalah terjemahan","translationIssue","thumb-down"],["Masalah kode / contoh","samplesCodeIssue","thumb-down"],["Lainnya","otherDown","thumb-down"]],["Terakhir diperbarui pada 2025-07-25 UTC."],[[["The `Events.CommentCreate` class in Blockly notifies listeners when a new workspace comment is created."],["It provides properties like `json` and `xml` to access the comment's representation in different formats."],["The `run` method executes the creation event, while `toJson` encodes it as JSON for storage or transmission."],["This class extends the `CommentBase` class and includes a constructor to create new instances."]]],["The `CommentCreate` class, extending `CommentBase`, notifies listeners about the creation of a workspace comment. It can be constructed with an optional comment. Key properties include the optional JSON (`comments.State`) and XML representations (`Element | DocumentFragment`) of the created comment, alongside a string `type`. The class provides methods to `run` the creation event and to `toJson`, converting the event data to a JSON format.\n"]]