HTML 模板的 MutationObserver
似乎 MutationObserver
不适用于 标记。 https://jsfiddle.net/brhya5uj/
当 < 时获得通知的最佳方式是什么;模板>
更改?
Seems like MutationObserver
is not working on a <template>
tag.
https://jsfiddle.net/brhya5uj/
What's the best way to get notified when a <template>
changes?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
根据规范
模板
元素没有任何孩子。相反,内容放在content
属性中,您应该观察到:更多信息: https://developer.mozilla.org/en-us/docs/web/web/html/element/element/template
Per the specification
template
element doesn't have any children. Instead, the contents is placed insidecontent
property, which you should observe:More info: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/template