Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/visual-studio-code/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Polymer 如何在测试夹具中使用dom绑定?_Polymer_Web Component_Web Component Tester - Fatal编程技术网

Polymer 如何在测试夹具中使用dom绑定?

Polymer 如何在测试夹具中使用dom绑定?,polymer,web-component,web-component-tester,Polymer,Web Component,Web Component Tester,如何在中使用 我曾尝试使用它0.8x-template的方式: 但在非Chrome浏览器中,这只会在dom绑定之外标记 有没有办法让它工作,或者它只是web components tester/test fixture/dom bind中的一个阻塞错误?使用dom模板,即: <test-fixture id="dom-bind-fixture"> <template is="dom-template"> <h1>{{greeting}

如何在中使用

我曾尝试使用它0.8
x-template
的方式:

但在非Chrome浏览器中,这只会在dom绑定之外标记

有没有办法让它工作,或者它只是web components tester/test fixture/dom bind中的一个阻塞错误?

使用dom模板,即:

<test-fixture id="dom-bind-fixture">
    <template is="dom-template">
        <h1>{{greeting}}</h2>
    </template>
</test-fixture>
<script>
    // ...
   var bound = fixture('dom-bind-fixture', {greeting: 'ohai thurr'});
</script>

{{问候语}
// ...
var-bind=fixture('dom-bind-fixture',{问候语:'ohai thurr'});

为了便于参考,@tomalec创建了一个用于跟踪此信息的。
<test-fixture id="dom-bind-fixture">
    <template>
        <h1>outside dom-bind</h1>
        <template is="dom-bind">
            <h2>inside dom-bind</h2>
        </template>
    </template>
</test-fixture>
<test-fixture id="dom-bind-fixture">
    <template is="dom-template">
        <h1>{{greeting}}</h2>
    </template>
</test-fixture>
<script>
    // ...
   var bound = fixture('dom-bind-fixture', {greeting: 'ohai thurr'});
</script>