0.4.0 • Published 5 years ago
cap-browser v0.4.0
CapBrowser
This capacitor plugin looks similar to Browser core plugin but with additional features like
- Http header support (iOS & Android)
- Browser url change event (iOS & Android)
- Can show LaunchImage as privacy screen (iOS only)
- Support for plain browser (iOS & Android)
Custom configuration for browser UI (iOS & Android)
API
open
CapBrowser.open({
url: 'http://google.com/',
headers: { "one": "1", "two": "2" },
isPresentAfterPageLoad: true
}).then(() => {
console.log('showing the window');
})
openWebView - Opens a plain webView instance without navBar
CapBrowser.openWebView({
url: 'https://www.google.com/',
headers: { "one": "1", "two": "2" },
title: "Custom Title",
toolbarType: "navigation",
shareDisclaimer: {
title: "Disclaimer",
message: "Some Content",
confirmBtn: "Proceed",
cancelBtn: "No"
},
shareSubject: "Some subject",
isPresentAfterPageLoad: true
}).then(() => {
console.log('showing the window');
})
Close
CapBrowser.close().then(() => {
console.log('browser closed');
})
Available Events - Works for both android (on webView) and iOS
CapBrowser.addListener("urlChangeEvent", (info: any) => {
console.log(info.url)
})
CapBrowser.addListener("confirmBtnClicked", (info: any) => {
// will be triggered when user clicks on confirm button when disclaimer is required, works only on iOS
console.log(info.url)
})
Options
toobarType
export enum ToolBarType {
ACTIVITY = "activity",
NAVIGATION = "navigation",
BLANK = "blank",
DEFAULT = ""
}
TODO
Credits
- WKWebViewController - for iOS
0.4.0
5 years ago
0.3.3
5 years ago
0.3.2
5 years ago
0.3.1
5 years ago
0.3.0
5 years ago
0.2.3
5 years ago
0.2.2
5 years ago
0.2.1
5 years ago
0.2.0
5 years ago
0.1.9
5 years ago
0.1.8
6 years ago
0.1.7
6 years ago
0.1.6
6 years ago
0.1.5
6 years ago
0.1.4
6 years ago
0.1.3
6 years ago
0.1.2
6 years ago
0.1.1
6 years ago
0.1.0
6 years ago
0.0.9
6 years ago
0.0.8
6 years ago
0.0.7
6 years ago
0.0.6
6 years ago
0.0.5
6 years ago
0.0.4
6 years ago
0.0.3
6 years ago
0.0.2
6 years ago
0.0.1
6 years ago