JUCE

- Main Page
- Related Pages
- Topics
- Classes
- Files

- Class List
- Class Index
- Class Hierarchy
- Class Members

Loading...
Searching...
No Matches
Classes | Public Types | Public Member Functions | List of all members
WebBrowserComponent::Options Class Reference
juce_gui_extra » misc

Options to configure WebBrowserComponent. More...

`#include <juce_WebBrowserComponent.h>`

## Classes
class | WinWebView2
| Options specific to the WebView2 backend. More...

## Public Types
enum class | Backend { defaultBackend , ie , webview2 }

## Public Member Functions
Options | withBackend (Backend backend) const
| Use a particular backend to create the WebViewBrowserComponent.
Options | withKeepPageLoadedWhenBrowserIsHidden () const
| Tell JUCE to keep the web page alive when the WebBrowserComponent is not visible.
Options | withUserAgent (String ua) const
| Use a specific user agent string when requesting web pages.
Options | withWinWebView2Options (const WinWebView2 &winWebView2Options) const
Backend | getBackend () const noexcept
bool | keepsPageLoadedWhenBrowserIsHidden () const noexcept
String | getUserAgent () const
WinWebView2 | getWinWebView2BackendOptions () const

## Detailed Description

Options to configure WebBrowserComponent.

## Member Enumeration Documentation

## ◆ Backend

enum class WebBrowserComponent::Options::Backend
| strong

Enumerator
defaultBackend | Default web browser backend. WebKit will be used on macOS, gtk-webkit2 on Linux and internet explorer on Windows. On Windows, the default may change to webview2 in the fututre.
ie | Use Internet Explorer as the backend on Windows. By default, IE will use an ancient version of IE. To change this behaviour, you either need to add the following html element into your page's head section:
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
or you need to change windows registry values for your application. More information on the latter can be found here: https://learn.microsoft.com/en-us/previous-versions/windows/internet-explorer/ie-developer/general-info/ee330730(v=vs.85)?redirectedfrom=MSDN#browser-emulation
webview2 | Use the chromium based WebView2 engine on Windows.

## Member Function Documentation

## ◆ withBackend()

Options WebBrowserComponent::Options::withBackend | ( | Backend | backend | ) | const

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 withMember().

## ◆ withKeepPageLoadedWhenBrowserIsHidden()

Options WebBrowserComponent::Options::withKeepPageLoadedWhenBrowserIsHidden | ( |  | ) | const

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 withMember().

## ◆ withUserAgent()

Options WebBrowserComponent::Options::withUserAgent | ( | String | ua | ) | const

Use a specific user agent string when requesting web pages.

References withMember().

## ◆ withWinWebView2Options()

Options WebBrowserComponent::Options::withWinWebView2Options | ( | const WinWebView2 & | winWebView2Options | ) | const

References withMember().

## ◆ getBackend()

Backend WebBrowserComponent::Options::getBackend | ( |  | ) | const
| noexcept

## ◆ keepsPageLoadedWhenBrowserIsHidden()

bool WebBrowserComponent::Options::keepsPageLoadedWhenBrowserIsHidden | ( |  | ) | const
| noexcept

## ◆ getUserAgent()

String WebBrowserComponent::Options::getUserAgent | ( |  | ) | const

## ◆ getWinWebView2BackendOptions()

WinWebView2 WebBrowserComponent::Options::getWinWebView2BackendOptions | ( |  | ) | const

The documentation for this class was generated from the following file:

- juce_WebBrowserComponent.h