加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 综合聚焦 > 资源网站 > 资源 > 正文

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

发布时间:2020-12-14 22:54:45 所属栏目:资源 来源:网络整理
导读:什么是#shadow-root(用户代理)?如何从文本框中删除它? 详细地 这是我的代码: 但是当我检查它时,我看到了 最佳答案 从本质上讲,它封装了代码,使其更易于管理.如果不使您生成的代码功能无法使用,那么您不一定要删除它. 以下是您正在使用的库隐藏的代码,因此

什么是#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”

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读