Restez organisé à l'aide des collections
Enregistrez et classez les contenus selon vos préférences.
blockly > Événements > CommentCreate
Informe les auditeurs qu'un commentaire a été créé dans un espace de travail.
Signature :
export declare class CommentCreate extends CommentBase
Étend: CommentBase
Constructeurs
Propriétés
Propriété |
Modificateurs |
Type |
Description |
json ? |
|
comments.State |
(Facultatif) Représentation JSON du commentaire de l'espace de travail créé. |
type |
|
EventType |
|
xml? |
|
Élément | DocumentFragment |
(Facultatif) Représentation XML du commentaire créé dans l'espace de travail. |
Méthodes
Méthode |
Modificateurs |
Description |
run(forward) |
|
Exécutez un événement de création. |
toJson() |
|
Encodez l'événement au format JSON. |
Sauf indication contraire, le contenu de cette page est régi par une licence Creative Commons Attribution 4.0, et les échantillons de code sont régis par une licence Apache 2.0. Pour en savoir plus, consultez les Règles du site Google Developers. Java est une marque déposée d'Oracle et/ou de ses sociétés affiliées.
Dernière mise à jour le 2025/07/25 (UTC).
[[["Facile à comprendre","easyToUnderstand","thumb-up"],["J'ai pu résoudre mon problème","solvedMyProblem","thumb-up"],["Autre","otherUp","thumb-up"]],[["Il n'y a pas l'information dont j'ai besoin","missingTheInformationINeed","thumb-down"],["Trop compliqué/Trop d'étapes","tooComplicatedTooManySteps","thumb-down"],["Obsolète","outOfDate","thumb-down"],["Problème de traduction","translationIssue","thumb-down"],["Mauvais exemple/Erreur de code","samplesCodeIssue","thumb-down"],["Autre","otherDown","thumb-down"]],["Dernière mise à jour le 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"]]