Skip to content

Commit 9e339b2

Browse files
committed
Update FAQ related to Edge and Internet Explorer
1 parent 1002d79 commit 9e339b2

5 files changed

+45
-33
lines changed

docs/FAQ/FAQ_How_do_I_explicitly_use_Edge_as_the_Browser's_underlying_renderer.md

-27
This file was deleted.

docs/FAQ/FAQ_How_do_I_specify_the_default_type_of_native_renderer_that_is_used_by_the_Browser.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,13 @@ FAQ How do I specify the default type of native renderer that is used by the Bro
33

44
The default native renderers that are used for `SWT.NONE`-style Browsers are listed in [Which platforms support the SWT Browser, and which native renderers do they use?](./FAQ_Which_platforms_support_the_SWT_Browser,_and_which_native_renderers_are_available.md). Default is chosen to not require additional software installation and to preserve backward-compatible behavior.
55

6-
A user can set a property to specify the type of native renderer to use for `SWT.NONE`-style Browsers. Setting this property does not affect Browsers that are created with explicit renderer styles such as `SWT.WEBKIT` or `SWT.CHROMIUM`. The property name is `org.eclipse.swt.browser.DefaultType` and valid values for it currently include `webkit`, `ie` (since 4.3), `chromium` (since 4.17) and `edge` (since 4.19). This property must be set before the first `Browser` instance is created.
6+
A user can set a property to specify the type of native renderer to use for `SWT.NONE`-style Browsers. Setting this property does not affect Browsers that are created with explicit renderer styles such as `SWT.WEBKIT` or `SWT.CHROMIUM`. The property name is `org.eclipse.swt.browser.DefaultType` and valid values for it currently include `webkit`, `ie` (since 4.3), `chromium` (since 4.17 and deprecated since 4.31) and `edge` (since 4.19). This property must be set before the first `Browser` instance is created.
77

88
_Note: As of Eclipse/SWT 4.8, Mozilla (`XULRunner`) renderer is no longer supported, the value `mozilla` has no effect._
99

10-
A user can specify a comma-separated list of native renderers, in order of preference, for the `org.eclipse.swt.browser.DefaultType` value. Values not applicable to a particular platform are ignored. For example, the value of `edge,chromium` will change the default to Edge on Windows and Chromium on other platforms.
10+
A user can specify a comma-separated list of native renderers, in order of preference, for the `org.eclipse.swt.browser.DefaultType` value. Values not applicable to a particular platform are ignored. For example, the value of `ie,webkit` will change the default to Internet Explorer on Windows and Webkit on other platforms.
1111

12-
The best opportunity for a user to set this property is by launching their application with a `-D` VM switch (e.g., add to the end of the `eclipse.ini` file: `-Dorg.eclipse.swt.browser.DefaultType=chromium`).
12+
The best opportunity for a user to set this property is by launching their application with a `-D` VM switch (e.g., add to the end of the `eclipse.ini` file: `-Dorg.eclipse.swt.browser.DefaultType=webkit`).
1313

