Type "HTMLViewer" has no member named "DocumentComplete"

Why am I getting the following error. The autocomplete even shows Documentcomplete as an option for HTMLViewer1.

Type “HTMLViewer” has no member named “DocumentComplete”
do until window_HTML.HTMLViewer1.DocumentComplete(url)

dim url as string
url =“http://” +“www.google.com” //example
do until window_HTML.HTMLViewer1.DocumentComplete( url) //line with error
window_HTML.Title=“Spindle Speed Calculations”
window_HTML.HTMLViewer1.LoadURL(url)
loop
window_HTML.HTMLViewer1.ExecuteJavaScript(“window.location.reload(true);”) //clear cache

Compiled with xojo 2018r1.1 on windows 7 64 bit

http://documentation.xojo.com/index.php/HTMLViewer.DocumentComplete

I am still not sure why I keep getting the error.

It’s an event not a property or method.

How do i check for the DocumentComplete event? There is no example in the documentation.

That is what I wanted to tell. AFAIK, you cannot call an Event.

But you can add code there.

OK: the document page is thin, but it have all: Event and Fires when the HTML page is finished loading.

How do you use the Open Event ?

Did you ever used an Event ?

Changed code to:

dim url as string
url ="http://" +"www.google.com" //example
window_HTML.Title="Spindle Speed Calculations"
window_HTML.HTMLViewer1.LoadURL(url)

And moved the following line to the HTMLViewer Documentcomplete event handler.

window_HTML.HTMLViewer1.ExecuteJavaScript(“window.location.reload(true);”) //clear cache

thanks.