blockly > 连接 > getShadowDom
Connection.getShadowDom() 方法
返回连接的阴影块的 xml 表示法。
Signature:
getShadowDom(returnCurrent?: boolean): Element | null;
参数
参数 | 类型 | 说明 |
---|---|---|
returnCurrent | boolean | (可选)如果为 true,并且影子块当前已附加到此连接,则会序列化该块的状态并返回该状态(以确保字段值正确无误)。否则,将仅返回已保存的 shadowDom。 |
返回:
元素 | null
块或 null 的 Shadow DOM 表示法。