capacitor-reader
v0.3.1
Published
Opens a simplified in app browser, prioritizing readability
Downloads
803
Readme
capacitor-reader
Opens a simplified in app browser, prioritizing readability.
If you're looking for additional functionality, this plugin is not for you. ;)
Install
npm install capacitor-reader
npx cap sync
API
open(...)
open(options: CapacitorReaderOpenOptions) => Promise<void>
iOS & Android only
| Param | Type |
| ------------- | --------------------------------------------------------------------------------- |
| options
| CapacitorReaderOpenOptions |
addListener('browserFinished', ...)
addListener(eventName: 'browserFinished', listenerFunc: () => void) => Promise<PluginListenerHandle>
iOS only: Listen for the browser finished event. It fires when the Browser is closed by the user.
This is necessary for those that want to track iOS status taps (since capacitor swizzles all iOS navigation taps)
| Param | Type |
| ------------------ | ------------------------------ |
| eventName
| 'browserFinished' |
| listenerFunc
| () => void |
Returns: Promise<PluginListenerHandle>
Interfaces
CapacitorReaderOpenOptions
| Prop | Type | Description | Default |
| ----------------------------- | -------------------- | -------------------------------------------------- | ------------------ |
| url
| string | | |
| toolbarColor
| string | The color of the toolbar | |
| entersReaderIfAvailable
| boolean | Whether to enter reader mode if available iOS only | false |
PluginListenerHandle
| Prop | Type |
| ------------ | ----------------------------------------- |
| remove
| () => Promise<void> |