Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
constructor(public navCtrl: NavController, public navParams: NavParams) {
Plugins.Browser.addListener('browserFinished', (info: any) => {
console.log('Browser all done!');
});
Plugins.Browser.addListener('browserPageLoaded', (info: any) => {
console.log('Browser page loaded!');
});
Plugins.Browser.prefetch({
urls: ["https://ionicframework.com/"]
});
}
browserOpen() {
Plugins.Browser.open({
url: 'https://ionicframework.com',
toolbarColor: "#5A5DF5"
});
setTimeout(() => {
Plugins.Browser.close();
}, 5000);
}
openInBrowser(url: string): Promise {
return Plugins.Browser.open({ url, toolbarColor: '#1e2023' });
}
setTimeout(() => {
Plugins.Browser.close();
}, 5000);
}
async openWiki(): Promise {
const url = `https://oldschool.runescape.wiki/w/${this.item.name}`;
Plugins.Browser.open({ url, toolbarColor: '#1e2023' });
}
el.onclick = (event: Event) => {
event.preventDefault();
Plugins.Browser.open({ url: el.href, toolbarColor: '#1e2023' });
};
});
async openInBrowser(url: string): Promise {
Plugins.Browser.open({ url, toolbarColor: '#1e2023' });
}
}