详细 这是我的代码:
< input type =textname =pincodeclass =form-control frm_pincodevalue =/>但是当我检查它,我看到像
< input type =textname =pincodeclass =form-control frm_pincodevalue => #shadow-root(user-agent)< div id =inner-editor>< / div> < / input>解决方案
本质上它封装了代码,使其更易于管理。这不一定是您要删除的东西,而不会使代码生成不可用的功能。
以下是库中隐藏的代码你正在使用,所以你不必担心编码某些对象。 Chrome允许您查看代码中#shadow Dom的位置。
#shadow-root(user-agent)< div id =inner-editor>< / div>从以下链接中查看此解释:
简而言之,影子DOM是HTML规范的一个新部分,允许开发人员封装其HTML标记,CSS样式和 JavaScript。Shadow DOM还有一些其他的技术,以后我们将介绍,让开发人员能够像自己的标签一样构建自己的第一个类标签和API 这些新的标签和API被称为Web 组件。
下面的链接是帮助了解影子DOM的关键: robdodson.me/blog/2013/08 / 26 / shadow-dom-introduction /
这样可以利用阴影DOM创建自定义标签: www.polymer-project/
最后,Chrome开发工具选项下还有一个显示用户代理shadow DOM选项
What is #shadow-root (user-agent)? how to remove it from text boxes?
In Detail This is my code:
<input type="text" name="pincode" class="form-control frm_pincode" value="" />But when I inspect it I see like
<input type="text" name="pincode" class="form-control frm_pincode" value=""> #shadow-root (user-agent) <div id="inner-editor"></div> </input>解决方案
Essentially it encapsulates code, making it more manageable. It's not necessarily something you're going to want to remove without making the functionality of the code you did generate unusable.
The following is code is hidden from you by the library you're using so you don't have to worry about coding certain objects. Chrome allows you to see where those #shadow Doms are located in the code.
#shadow-root (user-agent) <div id="inner-editor"></div>Check out this explanation from the link below:
"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."
The link below was key in helping understanding shadow DOM: robdodson.me/blog/2013/08/26/shadow-dom-introduction/
This makes use of the shadow DOM to make creating custom tags possible: www.polymer-project/
Finally, there's also an option under Chrome Dev Tools Options to "Show user agent shadow DOM"
更多推荐
如何从html中删除#shadow
发布评论