dim this as string
this = "document.writeln(""hello"");"
HTMLViewer1.ExecuteJavaScript(this)
Code causes crash. I knew it wouldn’t work as the code from the documentation wouldn’t work. Both (docs and mine) throws a NilExceptionError. Also tried just “write” and still crashes.
[quote=39885:@Paul Lefebvre]I do get a NilObjectException when I run on Windows if I have the HTMLViewer set to use the Native renderer. If it is set to use WebKit, it works.
The “native renderer” uses the Internet Explorer engine. Maybe it’s DOM is different?[/quote]
Thanks!
Maybe Xojo should just ditch IE and pre-include WebKit with app builds. Ditching IE would also boost the “cross platform-ability”.
Dim this As String
this = "document.writeln(""hello"");"
HTMLViewer1.ExecuteJavaScript(this)
A future release will raise an HTMLViewerException rather than a NilObjectException if no document is loaded. And the LangRef has been updated with this information.