vendredi 29 septembre 2017

Are there any alternatives to 'window.onload' in polymer?

I am trying to trigger a setTimeout using window.onload, but unable to do so. Are there any other ways to do this?

    window.onload =  function() {
        setTimeout(function(){ 
            alert('Hide that spinner!'); 
        }, 3000);
        console.log('After 3 seconds');
    };




Aucun commentaire:

Enregistrer un commentaire