1414
An alternate approach that an Eclipse application may use is to provide a `BrowserInitializer` implementation that sets this property. This implementation will be invoked when the first Browser instance is about to be created. The steps to do so are:
1515

Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
# FAQ How do I use Edge/IE as the Browser's underlying renderer?
2+
3+
Since Eclipse/SWT 4.35 (2025-03) Edge is used as the default browser in SWT. For older releases, browser instances using Edge could be created with the style `SWT.EDGE` (since 4.19) or setting the Java property `org.eclipse.swt.browser.DefaultType=edge`.
4+
5+
## WebView2 Component Provision
6+
7+
Edge rendering backend uses the WebView2 component, which is based on but distinct from the Edge browser itself. SWT relies on a WebView2 component being available on the current system.
8+
There are different [ways of distribution for the WebView2 component](https://learn.microsoft.com/en-us/microsoft-edge/webview2/concepts/distribution). On most systems, the component is already available due to the `Evergreen runtime distribution mode` ensuring the availability of an automatically updated version of the library on Windows.
9+
10+
If this is not the case or if other versions of the component shall be used, these options exist:
11+
* A stand-alone runtime installer, either web or offline ([Download the WebView2 Runtime](https://developer.microsoft.com/en-us/microsoft-edge/webview2/#webview-title) from Microsoft).
12+
This runtime will be shared between all applications on the machine and will auto-update itself independent of your application.
13+
* A fixed-version archive with all the necessary files (same link as above).
14+
This is a complete, fixed set of files to be included with your application. Unlike the first option, you have complete freedom in bundling, packaging and updating it.
15+
* Beta, Dev, or Canary version of the Edge browser (<https://www.microsoftedgeinsider.com/en-us/download>).
16+
This option is convenient for testing, but production deployments should use the previous two options.
17+
18+
SWT will automatically locate installed browsers and runtimes (using the `WebView2Loader.dll` provided via the SWT fragment for Windows).
19+
In case you want to use fixed-version binaries or override the automatically chosen version, set the `org.eclipse.swt.browser.EdgeDir` Java property to the directory containing `msedgewebview2.exe`. For example, you can add `-Dorg.eclipse.swt.browser.EdgeDir=PATH_TO_EDGE` with `PATH_TO_EDGE` being the absolute path to an Edge installation as a command-line argument to an SWT application or to the `eclipse.ini` of an Eclipse product.
20+
21+
## WebView2 Data Directory
22+
23+
WebView2 creates a user data directory to store caches and persistent data like cookies and local storage. All WebView2 instances in an application and all instances of the same application share this directory.
24+
25+
The default user directory is customizable and depends on the usage context:
26+
* In a plain SWT application, the default location is `%LOCALAPPDATA%\<AppName>\EBWebView`, where `<AppName>` is defined with `Display.setAppName()`.
27+
* In an Eclipse product, the default location is inside the metadata folder of the workspace, precisely in `.metadata\.plugins\org.eclipse.swt\EBWebView`.
28+
* The location can be customized by specifying it on a per-process basis via the `org.eclipse.swt.browser.EdgeDataDir` Java property.
29+
30+
## WebView2 Timeouts
31+
32+
All operations on a WebView2 component are executed asynchronously, including it's initialization. Under some conditions and in some environments, operations can take rather long, which is why the WebView2 adaptation in SWT uses timeouts to avoid UI blocks.
33+
In case you run into such timeouts and want to increase the timeout value, you can do so via the `org.eclipse.swt.internal.win32.Edge.timeout` property, which accepts a timeout value in milliseconds.
34+
35+
## Fallback to Internet Explorer
36+
37+
Beginning with 4.35, browser instances in Eclipse/SWT application will use Edge by default and need to be created with style `SWT.IE` or via setting the Java property `org.eclipse.swt.browser.DefaultType=ie` to still use the Internet Explorer.

docs/FAQ/FAQ_Which_platforms_support_the_SWT_Browser,_and_which_native_renderers_are_available.md

+4-2
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,15 @@ The SWT Browser is currently available on all supported platforms. Available ren
55

66
| Renderer | Platform | Style Flag | Default |
77
| --------------------- | ---------------- | -------------- | ------- |
8-
| Internet Explorer | Windows | `SWT.IE` | Yes |
8+
| Edge (Chromium-based) | Windows | `SWT.EDGE` | Yes |
99
| WebKit | macOS, Linux GTK | `SWT.WEBKIT` | Yes |
10-
| Edge (Chromium-based) | Windows | `SWT.EDGE` | No |
10+
| Internet Explorer | Windows | `SWT.IE` | No |
1111
| Chromium | All | `SWT.CHROMIUM` | No |
1212

1313
_Note: As of Eclipse/SWT 4.8, Mozilla (`XULRunner`) renderer is no longer supported, `SWT.MOZILLA` flag is deprecated and has no effect._
1414

15+
_Note: As of Eclipse/SWT 4.35, Edge became the default browser on Windows._
16+
1517
Browser instances created with style `SWT.NONE` will use the default platform renderer according to the table above. The default renderer does not require additional software installation. It is possible to override the default native renderer. See [How do I specify the default type of native renderer that is used by the Browser](./FAQ-How-do-I-specify-the-default-type-of-native-renderer-that-is-used-by-the-Browser).
1618

1719
For additional information on specific renderers, see [How do I explicitly use Chromium as the Browser's underlying renderer](FAQ-How-do-I-explicitly-use-Chromium-as-the-Browser's-underlying-renderer) and [How do I explicitly use Edge as the Browser's underlying renderer](./FAQ-How-do-I-explicitly-use-Edge-as-the-Browser's-underlying-renderer).

docs/FAQ/The_Official_Eclipse_FAQs.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -217,7 +217,7 @@ Above, we already discussed most of the basic functionality of the org.eclipse.c
217217
* [FAQ How can I track the lifecycle of jobs?](./FAQ_How_can_I_track_the_lifecycle_of_jobs.md "FAQ How can I track the lifecycle of jobs?")
218218
* [FAQ How do I create a repeating background task?](./FAQ_How_do_I_create_a_repeating_background_task.md "FAQ How do I create a repeating background task?")
219219
* [FAQ How do I explicitly use Chromium as the Browser's underlying renderer?](./FAQ-How-do-I-explicitly-use-Chromium-as-the-Browser's-underlying-renderer.md "FAQ How do I explicitly use Chromium as the Browser's underlying renderer?")
220-
* [FAQ How do I explicitly use Edge as the Browser's underlying renderer?](./FAQ-How-do-I-explicitly-use-Edge-as-the-Browser's-underlying-renderer.md "FAQ How do I explicitly use Edge as the Browser's underlying renderer?")
220+
* [FAQ How do I use Edge/IE as the Browser's underlying renderer?](./FAQ_How_do_I_use_Edge-IE_as_the_Browser's_underlying_renderer.md "FAQ How do I use Edge/IE as the Browser's underlying renderer?")
221221
* [FAQ How do I specify the default type of native renderer that is used by the Browser?](./FAQ-How-do-I-specify-the-default-type-of-native-renderer-that-is-used-by-the-Browser.md "FAQ How do I specify the default type of native renderer that is used by the Browser?")
222222
* [FAQ Which GTK version do I need to run SWT?](./FAQ-Which-GTK-version-do-I-need-to-run-SWT.md "FAQ Which GTK version do I need to run SWT?")
223223
* [FAQ Which platforms support the SWT Browser, and which native renderers are available?](./FAQ-Which-platforms-support-the-SWT-Browser,-and-which-native-renderers-are-available.md "FAQ Which platforms support the SWT Browser, and which native renderers are available?")

0 commit comments

Comments
 (0)