Enum embedder_traits::resources::Resource
source · pub enum Resource {
Show 15 variants
Preferences,
BluetoothBlocklist,
DomainList,
HstsPreloadList,
BadCertHTML,
NetErrorHTML,
UserAgentCSS,
ServoCSS,
PresentationalHintsCSS,
QuirksModeCSS,
RippyPNG,
MediaControlsCSS,
MediaControlsJS,
CrashHTML,
DirectoryListingHTML,
}
Variants§
Preferences
A json file of Preferences
configuration.
It can be empty but lots of features will be disabled.
BluetoothBlocklist
A list of GATT services that are blocked from being used by web bluetooth. The format of the file is a list of UUIDs, one per line, with an optional second word to specify the type of blocklist. It can be empty but then all GATT services will be allowed.
DomainList
A list of domain names that are considered public suffixes, typically obtained from https://publicsuffix.org/list/. The Public Suffix List is a cross-vendor initiative to provide an accurate list of domain name suffixes that are under the control of a registry. This is used to prevent cookies from being set for top-level domains that are not controlled by the same entity as the website. It can be empty but all domain names will be considered not public suffixes.
HstsPreloadList
A preloaded list of HTTP Strict Transport Security. It can be an empty list and
HstsList::default()
will be called.
BadCertHTML
A HTML page to display when SslValidation
network error is
reported.
The page contains placeholder ${reason}
for the error code and ${bytes}
for the certificate bytes,
and also ${secret}
for the privileged secret.
It can be empty but then nothing will be displayed when a certificate error occurs.
NetErrorHTML
A HTML page to display when any network error occurs that is not related to SSL validation.
The message can contain a placeholder ${reason}
for the error code.
It can be empty but then nothing will be displayed when an internal error occurs.
UserAgentCSS
A CSS file to style the user agent stylesheet. It can be empty but then there’s simply no user agent stylesheet.
ServoCSS
A CSS file to style the Servo browser. It can be empty but several features might not work as expected.
PresentationalHintsCSS
A CSS file to style the presentational hints. It can be empty but then presentational hints will not be styled.
QuirksModeCSS
A CSS file to style the quirks mode. It can be empty but then quirks mode will not be styled.
RippyPNG
A placeholder image to display if we couldn’t get the requested image.
§Safety
Servo will crash if this is an invalid image. Check resources/rippy.png
in Servo codebase to see what
a default rippy png should look like.
MediaControlsCSS
A CSS file to style the media controls. It can be empty but then media controls will not be styled.
MediaControlsJS
A JS file to control the media controls. It can be empty but then media controls will not work.
CrashHTML
A placeholder HTML page to display when the code responsible for rendering a page panics and the original
page can no longer be displayed.
The message can contain a placeholder ${details}
for the error details.
It can be empty but then nothing will be displayed when a crash occurs.
DirectoryListingHTML
A HTML page to display when a directory listing is requested.
The page contains a js function setData
that will then be used to build the list of directory.
It can be empty but then nothing will be displayed when a directory listing is requested.