微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

如何从html中删除#shadow-root(user-agent)

什么是#shadow-root(用户代理)?如何从文本框中删除它?

详细地
这是我的代码

但是当我检查它时,我看到了

最佳答案
从本质上讲,它封装了代码,使其更易于管理.如果不使您生成代码功能无法使用,那么您不一定要删除它.

以下是您正在使用的库隐藏的代码,因此您不必担心编码某些对象. Chrome允许您查看代码中#shadow Doms的位置.

  #shadow-root (user-agent)
  

从以下链接查看此说明:

“In a nutshell Shadow DOM is a new part of the HTML spec which allows
developers to encapsulate their HTML markup,CSS styles and
JavaScript. Shadow DOM,along with a few other technologies which
we’ll cover later,gives developers the ability to build their own 1st
class tags and APIs just like the or tag.
Collectively,these new tags and APIs are referred to as Web
Components.”

以下链接是帮助理解影子DOM的关键:
http://robdodson.me/blog/2013/08/26/shadow-dom-introduction/

这样可以使用shadow DOM来创建自定义标记
https://www.polymer-project.org/

最后,Chrome开发工具选项下还有一个选项“显示用户代理阴影DOM”

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。

相关推荐