blockly > WorkspaceSvg > getCommentById

WorkspaceSvg.getCommentById() 方法

返回具有指定 ID 的工作区注释(如果有)。

Signature:

getCommentById(id: string): RenderedWorkspaceComment | null;

参数

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

返回

RenderedWorkspaceComment | null

具有指定 ID 的工作区评论,或 null。