Socket
Socket
Sign inDemoInstall

expo-web-browser

Package Overview
Dependencies
Maintainers
21
Versions
89
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

expo-web-browser

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


Version published
Weekly downloads
281K
increased by5.76%
Maintainers
21
Weekly downloads
 
Created

What is expo-web-browser?

The expo-web-browser package provides an API to open web pages in a browser within an Expo app. It allows developers to open URLs in a web browser or an in-app browser, providing a seamless user experience.

What are expo-web-browser's main functionalities?

Open a URL in the system's web browser

This feature allows you to open a URL in the system's default web browser. The `openBrowserAsync` function takes a URL as an argument and opens it in the browser.

import * as WebBrowser from 'expo-web-browser';

async function openBrowser() {
  let result = await WebBrowser.openBrowserAsync('https://example.com');
  console.log(result);
}

Open a URL in an in-app browser

This feature allows you to open a URL in an in-app browser with additional options like reader mode and bar collapsing. The `openBrowserAsync` function can take a second argument with options to customize the in-app browser.

import * as WebBrowser from 'expo-web-browser';

async function openInAppBrowser() {
  let result = await WebBrowser.openBrowserAsync('https://example.com', {
    readerMode: true,
    enableBarCollapsing: true
  });
  console.log(result);
}

Dismiss the in-app browser

This feature allows you to programmatically dismiss the in-app browser. The `dismissBrowser` function can be called to close the in-app browser if it is open.

import * as WebBrowser from 'expo-web-browser';

function dismissBrowser() {
  WebBrowser.dismissBrowser();
}

Other packages similar to expo-web-browser

Keywords

FAQs

Package last updated on 25 Oct 2022

Did you know?

Socket

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.

Install

Related posts

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