Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

expo-web-browser

Package Overview
Dependencies
Maintainers
20
Versions
101
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

expo-web-browser - npm Package Compare versions

Comparing version 8.1.0 to 8.1.1

CHANGELOG.md

13

build/WebBrowser.js

@@ -109,3 +109,12 @@ import { UnavailabilityError } from '@unimodules/core';

let _onWebBrowserCloseAndroid = null;
// If the initial AppState.currentState is null, we assume that the first call to
// AppState#change event is not actually triggered by a real change,
// is triggered instead by the bridge capturing the current state
// (https://facebook.github.io/react-native/docs/appstate#basic-usage)
let _isAppStateAvailable = AppState.currentState !== null;
function _onAppStateChangeAndroid(state) {
if (!_isAppStateAvailable) {
_isAppStateAvailable = true;
return;
}
if (state === 'active' && _onWebBrowserCloseAndroid) {

@@ -116,3 +125,3 @@ _onWebBrowserCloseAndroid();

async function _openBrowserAndWaitAndroidAsync(startUrl, browserParams = {}) {
let appStateChangedToActive = new Promise(resolve => {
const appStateChangedToActive = new Promise(resolve => {
_onWebBrowserCloseAndroid = resolve;

@@ -122,3 +131,3 @@ AppState.addEventListener('change', _onAppStateChangeAndroid);

let result = { type: 'cancel' };
let { type } = await openBrowserAsync(startUrl, browserParams);
const { type } = await openBrowserAsync(startUrl, browserParams);
if (type === 'opened') {

@@ -125,0 +134,0 @@ await appStateChangedToActive;

4

package.json
{
"name": "expo-web-browser",
"version": "8.1.0",
"version": "8.1.1",
"description": "Provides access to the system's web browser and supports handling redirects. On iOS, it uses SFSafariViewController or SFAuthenticationSession, depending on the method you call, and on Android it uses ChromeCustomTabs. As of iOS 11, SFSafariViewController no longer shares cookies with the Safari, so if you are using WebBrowser for authentication you will want to use WebBrowser.openAuthSessionAsync, and if you just want to open a webpage (such as your app privacy policy), then use WebBrowser.openBrowserAsync.",

@@ -44,3 +44,3 @@ "main": "build/WebBrowser.js",

},
"gitHead": "3ad68bbd9847ebc8a55272c263b17d998a92f64f"
"gitHead": "2f1fb3daa49eca6b03e903a45db312bbfe3e4b5c"
}

@@ -152,3 +152,13 @@ import { UnavailabilityError } from '@unimodules/core';

// If the initial AppState.currentState is null, we assume that the first call to
// AppState#change event is not actually triggered by a real change,
// is triggered instead by the bridge capturing the current state
// (https://facebook.github.io/react-native/docs/appstate#basic-usage)
let _isAppStateAvailable: boolean = AppState.currentState !== null;
function _onAppStateChangeAndroid(state: AppStateStatus) {
if (!_isAppStateAvailable) {
_isAppStateAvailable = true;
return;
}
if (state === 'active' && _onWebBrowserCloseAndroid) {

@@ -163,3 +173,3 @@ _onWebBrowserCloseAndroid();

): Promise<WebBrowserResult> {
let appStateChangedToActive = new Promise(resolve => {
const appStateChangedToActive = new Promise(resolve => {
_onWebBrowserCloseAndroid = resolve;

@@ -170,3 +180,3 @@ AppState.addEventListener('change', _onAppStateChangeAndroid);

let result: WebBrowserResult = { type: 'cancel' };
let { type } = await openBrowserAsync(startUrl, browserParams);
const { type } = await openBrowserAsync(startUrl, browserParams);

@@ -173,0 +183,0 @@ if (type === 'opened') {

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc