RestrictionAllowlist.Builder
public final class RestrictionAllowlist.Builder
RestrictionAllowlist builder. Add the RestrictionAllowlist produced to a WebView via addAllowlist.
Summary
Public constructors |
|---|
|
Construct a RestrictionAllowlist Builder |
Public methods |
|
|---|---|
@NonNull RestrictionAllowlist.Builder |
addJavaScriptInterface(@NonNull Object object, @NonNull String name)This API is the same as addJavascriptInterface except it will only inject the interface into the origin patterns allowed. |
@NonNull RestrictionAllowlist |
build()Constructs a new RestrictionAllowlist that can be attached via setRestrictionAllowlist. |
Public constructors
Public methods
addJavaScriptInterface
public @NonNull RestrictionAllowlist.Builder addJavaScriptInterface(@NonNull Object object, @NonNull String name)
This API is the same as addJavascriptInterface except it will only inject the interface into the origin patterns allowed.
A name value may only be used once per WebViewBuilder, regardless of whether it's the same, a different, or an equivalent allowlist.
build
public @NonNull RestrictionAllowlist build()
Constructs a new RestrictionAllowlist that can be attached via setRestrictionAllowlist.
| See also | |
|---|---|
WebViewBuilder |