diff --git a/index.js b/index.js index 3091042..fe79f95 100644 --- a/index.js +++ b/index.js @@ -3,8 +3,8 @@ import React from "react"; import PropTypes from "prop-types"; - -import { WebView, View, Linking, PixelRatio } from "react-native"; +import { WebView } from "react-native-webview"; +import { View, Linking, PixelRatio } from "react-native"; import BaseComponent from "./BaseComponent"; import Utils from "./Utils"; @@ -62,7 +62,6 @@ class Webbrowser extends BaseComponent { forwardButtonEnabled: false, homeButtonEnabled: true, loading: true, - scalesPageToFit: true, jsCode: this.props.jsCode, cookie: this.props.cookie, WebViewHeight: 0 @@ -177,7 +176,6 @@ class Webbrowser extends BaseComponent { this.refs[WEBVIEW_REF].postMessage(this.state.cookie)} {...(this.state.jsCode ? { injectedJavaScript: this.state.jsCode } @@ -259,7 +255,6 @@ class Webbrowser extends BaseComponent { currentUrl: navState.url, status: navState.title, loading: navState.loading, - scalesPageToFit: true }); this.props.onNavigationStateChange(navState); diff --git a/package.json b/package.json index 8bafe67..33f87b0 100644 --- a/package.json +++ b/package.json @@ -7,5 +7,8 @@ "url": "git+https://github.com/lavajeff/react-native-webview-browser.git" }, "author": "Jeffrey Chai ", - "license": "MIT" + "license": "MIT", + "dependencies": { + "react-native-webview": "^7.5.1" + } } diff --git a/yarn.lock b/yarn.lock index fb57ccd..a24c989 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2,3 +2,34 @@ # yarn lockfile v1 +escape-string-regexp@2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-2.0.0.tgz#a30304e99daa32e23b2fd20f51babd07cffca344" + integrity sha512-UpzcLCXolUWcNu5HtVMHYdXJjArjsF9C0aNnquZYY4uW/Vu0miy5YoWvbV345HauVvcAUnpRuhMMcqTcGOY2+w== + +invariant@2.2.4: + version "2.2.4" + resolved "https://registry.yarnpkg.com/invariant/-/invariant-2.2.4.tgz#610f3c92c9359ce1db616e538008d23ff35158e6" + integrity sha512-phJfQVBuaJM5raOpJjSfkiD6BpbCE4Ns//LaXl6wGYtUBY83nWS6Rf9tXm2e8VaK60JEjYldbPif/A2B1C2gNA== + dependencies: + loose-envify "^1.0.0" + +"js-tokens@^3.0.0 || ^4.0.0": + version "4.0.0" + resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-4.0.0.tgz#19203fb59991df98e3a287050d4647cdeaf32499" + integrity sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ== + +loose-envify@^1.0.0: + version "1.4.0" + resolved "https://registry.yarnpkg.com/loose-envify/-/loose-envify-1.4.0.tgz#71ee51fa7be4caec1a63839f7e682d8132d30caf" + integrity sha512-lyuxPGr/Wfhrlem2CL/UcnUc1zcqKAImBDzukY7Y5F/yQiNdko6+fRLevlw1HgMySw7f611UIY408EtxRSoK3Q== + dependencies: + js-tokens "^3.0.0 || ^4.0.0" + +react-native-webview@^7.5.1: + version "7.5.1" + resolved "https://registry.yarnpkg.com/react-native-webview/-/react-native-webview-7.5.1.tgz#01b026c1110d7548123460cc640fb1d4227a0f54" + integrity sha512-lFpa4m8CMapk6vbZf2GiQDGxsQSRrKoVElTFCkDI5BEl5/a14ClASnJdIyr6U6uYj7ZjcAYsaqNtz86BJqyRVQ== + dependencies: + escape-string-regexp "2.0.0" + invariant "2.2.4"