Reputation: 3875
I have a function
var inApp = cordova.InAppBrowser.open(ln, '_blank', 'location=no');
inApp.addEventListener('loadstop', function(){
inApp.insertCSS({
file: 'http://istudy.com.pk/api/hide.css'
},onSuccess);
});
I want to insert the CSS after n seconds
instead of loadstop
. Is it possible? How can I achieve that?
Upvotes: 0
Views: 73
Reputation: 1806
setTimout(function(){
inApp.insertCSS({
file: 'http://istudy.com.pk/api/hide.css'
},onSuccess);
},3000) // 3000 milliseconds = 3 seconds
but this will only work if inApp
is defined at time of execution
Upvotes: 2