@capacitor/browser
Advanced tools
Comparing version 0.2.0 to 0.2.1
@@ -6,2 +6,15 @@ # Change Log | ||
## [0.2.1](https://github.com/ionic-team/capacitor-plugins/compare/@capacitor/browser@0.2.0...@capacitor/browser@0.2.1) (2020-12-20) | ||
### Bug Fixes | ||
* Migrate plugins from Color.parseColor() to WebColor.parseColor() ([#140](https://github.com/ionic-team/capacitor-plugins/issues/140)) ([26625cf](https://github.com/ionic-team/capacitor-plugins/commit/26625cfefe45b8d1f17ce27efbc8b04f23e99d93)) | ||
* support deprecated types from Capacitor 2 ([#139](https://github.com/ionic-team/capacitor-plugins/issues/139)) ([2d7127a](https://github.com/ionic-team/capacitor-plugins/commit/2d7127a488e26f0287951921a6db47c49d817336)) | ||
* **browser:** don't expose load method ([#128](https://github.com/ionic-team/capacitor-plugins/issues/128)) ([945e59b](https://github.com/ionic-team/capacitor-plugins/commit/945e59b622bad42d33804d0ffb4ca9afcb7f9b07)) | ||
# [0.2.0](https://github.com/ionic-team/capacitor-plugins/compare/@capacitor/browser@0.1.0...@capacitor/browser@0.2.0) (2020-12-02) | ||
@@ -8,0 +21,0 @@ |
@@ -10,3 +10,3 @@ { | ||
"name": "open", | ||
"signature": "(options: BrowserOpenOptions) => Promise<void>", | ||
"signature": "(options: OpenOptions) => Promise<void>", | ||
"parameters": [ | ||
@@ -16,3 +16,3 @@ { | ||
"docs": "", | ||
"type": "BrowserOpenOptions" | ||
"type": "OpenOptions" | ||
} | ||
@@ -29,3 +29,3 @@ ], | ||
"complexTypes": [ | ||
"BrowserOpenOptions" | ||
"OpenOptions" | ||
], | ||
@@ -56,3 +56,3 @@ "slug": "open" | ||
"docs": "", | ||
"type": "\"browserFinished\"" | ||
"type": "'browserFinished'" | ||
}, | ||
@@ -76,3 +76,3 @@ { | ||
], | ||
"slug": "addlistener" | ||
"slug": "addlistenerbrowserfinished-" | ||
}, | ||
@@ -86,3 +86,3 @@ { | ||
"docs": "", | ||
"type": "\"browserPageLoaded\"" | ||
"type": "'browserPageLoaded'" | ||
}, | ||
@@ -106,3 +106,3 @@ { | ||
], | ||
"slug": "addlistener" | ||
"slug": "addlistenerbrowserpageloaded-" | ||
}, | ||
@@ -129,4 +129,4 @@ { | ||
{ | ||
"name": "BrowserOpenOptions", | ||
"slug": "browseropenoptions", | ||
"name": "OpenOptions", | ||
"slug": "openoptions", | ||
"docs": "Represents the options passed to `open`.", | ||
@@ -187,3 +187,3 @@ "tags": [ | ||
"complexTypes": [], | ||
"type": "\"fullscreen\" | \"popover\" | undefined" | ||
"type": "'fullscreen' | 'popover' | undefined" | ||
} | ||
@@ -209,3 +209,4 @@ ] | ||
], | ||
"enums": [] | ||
"enums": [], | ||
"typeAliases": [] | ||
} |
@@ -8,3 +8,3 @@ import type { PluginListenerHandle } from '@capacitor/core'; | ||
*/ | ||
open(options: BrowserOpenOptions): Promise<void>; | ||
open(options: OpenOptions): Promise<void>; | ||
/** | ||
@@ -42,3 +42,3 @@ * Web & iOS only: Close an open browser window. | ||
*/ | ||
export interface BrowserOpenOptions { | ||
export interface OpenOptions { | ||
/** | ||
@@ -75,1 +75,6 @@ * The URL to which the browser is opened. | ||
} | ||
/** | ||
* @deprecated Use `OpenOptions`. | ||
* @since 1.0.0 | ||
*/ | ||
export declare type BrowserOpenOptions = OpenOptions; |
import type { BrowserPlugin } from './definitions'; | ||
declare const Browser: BrowserPlugin; | ||
export * from './definitions'; | ||
export { Browser }; |
@@ -5,3 +5,4 @@ import { registerPlugin } from '@capacitor/core'; | ||
}); | ||
export * from './definitions'; | ||
export { Browser }; | ||
//# sourceMappingURL=index.js.map |
import { WebPlugin } from '@capacitor/core'; | ||
import type { BrowserPlugin, BrowserOpenOptions } from './definitions'; | ||
import type { BrowserPlugin, OpenOptions } from './definitions'; | ||
export declare class BrowserWeb extends WebPlugin implements BrowserPlugin { | ||
_lastWindow: Window | null; | ||
constructor(); | ||
open(options: BrowserOpenOptions): Promise<void>; | ||
open(options: OpenOptions): Promise<void>; | ||
close(): Promise<void>; | ||
@@ -8,0 +8,0 @@ } |
{ | ||
"name": "@capacitor/browser", | ||
"version": "0.2.0", | ||
"version": "0.2.1", | ||
"description": "The Browser API provides the ability to open an in-app browser and subscribe to browser events.", | ||
@@ -46,6 +46,6 @@ "main": "dist/esm/index.js", | ||
"devDependencies": { | ||
"@capacitor/android": "^3.0.0-alpha.7", | ||
"@capacitor/core": "^3.0.0-alpha.7", | ||
"@capacitor/docgen": "^0.0.10", | ||
"@capacitor/ios": "^3.0.0-alpha.7", | ||
"@capacitor/android": "^3.0.0-alpha.10", | ||
"@capacitor/core": "^3.0.0-alpha.9", | ||
"@capacitor/docgen": "0.0.14", | ||
"@capacitor/ios": "^3.0.0-alpha.9", | ||
"@ionic/eslint-config": "^0.3.0", | ||
@@ -63,3 +63,3 @@ "@ionic/prettier-config": "~1.0.1", | ||
"peerDependencies": { | ||
"@capacitor/core": "^3.0.0-alpha.6" | ||
"@capacitor/core": "^3.0.0-alpha.9" | ||
}, | ||
@@ -82,3 +82,3 @@ "prettier": "@ionic/prettier-config", | ||
}, | ||
"gitHead": "78c1981920988ec84c17bbc61b1da1df9743571c" | ||
"gitHead": "481260d148b920b85755dd5f9b65df0bb0db4244" | ||
} |
@@ -5,2 +5,4 @@ # @capacitor/browser | ||
On iOS, this uses `SFSafariViewController` and is compliant with leading OAuth service in-app-browser requirements. | ||
## Install | ||
@@ -13,2 +15,12 @@ | ||
## Example | ||
```typescript | ||
import { Browser } from '@capacitor/browser'; | ||
const openCapacitorSite = async () => { | ||
await Browser.open({ url: 'http://capacitorjs.com/' }); | ||
}; | ||
``` | ||
## API | ||
@@ -20,4 +32,4 @@ | ||
* [`close()`](#close) | ||
* [`addListener(...)`](#addlistener) | ||
* [`addListener(...)`](#addlistener) | ||
* [`addListener('browserFinished', ...)`](#addlistenerbrowserfinished-) | ||
* [`addListener('browserPageLoaded', ...)`](#addlistenerbrowserpageloaded-) | ||
* [`removeAllListeners()`](#removealllisteners) | ||
@@ -34,3 +46,3 @@ * [Interfaces](#interfaces) | ||
```typescript | ||
open(options: BrowserOpenOptions) => Promise<void> | ||
open(options: OpenOptions) => Promise<void> | ||
``` | ||
@@ -40,5 +52,5 @@ | ||
| Param | Type | | ||
| ------------- | ----------------------------------------------------------------- | | ||
| **`options`** | <code><a href="#browseropenoptions">BrowserOpenOptions</a></code> | | ||
| Param | Type | | ||
| ------------- | --------------------------------------------------- | | ||
| **`options`** | <code><a href="#openoptions">OpenOptions</a></code> | | ||
@@ -65,3 +77,3 @@ **Since:** 1.0.0 | ||
### addListener(...) | ||
### addListener('browserFinished', ...) | ||
@@ -76,3 +88,3 @@ ```typescript | ||
| ------------------ | ------------------------------ | | ||
| **`eventName`** | <code>"browserFinished"</code> | | ||
| **`eventName`** | <code>'browserFinished'</code> | | ||
| **`listenerFunc`** | <code>() => void</code> | | ||
@@ -87,3 +99,3 @@ | ||
### addListener(...) | ||
### addListener('browserPageLoaded', ...) | ||
@@ -98,3 +110,3 @@ ```typescript | ||
| ------------------ | -------------------------------- | | ||
| **`eventName`** | <code>"browserPageLoaded"</code> | | ||
| **`eventName`** | <code>'browserPageLoaded'</code> | | ||
| **`listenerFunc`** | <code>() => void</code> | | ||
@@ -125,3 +137,3 @@ | ||
#### BrowserOpenOptions | ||
#### OpenOptions | ||
@@ -135,3 +147,3 @@ Represents the options passed to `open`. | ||
| **`toolbarColor`** | <code>string</code> | A hex color to which the toolbar color is set. | 1.0.0 | | ||
| **`presentationStyle`** | <code>"fullscreen" \| "popover"</code> | iOS only: The presentation style of the browser. Defaults to fullscreen. Ignored on other platforms. | 1.0.0 | | ||
| **`presentationStyle`** | <code>'fullscreen' \| 'popover'</code> | iOS only: The presentation style of the browser. Defaults to fullscreen. Ignored on other platforms. | 1.0.0 | | ||
@@ -138,0 +150,0 @@ |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
39465
626
147