Sometimes I am mistaken in coding my web application and material for your polymer 1.0, which stops working correctly. It’s like setting data on some user element and then immediately trying to read some data from it (it depends on the data just installed) (because I don’t know better). Sometimes it doesn’t work. Most of the time this.asyncwill help me, but sometimes it will not. However, he setTimeoutnever brought me to me in such situations. In most cases, a call setTimeoutwithout waiting time will work just as well.
For a long time I thought that this.async(function(){...})coincides with setTimeout(function(){...}). Because sometimes the code inside this.asyncwill not be able to see changes in the data of user elements, but the code setTimeoutwill not be inside .
Are these two methods implemented differently?
source
share