Issue with InAppBrowserEvent in ionic


#1

I am using ionic2 and with below code I am getting error InAppBrowserEvent does not exist on type of browser

const browser = this.iab.create("someurl", '_blank','location=no');  //If i use this line only it works fine 

			browser.InAppBrowserEvent('loadstart', this.loadStartCallBack);
			browser.InAppBrowserEvent('loadstop', this.loadStopCallBack);
			browser.InAppBrowserEvent('loadstop', this.loadErrorCallBack);

#2

is not a function but a type.

Looking at what you posted, I think you might be looking or https://ionicframework.com/docs/native/in-app-browser/#on


#3

Yes. is there any working example for it. I am not completely sure how to use on function in ionic

InAppBrowserObject.prototype.on


#4

browser.on() in your case.


#5

Can you please elobrate what will be the return type. If you can give one complete example with onloadstart event pls that would be very helpful. All cases I tried are having error


#6

If you have errors, post them instead of telling people to give you other solutions…

Here is an example of how to use on():