Polymer 2.0 async和getComputedStyle

时间:2017-04-03 02:30:43

标签: polymer polymer-2.x

在我们的聚合物1.0组件中,我们有:

attached: function () 
{
    var something=this.getComputedStyleValue("--flxs-" + prop)
    this.async(function()
    {
        // do some work here.
    });
}

在2.0中,未定义this.getComputedStyleValue this.async。

知道替代方案是什么?

1 个答案:

答案 0 :(得分:1)

Polymer.Async似乎是this.async的替代品。

对于getComputedStyleValue,您可以尝试StyleGather,但我怀疑它是否有效。

否则,LegacyMixin包含所有旧方法。