header_archive', 'static/template-1/footer_post', 'static/template-1/footer'), 'template2': ('static/template -2/header', 'static/template-2/header_forum', 'static/template-2/header_search', 'static/template-2/header_archive ', 'static/template-2/footer_post', 'static/template-2/footer'), 'template3': ('static/template
HTML template-2 由于Shadow DOM中宿主元素的内容会被影子节点掩盖,如果想将宿主中某些内容显示出来的话就需要借助slot,它是定义在宿主和template中的一个插槽,用来“占位
true); shadow.appendChild(tpl); </script> dom树中的template标签,不解析: [HTML template-1] 最终插入的影子节点效果: [HTML template