Ant*_*eth 6 web-component dart shadow-dom polymer dart-polymer
有没有办法用它的父模板包围聚合物子模板?
在以下示例中,shadow标记将父模板带入子视图,但它忽略了其内容:
母体聚合物元素
<polymer-element name="my-window">
<template>
<div class="windowframe">
<p>test</p> <!-- can be shown with shadow tag -->
<content></content> <!-- cannot be used with shadow tag -->
Run Code Online (Sandbox Code Playgroud)
儿童聚合物元素
<polymer-element name="my-window-example" extends="my-window">
<template>
<!-- get the hosts' shadow and insert here -->
<shadow>
<p>Here is the content of my window<p> <!--won't be shown -->
</shadow>
</template>
Run Code Online (Sandbox Code Playgroud)
归档时间: |
|
查看次数: |
660 次 |
最近记录: |