Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
在 Polymer 0.8 之前,我们能够使用injectBoundHTML. 在 1.0 中,此功能不再存在。有没有其他方法可以做到这一点?
injectBoundHTML
看起来您可以像设置innerHTML其他元素一样设置自定义元素。
innerHTML
Polymer({ is: 'x-custom', ready: function() { this.innerHTML = 'Hello World, I am a <b>Custom Element!</b>'; } });
我不确定 Polymer 团队是否实施了类似的特殊方法injectBoundHTML。