public interface BrowserSettings
Modifier and Type | Method and Description |
---|---|
void |
allowJavaScriptAccessClipboard()
Allows JavaScript code on the web pages loaded in the browser to access clipboard.
|
void |
allowJavaScriptAccessCookies()
Allows JavaScript code on the web pages loaded in the browser to read/write cookies in the
cookies storage using the
document.cookie property. |
void |
allowLoadingImagesAutomatically()
Allows loading images automatically on the web pages loaded in the browser.
|
void |
allowRunningInsecureContent()
Allows running an insecure content in the browser.
|
void |
allowScriptsToCloseWindows()
Allows JavaScript code on the web pages loaded in the browser to close the browser.
|
java.lang.String |
defaultEncoding()
Returns a string that represents the default text encoding.
|
void |
defaultEncoding(java.lang.String defaultEncoding)
Updates the default text encoding with the given value.
|
void |
disableApplicationCache()
Disables the application cache in the browser.
|
void |
disableImages()
Disables images displaying on the web pages loaded in the browser.
|
void |
disableJavaScript()
Disables JavaScript on the web pages loaded in the browser.
|
void |
disableLocalStorage()
Disables the local storage in the browser.
|
void |
disableOverscrollHistoryNavigation()
Disallows back/forward navigation with a left/right swipe.
|
void |
disablePlugins()
Disables all plugins on the web pages loaded in the browser.
|
void |
disableTransparentBackground()
Disables transparent background on the web pages and makes it opaque.
|
void |
disallowJavaScriptAccessClipboard()
Disallows JavaScript code on the web pages loaded in the browser to access clipboard.
|
void |
disallowJavaScriptAccessCookies()
Disallows JavaScript code on the web pages loaded in the browser to read/write cookies in the
cookies storage using the
document.cookie property. |
void |
disallowLoadingImagesAutomatically()
Disallows loading images automatically on the web pages loaded in the browser.
|
void |
disallowRunningInsecureContent()
Disallows running an insecure content in the browser.
|
void |
disallowScriptsToCloseWindows()
Disallows JavaScript code on the web pages loaded in the browser to close the browser.
|
void |
enableApplicationCache()
Enables the application cache in the browser.
|
void |
enableImages()
Enables images displaying on the web pages loaded in the browser.
|
void |
enableJavaScript()
Enables JavaScript on the web pages loaded in the browser.
|
void |
enableLocalStorage()
Enables the local storage in the browser.
|
void |
enableOverscrollHistoryNavigation()
Allows back/forward navigation with a left/right swipe.
|
void |
enablePlugins()
Enables all plugins on the web pages loaded in the browser.
|
void |
enableTransparentBackground()
Enables transparent background on the web pages.
|
void |
hideScrollbars()
Hides the scrollbars on the web pages loaded in the browser.
|
boolean |
isAllowJavaScriptAccessClipboard()
Indicates whether JavaScript code on the web pages loaded in the browser can access
clipboard.
|
boolean |
isAllowJavaScriptAccessCookies()
Indicates whether JavaScript code is allowed to read/write cookies in the browser cookies
storage.
|
boolean |
isAllowLoadingImagesAutomatically()
Indicates whether images are allowed to be loaded automatically on the web pages loaded in
the browser.
|
boolean |
isAllowRunningInsecureContent()
Indicates whether an insecure content can run in the browser.
|
boolean |
isAllowScriptsToCloseWindows()
Indicates whether JavaScript code on the web pages loaded in the browser can close the
browser.
|
boolean |
isApplicationCacheEnabled()
Indicates whether the application cache in the browser is enabled.
|
boolean |
isImagesEnabled()
Indicates whether images are displayed on the web pages loaded in the browser.
|
boolean |
isJavaScriptEnabled()
Indicates whether JavaScript on the web pages loaded in the browser is enabled.
|
boolean |
isLocalStorageEnabled()
Indicates whether the local storage in the browser is enabled.
|
boolean |
isOverscrollHistoryNavigationEnabled()
Indicates whether the browser can navigate back/forward with a left/right swipe on a devices
with touch screen.
|
boolean |
isPluginsEnabled()
Indicates whether plugins are enabled on the web pages loaded in the browser.
|
boolean |
isTransparentBackgroundEnabled()
Returns
true when the transparent background on the web pages is enabled. |
boolean |
scrollbarsHidden()
Indicates whether scrollbars on a web page loaded in the browser are hidden.
|
void |
showScrollbars()
Shows the scrollbars on the web pages loaded in the browser.
|
WebRtcIpHandlingPolicy |
webRtcIpHandlingPolicy()
Returns the WebRTC IP handling policy for the browser.
|
void |
webRtcIpHandlingPolicy(WebRtcIpHandlingPolicy policy)
Updates the WebRTC IP handling policy for the browser with the given one.
|
java.lang.String defaultEncoding()
void defaultEncoding(java.lang.String defaultEncoding)
defaultEncoding
- a string that represents the new default text encodingjava.lang.IllegalArgumentException
- when defaultEncoding
is empty or blankjava.lang.IllegalStateException
- when the browser is closedboolean isJavaScriptEnabled()
java.lang.IllegalStateException
- when the browser is closedvoid enableJavaScript()
java.lang.IllegalStateException
- when the browser is closedvoid disableJavaScript()
java.lang.IllegalStateException
- when the browser is closedboolean isAllowLoadingImagesAutomatically()
java.lang.IllegalStateException
- when the browser is closedvoid allowLoadingImagesAutomatically()
java.lang.IllegalStateException
- when the browser is closedvoid disallowLoadingImagesAutomatically()
java.lang.IllegalStateException
- when the browser is closedboolean isImagesEnabled()
java.lang.IllegalStateException
- when the browser is closedvoid enableImages()
java.lang.IllegalStateException
- when the browser is closedvoid disableImages()
java.lang.IllegalStateException
- when the browser is closedboolean isPluginsEnabled()
java.lang.IllegalStateException
- when the browser is closedvoid enablePlugins()
java.lang.IllegalStateException
- when the browser is closedvoid disablePlugins()
java.lang.IllegalStateException
- when the browser is closedboolean isAllowScriptsToCloseWindows()
java.lang.IllegalStateException
- when the browser is closedvoid allowScriptsToCloseWindows()
java.lang.IllegalStateException
- when the browser is closedvoid disallowScriptsToCloseWindows()
java.lang.IllegalStateException
- when the browser is closedboolean isAllowJavaScriptAccessClipboard()
java.lang.IllegalStateException
- when the browser is closedvoid allowJavaScriptAccessClipboard()
java.lang.IllegalStateException
- when the browser is closedvoid disallowJavaScriptAccessClipboard()
java.lang.IllegalStateException
- when the browser is closedboolean isLocalStorageEnabled()
java.lang.IllegalStateException
- when the browser is closedvoid enableLocalStorage()
java.lang.IllegalStateException
- when the browser is closedvoid disableLocalStorage()
java.lang.IllegalStateException
- when the browser is closedboolean isApplicationCacheEnabled()
java.lang.IllegalStateException
- when the browser is closedvoid enableApplicationCache()
java.lang.IllegalStateException
- when the browser is closedvoid disableApplicationCache()
java.lang.IllegalStateException
- when the browser is closedboolean isAllowRunningInsecureContent()
java.lang.IllegalStateException
- when the browser is closedvoid allowRunningInsecureContent()
java.lang.IllegalStateException
- when the browser is closedvoid disallowRunningInsecureContent()
java.lang.IllegalStateException
- when the browser is closedWebRtcIpHandlingPolicy webRtcIpHandlingPolicy()
java.lang.IllegalStateException
- when the browser is closedvoid webRtcIpHandlingPolicy(WebRtcIpHandlingPolicy policy)
policy
- a new WebRTC IP handling policyjava.lang.IllegalStateException
- when the browser is closedvoid hideScrollbars()
java.lang.IllegalStateException
- when the browser is closedvoid showScrollbars()
java.lang.IllegalStateException
- when the browser is closedboolean scrollbarsHidden()
java.lang.IllegalStateException
- when the browser is closedvoid allowJavaScriptAccessCookies()
document.cookie
property.java.lang.IllegalStateException
- when the browser is closedvoid disallowJavaScriptAccessCookies()
document.cookie
property.java.lang.IllegalStateException
- when the browser is closedboolean isAllowJavaScriptAccessCookies()
document.cookie
property.
If JavaScript is not allowed to read/write cookies then document.cookie
will
return an empty string, and document.cookie='test-cookie=test'
will not change
cookies in the cookies storage.
java.lang.IllegalStateException
- when the browser is closedvoid enableTransparentBackground()
This method supports only the RenderingMode.OFF_SCREEN
rendering mode on Windows and Linux, and the both rendering modes on macOS. Throws an
exception if the current rendering mode is not supported.
java.lang.IllegalStateException
- when the current browser is already closedUnsupportedRenderingModeException
- when the current rendering mode is not supportedvoid disableTransparentBackground()
This method supports only the RenderingMode.OFF_SCREEN
rendering mode on Windows and Linux, and the both rendering modes on macOS. Throws an
exception if the current rendering mode is not supported.
java.lang.IllegalStateException
- when the current browser is already closedUnsupportedRenderingModeException
- when the current rendering mode is not supportedboolean isTransparentBackgroundEnabled()
true
when the transparent background on the web pages is enabled.
This method supports only the RenderingMode.OFF_SCREEN
rendering mode on Windows and Linux, and the both rendering modes on macOS. Throws an
exception if the current rendering mode is not supported.
java.lang.IllegalStateException
- when the current browser is already closedUnsupportedRenderingModeException
- when the current rendering mode is not supportedboolean isOverscrollHistoryNavigationEnabled()
java.lang.IllegalStateException
- when the browser is closedvoid enableOverscrollHistoryNavigation()
java.lang.IllegalStateException
- when the browser is closedvoid disableOverscrollHistoryNavigation()
java.lang.IllegalStateException
- when the browser is closed