papyrus_platform_interface library
Platform interface contracts and shared data models for the Papyrus WebView.
This library defines the abstract PapyrusPlatform interface, all shared data transfer objects (requests, events, policies), and the full configuration model used across every platform implementation.
Classes
- PapyrusAccessibilityPolicy
- Accessibility options for the webview.
- PapyrusAllowResource
- PapyrusBlockResource
- PapyrusConfiguration
- The top-level configuration object that controls all webview behaviour.
- PapyrusConsoleMessage
- PapyrusContentMetadata
- Optional metadata that describes the origin and type of loaded content.
- PapyrusContentSize
- PapyrusContentSizeChangedEvent
- PapyrusDataRequest
- A load request that renders raw binary data with a given MIME type.
- PapyrusDisplayPolicy
- Policy controlling display options such as auto-height, zoom, dark mode, text zoom, and background colour.
- PapyrusDownloadRequest
- PapyrusErrorEvent
- PapyrusEvent
- PapyrusFileRequest
- A load request that loads a local file from the device filesystem.
- PapyrusHtmlComposer
- PapyrusHtmlRequest
- A load request that renders an inline HTML string in the webview.
- PapyrusInteractionPolicy
- Policy controlling pointer and gesture interaction with the webview content.
- PapyrusJavaScriptPolicy
- Policy governing JavaScript execution and host-app channel communication.
- PapyrusLoadRequest
- The base class for all webview load requests.
- PapyrusMeasurementPolicy
- Policy controlling content-size measurement and mutation observation.
- PapyrusMediaPolicy
- Policy controlling media autoplay, inline playback, and fullscreen.
- Policy that controls which navigations the webview is allowed to perform.
- Describes a navigation attempt in the webview, passed to a PapyrusNavigationResolver for policy evaluation.
- PapyrusPageFinishedEvent
- PapyrusPageStartedEvent
- PapyrusPermissionRequest
- PapyrusPlatform
- PapyrusPlatformCapabilities
- PapyrusPlatformOptions
- Low-level platform-specific options not covered by the cross-platform policy model.
- PapyrusPrintOptions
- PapyrusProfiles
- Predefined PapyrusConfiguration presets for common use-cases.
- PapyrusProgressEvent
- PapyrusResourceDecision
- PapyrusResourcePolicy
- Policy that controls how the webview loads sub-resources such as images, scripts, and stylesheets.
- PapyrusResourceRegistry
- PapyrusResourceRequest
- PapyrusResourceResponse
- PapyrusRespondWithResource
- PapyrusSecurityPolicy
- Security policy controlling JavaScript, file access, popups, and other sensitive browser capabilities.
- PapyrusSnapshotOptions
- PapyrusStorageClearOptions
- PapyrusStoragePolicy
- Policy controlling cookie storage, local storage, and HTTP cache behaviour.
- PapyrusUriRequest
- A load request that navigates the webview to a URL.
- PapyrusUserScript
- A JavaScript snippet that is injected into every page loaded by the webview.
- PapyrusViewportPolicy
- Viewport meta-tag settings injected into loaded HTML documents.
- PapyrusVirtualResource
- PapyrusVirtualResourceProvider
- PapyrusWebMessage
Enums
- PapyrusCacheMode
- Controls HTTP caching behaviour for the webview.
- PapyrusCookiePolicy
- Controls cookie storage and transmission for the webview session.
- PapyrusDarkMode
- Controls whether the webview renders content in dark mode.
- PapyrusDownloadDecision
- The decision made in response to a download request from the webview.
- PapyrusErrorCode
- Error codes reported by PapyrusException and PapyrusErrorEvent.
- PapyrusHardwareAccelerationMode
- Controls hardware acceleration for the webview renderer.
- PapyrusJavaScriptMode
- Controls which JavaScript execution features are enabled in the webview.
- The decision returned by a navigation resolver to determine what happens when the webview attempts to navigate to a new URL.
- The type of navigation that triggered a PapyrusNavigationRequest.
- PapyrusPermissionDecision
- The decision made in response to a PapyrusPermissionRequest.
- PapyrusPermissionType
- A browser permission type that the web page may request from the user.
- PapyrusRemoteResourceMode
- Controls how the webview handles remote (non-virtual) sub-resource requests.
- PapyrusResourceType
- The type of a sub-resource requested by the webview.
- PapyrusStorageMode
- Controls whether the webview can use persistent local storage (localStorage / IndexedDB).
Functions
-
papyrusConfigurationToMap(
PapyrusConfiguration configuration, {bool resourceResolverEnabled = false}) → JsonMap -
papyrusResourceDecisionFromMap(
Map< Object?, Object?> map) → PapyrusResourceDecision -
papyrusResourceDecisionToMap(
PapyrusResourceDecision decision) → JsonMap
Typedefs
-
JsonMap
= Map<
String, Object?> - A convenience alias for a JSON-compatible map with string keys.
-
PapyrusResourceResolver
= Future<
PapyrusResourceDecision> Function(PapyrusResourceRequest request)
Exceptions / Errors
- PapyrusException
- An exception thrown by Papyrus operations.