Polymer 如何获取聚合物自定义元素的内部域?

Polymer 如何获取聚合物自定义元素的内部域?,polymer,Polymer,我有一个聚合物自定义元素,如下所示 <custom-element> <img src="path1"> <img src="path2"> <img src="path3"> <img src="path4"> </custom-element> 上面的代码在单个div中生成所有图像,即图像包装器,如下所示 <div class="image-wrapper"> <img src="

我有一个聚合物自定义元素,如下所示

<custom-element>
  <img src="path1">
  <img src="path2">
  <img src="path3">
  <img src="path4">
</custom-element>
上面的代码在单个div中生成所有图像,即
图像包装器
,如下所示

<div class="image-wrapper">
  <img src="path1">
  <img src="path2">
  <img src="path3">
  <img src="path4">
</div>
<div class="image-wrapper">
  <img src="path1">
</div>
<div class="image-wrapper">
  <img src="path2">
</div>
<div class="image-wrapper">
  <img src="path3">
</div>
<div class="image-wrapper">
  <img src="path4">
</div>
我怎样才能做到这一点呢?

作为一个快速的回答

<custom-element>
  <img src="path1">
</custom-element>
<custom-element>
  <img src="path2">
</custom-element>
<custom-element>
  <img src="path3">
</custom-element>
<custom-element>
  <img src="path4">
</custom-element>
<custom-element>
  <img src="path1">
</custom-element>
<custom-element>
  <img src="path2">
</custom-element>
<custom-element>
  <img src="path3">
</custom-element>
<custom-element>
  <img src="path4">
</custom-element>
<template is="dom-repeat" items="[[paths]]" as="path">
    <custom-element>
      <img src="[[path]]">
    </custom-element>
</template>
paths = [
    "path1",
    "path2",
    "path3",
    "path4",
];