blockly > Workspace > getCommentById

Workspace.getCommentById() 方法

查找此工作区中具有指定 ID 的评论。

Signature:

getCommentById(id: string): WorkspaceComment | null;

参数

参数 类型 说明
id 字符串 要查找的评论的 ID。

返回

WorkspaceComment | null

所查找的评论,如果未找到,则返回 null。