Opens a simplified in app browser, prioritizing readability
npm install capacitor-readerOpens a simplified in app browser, prioritizing readability.
If you're looking for additional functionality, this plugin is not for you. ;)
``bash`
npm install capacitor-reader
npx cap sync
* open(...)
* addListener('browserFinished', ...)
* Interfaces
`typescript`
open(options: CapacitorReaderOpenOptions) => Promise
iOS & Android only
| Param | Type |
| ------------- | --------------------------------------------------------------------------------- |
| options | CapacitorReaderOpenOptions |
--------------------
`typescript`
addListener(eventName: 'browserFinished', listenerFunc: () => void) => Promise
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>
--------------------
#### 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> |