clone of polymer element remove template of polymer element

夙愿已清 提交于 2019-12-04 02:58:27

finally got solution

polylabel1 : id of my div in side template of polymer element.

 Polymer('ele-label', {
 ready: function()
        {
            this.innerHTML=this.$.polylabel1.outerHTML;
        }
 attributeChanged: function()
        {
            this.innerHTML=this.$.polylabel1.outerHTML;
        }
}

When using the <template> tag in Polymer, it creates a shadow DOM, which is not part of the main DOM. You won't see the elements in the DOM itself, because it's not there. Take a look at the article i linked to learn more.

EDIT: It sounds like jQuery is not cloning the element's shadow with it. Try using .clone(true) to also clone related data.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!