Web Browser

Does anybody else get multiple script errors when loading a page with the JUCE Web Broswer component. Does anybody know how to fix this error?

Are you on Windows?

Tom’s Q is absolutely essential to answer: Windows’ embedded browser is IE based, which has the track record of being… poopy… all around, including its JS implementation.

Might be able to disable the notifications though. You would have to hack the underlying JUCE native browser wrapping code by adding browser->put_Silent (VARIANT_TRUE); (I think! Haven’t tried…)

I am using windows, so there’s no way to fix this by including the JavaScript library in the source files?

To specify I get specific command errors, as in the JSON line 44 error not valid command. Console line 0 not valid command.





I am trying to embed a html5 game so there is no way to get this working on windows?

Lastly, would including a header of the libraries be a possible fix?
If so how do you include a header like…

Header set X-UA-Compatible “IE=edge”

@TypeWriterAudio JUCE’s web browser stuff is really out of date (at least on macOS).

I had to embed Monaco editor into a JUCE app a few months ago and ended up rolling my own on macOS (replacing all the bits with the new WebKit browser stuff, wiring up JS communication etc.).

Here’s an interesting project I looked at which I got working inside JUCE on macOS https://github.com/zserge/webview/tree/webview-x

Take a look at that (webview-x branch) and see if your game runs in there. You can get a native handle from there and add it to the JUCE view hierarchy (with little or no modification to the lib).

Like @hhit is saying, the issue is way more complex than just using JUCE’s web browser implementation, which just wraps basic OS browser components.

You really need to integrate a proper web browser framework yourself. Webkit is the most complete.

1 Like