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.8x-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>