I'm having trouble calling a polymer element's function right after calling initPolymer(); If I do
void main(){
initPolymer();
var polymerElement = querySelector('myElement');
polymerElement.myFunction();
}
This will work in the vm but not in the compiled js version. If I do a timer to delay the function call, both of them work. Does anyone know how to fix it? I tried to find if there's a callback function for initPolymer() when the elements are ready, but couldn't find it.
Thanks, Yi