# BrowserPlatformOptions

Version: 0.5.0
Framework commit: d503df2befa756e681fcdc6250e9552dc7388bea
Canonical URL: /docs/0.5.0/api/ferroui-browser/struct-browserplatformoptions/

**struct** · [`ferroui-browser`](/docs/0.5.0/api/ferroui-browser/) · v0.5.0

```rust
struct BrowserPlatformOptions
```

Options of the browser backend.

[View source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/Browser/FerroUI.Browser/browser_app_builder.rs#L132)

## Members

- [`rendering_mode`](#struct_field-rendering_mode)
- [`renderer`](#struct_field-renderer)
- [`register_ferro_service_worker`](#struct_field-register_ferro_service_worker)
- [`ferro_service_worker_scope`](#struct_field-ferro_service_worker_scope)
- [`prefer_file_dialog_polyfill`](#struct_field-prefer_file_dialog_polyfill)
- [`render_thread`](#struct_field-render_thread)

<a id="struct_field-rendering_mode"></a>

### rendering_mode

```rust
rendering_mode: Vec<BrowserRenderingMode>
```

The rendering modes with fallbacks. The first element has the
highest priority.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/Browser/FerroUI.Browser/browser_app_builder.rs#L135)

<a id="struct_field-renderer"></a>

### renderer

```rust
renderer: BrowserRenderer
```

The render backend. Skia by default when enabled, otherwise Vello.

Not in the original. The Vello backend needs a module built with the
feature `vello` of this crate; the application fails to start
without it, with a message that names the feature.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/Browser/FerroUI.Browser/browser_app_builder.rs#L142)

<a id="struct_field-register_ferro_service_worker"></a>

### register_ferro_service_worker

```rust
register_ferro_service_worker: bool
```

Defines if the service worker used by FerroUI should be registered.
If registered, service worker can work as a save file picker fallback
on the browsers that don't support native implementation. For more
details, see
https://github.com/jimmywarting/native-file-system-adapter#a-note-when-downloading-with-the-polyfilled-version.

Unstable: this property might not work reliably.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/Browser/FerroUI.Browser/browser_app_builder.rs#L151)

<a id="struct_field-ferro_service_worker_scope"></a>

### ferro_service_worker_scope

```rust
ferro_service_worker_scope: Option<String>
```

If `register_ferro_service_worker`
is enabled, it is possible to redefine scope for the worker. By
default the scope is the directory of the worker script, which is the
root of the site (the documentation of the original says the domain
root, which differs when the site is served from a subpath).

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/Browser/FerroUI.Browser/browser_app_builder.rs#L158)

<a id="struct_field-prefer_file_dialog_polyfill"></a>

### prefer_file_dialog_polyfill

```rust
prefer_file_dialog_polyfill: bool
```

The file dialogs use the `native-file-system-adapter` polyfill. If
the native implementation is available, by default it is used. This
property forces the polyfill to be always used. For more details, see
https://github.com/jimmywarting/native-file-system-adapter#a-note-when-downloading-with-the-polyfilled-version.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/Browser/FerroUI.Browser/browser_app_builder.rs#L164)

<a id="struct_field-render_thread"></a>

### render_thread

```rust
render_thread: bool
```

Whether a module built with threads renders on a render thread: the
compositor and the render backend then run in a worker that owns the
canvases of the views, and the thread of the page keeps the user
interface. `true` by default. With `false` such a module renders on
the thread of the page, as a module built without threads always
does; the option has no effect there.

Not in the original, where a build with threads always renders on
its render worker.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/Browser/FerroUI.Browser/browser_app_builder.rs#L175)

## Trait implementations

- `Send`
- `Sync`
- `Freeze`
- `UnsafeUnpin`
- `Unpin`
- `UnwindSafe`
- `RefUnwindSafe`
- `Borrow<T>`
- `BorrowMut<T>`
- `CloneToUninit`
- `Into<U>`
- `From<T>`
- `TryInto<U>`
- `TryFrom<U>`
- `Any`
- `ToOwned`
- [`Upcast<T>`](/docs/0.5.0/api/ferroui-base/trait-upcast/)
- [`PropertyValue`](/docs/0.5.0/api/ferroui-base/trait-propertyvalue/)
- [`AnyValue`](/docs/0.5.0/api/ferroui-base/trait-anyvalue/)
- [`ClassDefaults`](/docs/0.5.0/api/ferroui-base/trait-classdefaults/)
- `Clone`
- `Debug`
- `StructuralPartialEq`
- `PartialEq`
- `Eq`
- `Default`
- `ErasedDestructor`
- `IntoEither`

## Availability

Extracted for `wasm32-unknown-emscripten`, `aarch64-apple-darwin`. Cargo features are listed in the [crate index](/docs/0.5.0/api/).
