@koodos/browser-capacitor-plugin
v1.0.31
Published
The Browser API provides the ability to open an in-app browser and get data of an online service.
Downloads
27
Readme
service-capacitor-plugin
The Browser plugin provides the ability to open an in-app browser and subscribe to browser events.
Prerequisites
Build plugin
- Pull the plugin beside your capacitor project's root folder
- Install dependencies:
npm install
- Build plugin:
npm run build
Install/build plugin
- In capacitor project's root folder
npm install ../service-capacitor-plugin
npm run build
npx cap sync
API
open(...)
open(params: BrowserParams) => Promise<ServiceData | null>
Open a page with the specified options.
| Param | Type |
| ------------ | ------------------------------------------------------- |
| params
| BrowserParams |
Returns: Promise<ServiceData | null>
Since: 1.0.0
Interfaces
ServiceData
Represents the options passed to open
.
| Prop | Type | Description | Since |
| ------------------- | ------------------- | ---------------------------------- | ----- |
| email
| string | Email of the service user. | 1.0.0 |
| password
| string | Password of the service user. | 1.0.0 |
| profileId
| string | ProfileId of the service user. | 1.0.0 |
| authUrl
| string | authUrl of the service user. | 1.0.0 |
| serviceId
| string | serviceId of the service user. | 1.0.0 |
| profileName
| string | profileName of the service user. | 1.0.0 |
| profileImg
| string | profileImg of the service user. | 1.0.0 |
| profileImgUrl
| string | profileImgUrl of the service user. | 1.0.0 |
| cookies
| any | | |
BrowserParams
Represents the params passed to open
.
| Prop | Type | Description | Since |
| ------------------------- | ------------------- | ------------------------------------------- | ----- |
| firstUrl
| string | Email of the service user. | 1.0.0 |
| browseUrl
| string | Password of the service user. | 1.0.0 |
| browseUrl2
| string | Password of the service user. | 1.0.0 |
| profileUrl
| string | ProfileId of the service user. | 1.0.0 |
| switchProfilePrefix
| string | authUrl of the service user. | 1.0.0 |
| cookieKey
| string | CookieKey to get the serviceId cookie | 1.0.0 |
| loginSelector
| string | loginSelector to get login. | 1.0.0 |
| passwordSelector
| string | passwordSelector to get password. | 1.0.0 |
| authURLSelector
| string | authURLSelector to get authURL. | 1.0.0 |
| liProfile
| string | liProfile to get profiles. | 1.0.0 |
| profileLink
| string | profileLink to get profile-link element. | 1.0.0 |
| dataTkn
| string | dataTkn attribute to get profileId. | 1.0.0 |
| profileImage
| string | profileImage to get .profile-image element. | 1.0.0 |
| profileName
| string | profileName to get .profile-name element. | 1.0.0 |