I am wanting to add an eventListener to webView to let me know when the web page has finished loading. How do I do that?
I have tried the code below but it does not work.
local myText = display.newText( "Hello World!", display.contentCenterX, 15, native.systemFont, 16 ) local function pageLoaded(event) myText.text = "success" end webView:addEventListener( "completed", pageLoaded )
Jason
I think you are looking for “urlRequest” and then event.type “loaded”:
https://docs.coronalabs.com/api/event/urlRequest/type.html
Let me know if that works,
Best regards,
Tomas
This done the job very nicely.
Thank You,
Jason
I think you are looking for “urlRequest” and then event.type “loaded”:
https://docs.coronalabs.com/api/event/urlRequest/type.html
Let me know if that works,
Best regards,
Tomas
This done the job very nicely.
Thank You,
Jason