Options to configure WebBrowserComponent. More...
#include <juce_WebBrowserComponent.h>

Classes | |
| class | AppleWkWebView |
| Options specific to the WkWebView backend used on Apple systems. More... | |
| class | WinWebView2 |
| Options specific to the WebView2 backend. More... | |
Public Types | |
| enum class | Backend { defaultBackend , ie , webview2 } |
Public Member Functions | |
| const auto & | getAllowedOrigin () const |
| auto | getAppleWkWebViewOptions () const |
| auto | getBackend () const noexcept |
| const auto & | getEventListeners () const |
| const auto & | getInitialisationData () const |
| const auto & | getLifetimeListeners () const |
| const auto & | getNativeFunctions () const |
| auto | getNativeIntegrationsEnabled () const |
| auto | getResourceProvider () const |
| auto | getUserAgent () const |
| const auto & | getUserScripts () const |
| auto | getWinWebView2BackendOptions () const |
| auto | keepsPageLoadedWhenBrowserIsHidden () const noexcept |
| Options | withAppleWkWebViewOptions (const AppleWkWebView &appleWkWebViewOptions) const |
| Specifies options that influence the WebBrowserComponent's behaviour on Apple systems. | |
| Options | withBackend (Backend backend) const |
| Use a particular backend to create the WebViewBrowserComponent. | |
| Options | withEventListener (const Identifier &eventId, NativeEventListener listener) const |
| Registers a NativeEventListener that receives events sent to the specified eventId. | |
| Options | withInitialisationData (StringRef name, const var &value) const |
Ensures that there will be a Javascript Array under window.__JUCE__.initialisationData.name and that it will contain the value provided here. | |
| Options | withKeepPageLoadedWhenBrowserIsHidden () const |
| Tell JUCE to keep the web page alive when the WebBrowserComponent is not visible. | |
| Options | withNativeFunction (const Identifier &name, NativeFunction callback) const |
| Registers a NativeFunction under the given name. | |
| Options | withNativeIntegrationEnabled (bool enabled=true) const |
| Enables native integration features for the code running inside the WebBrowserComponent. | |
| template<typename OptionsType > | |
| OptionsType | withOptionsFrom (OptionsBuilder< OptionsType > &builder) const |
| Adds all options provided by the builder to the returned Options object. | |
| Options | withUserAgent (String ua) const |
| Use a specific user agent string when requesting web pages. | |
| Options | withUserScript (StringRef script) const |
Adds a Javascript code that will be evaluated before any other resource is loaded but after the JUCE backend definitions become available, hence the specified script can rely on the presence of window.__JUCE__.backend. | |
| Options | withWebViewLifetimeListener (WebViewLifetimeListener *listener) |
| Adds an object that will be notified when the WebBrowserComponent is constructed and destructed. | |
| Options | withWinWebView2Options (const WinWebView2 &winWebView2Options) const |
| Specifies options that apply to the Windows implementation when the WebView2 feature is enabled. | |
Private Attributes | |
| std::optional< String > | allowedOrigin |
| AppleWkWebView | appleWkWebView |
| Backend | browserBackend = Backend::defaultBackend |
| bool | enableNativeIntegration = false |
| std::vector< std::pair< Identifier, NativeEventListener > > | eventListeners |
| std::vector< std::pair< String, var > > | initialisationData |
| bool | keepPageLoadedWhenBrowserIsHidden = false |
| std::vector< WebViewLifetimeListener * > | lifetimeListeners |
| std::map< Identifier, NativeFunction > | nativeFunctions |
| ResourceProvider | resourceProvider |
| String | userAgent |
| StringArray | userScripts |
| WinWebView2 | winWebView2 |
Options to configure WebBrowserComponent.
|
strong |
|
inline |
|
inline |
|
inlinenoexcept |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inlinenoexcept |
|
inline |
Specifies options that influence the WebBrowserComponent's behaviour on Apple systems.
References juce::withMember().
Use a particular backend to create the WebViewBrowserComponent.
JUCE will silently fallback to the default backend if the selected backend is not supported. To check if a specific backend is supported on your platform or not, use WebBrowserComponent::areOptionsSupported.
References juce::withMember().
|
inline |
Registers a NativeEventListener that receives events sent to the specified eventId.
To send a message to this listener from the frontend, call for example
Referenced by juce::WebControlParameterIndexReceiver::buildOptions().
|
inline |
Tell JUCE to keep the web page alive when the WebBrowserComponent is not visible.
By default, JUCE will replace the current page with a blank page - this can be handy to stop the browser using resources in the background when it's not actually being used.
References juce::withMember().
|
inline |
Registers a NativeFunction under the given name.
To call this function from the frontend, you can import the JUCE frontend helper module or issue a call to the low-level frontend API.
The callback is always called on the message thread.
References jassert.
|
inline |
Enables native integration features for the code running inside the WebBrowserComponent.
This injects data and function objects under window.__JUCE__.backend through which scripts running in the WebBrowserComponent can send events to the backend and call registered native functions.
You should only enable native integrations if you have full control over the content loaded into the component. Navigating to 3rd party websites with these integrations enabled may expose the application and the computer to security risks.
References juce::withMember().
|
inline |
Adds all options provided by the builder to the returned Options object.
References OptionsBuilder< OptionsType >::buildOptions().
Use a specific user agent string when requesting web pages.
References juce::withMember().
Adds a Javascript code that will be evaluated before any other resource is loaded but after the JUCE backend definitions become available, hence the specified script can rely on the presence of window.__JUCE__.backend.
This script will be evaluated after all goToUrl() calls.
|
inline |
Adds an object that will be notified when the WebBrowserComponent is constructed and destructed.
|
inline |
Specifies options that apply to the Windows implementation when the WebView2 feature is enabled.
References juce::withMember().
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |