Research
Security News
Kill Switch Hidden in npm Packages Typosquatting Chalk and Chokidar
Socket researchers found several malicious npm packages typosquatting Chalk and Chokidar, targeting Node.js developers with kill switches and data theft.
cordova-plugin-browsertab
Advanced tools
Note: This is not an official Google product.
This plugin provides an interface to in-app browser tabs that exist on some mobile platforms, specifically Custom Tabs on Android (including the Chrome Custom Tabs implementation), and SFSafariViewController on iOS.
To open a URL in an in-app browser tab on a compatible platform:
cordova.plugins.browsertab.openUrl('https://www.google.com');
This plugin is designed to complement cordova-plugin-inappbrowser. No fallback is triggered automatically, you need to test whether it will succeed, and then perform your own fallback logic like opening the link in the system browser instead using cordova-plugin-inappbrowser.
cordova.InAppBrowser.open('https://www.google.com/', '_system');
Complete example with fallback handling:
var testURL = 'https://www.google.com';
document.querySelector("#tabwithfallback").addEventListener('click', function(ev) {
cordova.plugins.browsertab.isAvailable(function(result) {
if (!result) {
cordova.InAppBrowser.open(testURL, '_system');
} else {
cordova.plugins.browsertab.openUrl(
testURL,
function(successResp) {},
function(failureResp) {
error.textContent = "failed to launch browser tab";
error.style.display = '';
});
}
},
function(isAvailableError) {
error.textContent = "failed to query availability of in-app browser tab";
error.style.display = '';
});
});
Install Cordova if you haven't already:
npm install -g cordova
Then from the root directory:
cd demo
cordova platform add ios
cordova run ios
cordova platform add android
cordova run android
During development if you want to make changes to the plugin you need to force a rebuild and add the plugin from source, like so (from the demo directory):
cordova plugin remove cordova-plugin-browsertab
cordova plugin add ../plugin
To refresh the platform build:
cordova platform remove ios
cordova platform add ios
To set breakpoints, etc, open the project in the code editor:
cordova platform add ios
open platforms/ios/BrowserTabDemo.xcworkspace
FAQs
In-app browser tabs for Android and iOS
The npm package cordova-plugin-browsertab receives a total of 450 weekly downloads. As such, cordova-plugin-browsertab popularity was classified as not popular.
We found that cordova-plugin-browsertab demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Security News
Socket researchers found several malicious npm packages typosquatting Chalk and Chokidar, targeting Node.js developers with kill switches and data theft.
Security News
pnpm 10 blocks lifecycle scripts by default to improve security, addressing supply chain attack risks but sparking debate over compatibility and workflow changes.
Product
Socket now supports uv.lock files to ensure consistent, secure dependency resolution for Python projects and enhance supply chain security.