Commit 36fc04c2 authored by pichillilorenzo's avatar pichillilorenzo

fix #74, merge #81 #83, fix javascript `...args` parameter of...

fix #74, merge #81 #83, fix javascript `...args` parameter of `window.flutter_inappbrowser.callHandler()`
parent b2c2f326
......@@ -15,8 +15,21 @@
</component>
<component name="ChangeListManager">
<list default="true" id="9b41f7a2-a71e-4923-91fb-249d7815b3e7" name="Default" comment="">
<change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/CHANGELOG.md" beforeDir="false" afterPath="$PROJECT_DIR$/CHANGELOG.md" afterDir="false" />
<change beforePath="$PROJECT_DIR$/README.md" beforeDir="false" afterPath="$PROJECT_DIR$/README.md" afterDir="false" />
<change beforePath="$PROJECT_DIR$/android/src/main/java/com/pichillilorenzo/flutter_inappbrowser/InAppWebView/InAppWebView.java" beforeDir="false" afterPath="$PROJECT_DIR$/android/src/main/java/com/pichillilorenzo/flutter_inappbrowser/InAppWebView/InAppWebView.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/android/src/main/java/com/pichillilorenzo/flutter_inappbrowser/InAppWebView/InAppWebViewOptions.java" beforeDir="false" afterPath="$PROJECT_DIR$/android/src/main/java/com/pichillilorenzo/flutter_inappbrowser/InAppWebView/InAppWebViewOptions.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/android/src/main/java/com/pichillilorenzo/flutter_inappbrowser/JavaScriptBridgeInterface.java" beforeDir="false" afterPath="$PROJECT_DIR$/android/src/main/java/com/pichillilorenzo/flutter_inappbrowser/JavaScriptBridgeInterface.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/example/ios/.symlinks/plugins/flutter_inappbrowser/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/example/ios/.symlinks/plugins/flutter_inappbrowser/.idea/workspace.xml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/example/ios/.symlinks/plugins/flutter_inappbrowser/CHANGELOG.md" beforeDir="false" afterPath="$PROJECT_DIR$/example/ios/.symlinks/plugins/flutter_inappbrowser/CHANGELOG.md" afterDir="false" />
<change beforePath="$PROJECT_DIR$/example/ios/.symlinks/plugins/flutter_inappbrowser/README.md" beforeDir="false" afterPath="$PROJECT_DIR$/example/ios/.symlinks/plugins/flutter_inappbrowser/README.md" afterDir="false" />
<change beforePath="$PROJECT_DIR$/example/ios/.symlinks/plugins/flutter_inappbrowser/android/src/main/java/com/pichillilorenzo/flutter_inappbrowser/InAppWebView/InAppWebViewOptions.java" beforeDir="false" afterPath="$PROJECT_DIR$/example/ios/.symlinks/plugins/flutter_inappbrowser/android/src/main/java/com/pichillilorenzo/flutter_inappbrowser/InAppWebView/InAppWebViewOptions.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/example/ios/.symlinks/plugins/flutter_inappbrowser/android/src/main/java/com/pichillilorenzo/flutter_inappbrowser/JavaScriptBridgeInterface.java" beforeDir="false" afterPath="$PROJECT_DIR$/example/ios/.symlinks/plugins/flutter_inappbrowser/android/src/main/java/com/pichillilorenzo/flutter_inappbrowser/JavaScriptBridgeInterface.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/example/ios/.symlinks/plugins/flutter_inappbrowser/ios/Classes/InAppWebView.swift" beforeDir="false" afterPath="$PROJECT_DIR$/example/ios/.symlinks/plugins/flutter_inappbrowser/ios/Classes/InAppWebView.swift" afterDir="false" />
<change beforePath="$PROJECT_DIR$/example/ios/.symlinks/plugins/flutter_inappbrowser/lib/flutter_inappbrowser.dart" beforeDir="false" afterPath="$PROJECT_DIR$/example/ios/.symlinks/plugins/flutter_inappbrowser/lib/flutter_inappbrowser.dart" afterDir="false" />
<change beforePath="$PROJECT_DIR$/example/lib/webview_example.screen.dart" beforeDir="false" afterPath="$PROJECT_DIR$/example/lib/webview_example.screen.dart" afterDir="false" />
<change beforePath="$PROJECT_DIR$/ios/Classes/InAppWebView.swift" beforeDir="false" afterPath="$PROJECT_DIR$/ios/Classes/InAppWebView.swift" afterDir="false" />
<change beforePath="$PROJECT_DIR$/lib/flutter_inappbrowser.dart" beforeDir="false" afterPath="$PROJECT_DIR$/lib/flutter_inappbrowser.dart" afterDir="false" />
<change beforePath="$PROJECT_DIR$/pubspec.yaml" beforeDir="false" afterPath="$PROJECT_DIR$/pubspec.yaml" afterDir="false" />
</list>
......@@ -36,50 +49,51 @@
<session id="-1166585903">
<usages-collector id="statistics.lifecycle.project">
<counts>
<entry key="project.closed" value="5" />
<entry key="project.closed" value="6" />
<entry key="project.open.time.10" value="1" />
<entry key="project.open.time.11" value="1" />
<entry key="project.open.time.14" value="1" />
<entry key="project.open.time.21" value="1" />
<entry key="project.open.time.22" value="1" />
<entry key="project.open.time.25" value="1" />
<entry key="project.open.time.27" value="1" />
<entry key="project.opened" value="6" />
<entry key="project.opened" value="7" />
</counts>
</usages-collector>
<usages-collector id="statistics.file.extensions.edit">
<counts>
<entry key="dart" value="2026" />
<entry key="dart" value="2061" />
<entry key="html" value="464" />
<entry key="md" value="388" />
<entry key="yaml" value="3" />
<entry key="md" value="466" />
<entry key="yaml" value="4" />
</counts>
</usages-collector>
<usages-collector id="statistics.file.types.edit">
<counts>
<entry key="Dart" value="2026" />
<entry key="Dart" value="2061" />
<entry key="HTML" value="466" />
<entry key="Markdown" value="386" />
<entry key="YAML" value="3" />
<entry key="Markdown" value="464" />
<entry key="YAML" value="4" />
</counts>
</usages-collector>
<usages-collector id="statistics.file.extensions.open">
<counts>
<entry key="css" value="1" />
<entry key="dart" value="11" />
<entry key="dart" value="15" />
<entry key="gradle" value="1" />
<entry key="html" value="14" />
<entry key="md" value="2" />
<entry key="yaml" value="1" />
<entry key="yaml" value="2" />
</counts>
</usages-collector>
<usages-collector id="statistics.file.types.open">
<counts>
<entry key="CSS" value="1" />
<entry key="Dart" value="11" />
<entry key="Dart" value="15" />
<entry key="Groovy" value="1" />
<entry key="HTML" value="14" />
<entry key="Markdown" value="2" />
<entry key="YAML" value="1" />
<entry key="YAML" value="2" />
</counts>
</usages-collector>
</session>
......@@ -89,8 +103,8 @@
<file pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/pubspec.yaml">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="30">
<caret line="2" column="14" selection-start-line="2" selection-start-column="14" selection-end-line="2" selection-end-column="14" />
<state relative-caret-position="105">
<caret line="8" column="28" lean-forward="true" selection-start-line="8" selection-start-column="28" selection-end-line="8" selection-end-column="28" />
</state>
</provider>
</entry>
......@@ -98,8 +112,8 @@
<file pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/CHANGELOG.md">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="30">
<caret line="2" column="52" selection-start-line="2" selection-start-column="52" selection-end-line="2" selection-end-column="52" />
<state relative-caret-position="105">
<caret line="7" column="8" lean-forward="true" selection-start-line="7" selection-start-column="8" selection-end-line="7" selection-end-column="8" />
</state>
</provider>
</entry>
......@@ -107,7 +121,7 @@
<file pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/example/lib/main.dart">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="461">
<state relative-caret-position="515">
<caret line="47" column="36" selection-start-line="47" selection-start-column="14" selection-end-line="47" selection-end-column="36" />
<folding>
<element signature="e#0#20#0" expanded="true" />
......@@ -116,37 +130,36 @@
</provider>
</entry>
</file>
<file pinned="false" current-in-tab="true">
<entry file="file://$PROJECT_DIR$/lib/flutter_inappbrowser.dart">
<file pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/example/lib/inline_example.screen.dart">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="159">
<caret line="1191" column="11" lean-forward="true" selection-start-line="1191" selection-start-column="11" selection-end-line="1191" selection-end-column="11" />
<state relative-caret-position="151">
<caret line="57" column="12" selection-start-line="57" selection-start-column="12" selection-end-line="57" selection-end-column="12" />
<folding>
<element signature="e#814#831#0" expanded="true" />
<element signature="e#0#39#0" expanded="true" />
</folding>
</state>
</provider>
</entry>
</file>
<file pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/README.md">
<file pinned="false" current-in-tab="true">
<entry file="file://$PROJECT_DIR$/example/lib/webview_example.screen.dart">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="230">
<caret line="593" selection-start-line="593" selection-end-line="601" selection-end-column="3" />
<folding>
<element signature="e#0#20#0" expanded="true" />
<element signature="e#0#39#0" expanded="true" />
<element signature="e#0#39#0" expanded="true" />
</folding>
<state relative-caret-position="200">
<caret line="77" column="70" lean-forward="true" selection-start-line="77" selection-start-column="70" selection-end-line="77" selection-end-column="70" />
</state>
</provider>
</entry>
</file>
<file pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/example/assets/index.html">
<entry file="file://$PROJECT_DIR$/README.md">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="211">
<caret line="40" column="4" selection-start-line="40" selection-start-column="4" selection-end-line="54" selection-end-column="13" />
<state relative-caret-position="173">
<caret line="825" column="64" selection-start-line="825" selection-start-column="64" selection-end-line="825" selection-end-column="64" />
<folding>
<element signature="e#0#39#0" expanded="true" />
<element signature="e#0#39#0" expanded="true" />
</folding>
</state>
</provider>
</entry>
......@@ -162,11 +175,6 @@
</component>
<component name="FindInProjectRecents">
<findStrings>
<find>distributionUrl</find>
<find>args.putIfAbsent('isData', () =&gt; false);</find>
<find>VERSIONING_SYSTEM</find>
<find>config.build_settings['SWIFT_VERSION']</find>
<find>BUILD TARGET</find>
<find>InAppWebView {</find>
<find>lookupMimeType</find>
<find>AndroidView</find>
......@@ -190,8 +198,13 @@
<find>CallBac</find>
<find>dart</find>
<find>```</find>
<find>addJavaScriptHandler</find>
<find>JavaScriptHandlerCallback</find>
<find>addJavaScriptHandler</find>
<find>indexTest</find>
<find>removeJavaScriptHandler</find>
<find>__safeBrowsingEnabled__</find>
<find>__safe</find>
<find>__textZoom</find>
</findStrings>
<replaceStrings>
<replace>activity.getPreferences(0)</replace>
......@@ -239,21 +252,22 @@
<option value="$PROJECT_DIR$/example/lib/chrome_safari_example.screen.dart" />
<option value="$PROJECT_DIR$/example/lib/test.dart" />
<option value="$PROJECT_DIR$/example/lib/main.dart" />
<option value="$PROJECT_DIR$/example/lib/webview_example.screen.dart" />
<option value="$PROJECT_DIR$/example/assets/css/style.css" />
<option value="$PROJECT_DIR$/example/pubspec.yaml" />
<option value="$PROJECT_DIR$/example/lib/inline_example.screen.dart" />
<option value="$PROJECT_DIR$/example/assets/index.html" />
<option value="$PROJECT_DIR$/example/assets/page-2.html" />
<option value="$PROJECT_DIR$/example/assets/page-1.html" />
<option value="$PROJECT_DIR$/lib/flutter_inappbrowser.dart" />
<option value="$PROJECT_DIR$/README.md" />
<option value="$PROJECT_DIR$/pubspec.yaml" />
<option value="$PROJECT_DIR$/example/lib/inline_example.screen.dart" />
<option value="$PROJECT_DIR$/CHANGELOG.md" />
<option value="$PROJECT_DIR$/lib/flutter_inappbrowser.dart" />
<option value="$PROJECT_DIR$/pubspec.yaml" />
<option value="$PROJECT_DIR$/example/lib/webview_example.screen.dart" />
</list>
</option>
</component>
<component name="ProjectFrameBounds">
<component name="ProjectFrameBounds" extendedState="6">
<option name="x" value="-1920" />
<option name="y" value="23" />
<option name="width" value="1920" />
<option name="height" value="1057" />
......@@ -264,30 +278,36 @@
<foldersAlwaysOnTop value="true" />
</navigator>
<panes>
<pane id="ProjectPane">
<pane id="PackagesPane" />
<pane id="AndroidView">
<subPane>
<expand>
<path>
<item name="flutter_inappbrowser" type="b2602c69:ProjectViewProjectNode" />
<item name="flutter_inappbrowser" type="462c0819:PsiDirectoryNode" />
<item name="flutter_inappbrowser" type="1abcf292:AndroidViewProjectNode" />
<item name="flutter_inappbrowser_android" type="e9137016:NonAndroidModuleNode" />
</path>
<path>
<item name="flutter_inappbrowser" type="b2602c69:ProjectViewProjectNode" />
<item name="flutter_inappbrowser" type="1abcf292:AndroidViewProjectNode" />
<item name="flutter_inappbrowser_android" type="e9137016:NonAndroidModuleNode" />
<item name="java" type="f7eae187:NonAndroidSourceTypeNode" />
</path>
<path>
<item name="flutter_inappbrowser" type="1abcf292:AndroidViewProjectNode" />
<item name="flutter_inappbrowser_android" type="e9137016:NonAndroidModuleNode" />
<item name="java" type="f7eae187:NonAndroidSourceTypeNode" />
<item name="flutter_inappbrowser" type="462c0819:PsiDirectoryNode" />
<item name="example" type="462c0819:PsiDirectoryNode" />
</path>
<path>
<item name="flutter_inappbrowser" type="b2602c69:ProjectViewProjectNode" />
<item name="flutter_inappbrowser" type="1abcf292:AndroidViewProjectNode" />
<item name="flutter_inappbrowser_android" type="e9137016:NonAndroidModuleNode" />
<item name="java" type="f7eae187:NonAndroidSourceTypeNode" />
<item name="flutter_inappbrowser" type="462c0819:PsiDirectoryNode" />
<item name="example" type="462c0819:PsiDirectoryNode" />
<item name="assets" type="462c0819:PsiDirectoryNode" />
<item name="InAppWebView" type="462c0819:PsiDirectoryNode" />
</path>
</expand>
<select />
</subPane>
<option name="show-excluded-files" value="false" />
</pane>
<pane id="PackagesPane" />
<pane id="Scope">
<subPane subId="Project Files">
<expand>
......@@ -299,34 +319,33 @@
<select />
</subPane>
</pane>
<pane id="AndroidView">
<pane id="ProjectPane">
<subPane>
<expand>
<path>
<item name="flutter_inappbrowser" type="1abcf292:AndroidViewProjectNode" />
<item name="flutter_inappbrowser_android" type="e9137016:NonAndroidModuleNode" />
<item name="flutter_inappbrowser" type="b2602c69:ProjectViewProjectNode" />
<item name="flutter_inappbrowser" type="462c0819:PsiDirectoryNode" />
</path>
<path>
<item name="flutter_inappbrowser" type="1abcf292:AndroidViewProjectNode" />
<item name="flutter_inappbrowser_android" type="e9137016:NonAndroidModuleNode" />
<item name="java" type="f7eae187:NonAndroidSourceTypeNode" />
<item name="flutter_inappbrowser" type="b2602c69:ProjectViewProjectNode" />
<item name="flutter_inappbrowser" type="462c0819:PsiDirectoryNode" />
<item name="example" type="462c0819:PsiDirectoryNode" />
</path>
<path>
<item name="flutter_inappbrowser" type="1abcf292:AndroidViewProjectNode" />
<item name="flutter_inappbrowser_android" type="e9137016:NonAndroidModuleNode" />
<item name="java" type="f7eae187:NonAndroidSourceTypeNode" />
<item name="flutter_inappbrowser" type="b2602c69:ProjectViewProjectNode" />
<item name="flutter_inappbrowser" type="462c0819:PsiDirectoryNode" />
<item name="example" type="462c0819:PsiDirectoryNode" />
<item name="lib" type="462c0819:PsiDirectoryNode" />
</path>
<path>
<item name="flutter_inappbrowser" type="1abcf292:AndroidViewProjectNode" />
<item name="flutter_inappbrowser_android" type="e9137016:NonAndroidModuleNode" />
<item name="java" type="f7eae187:NonAndroidSourceTypeNode" />
<item name="flutter_inappbrowser" type="b2602c69:ProjectViewProjectNode" />
<item name="flutter_inappbrowser" type="462c0819:PsiDirectoryNode" />
<item name="InAppWebView" type="462c0819:PsiDirectoryNode" />
<item name="lib" type="462c0819:PsiDirectoryNode" />
</path>
</expand>
<select />
</subPane>
<option name="show-excluded-files" value="false" />
</pane>
</panes>
</component>
......@@ -465,11 +484,11 @@
<servers />
</component>
<component name="ToolWindowManager">
<frame x="0" y="23" width="1920" height="1057" extended-state="0" />
<frame x="-1920" y="23" width="1920" height="1057" extended-state="6" />
<editor active="true" />
<layout>
<window_info content_ui="combo" id="Project" order="0" sideWeight="0.6402778" visible="true" weight="0.18210863" />
<window_info id="Structure" order="1" sideWeight="0.35972223" side_tool="true" visible="true" weight="0.18210863" />
<window_info active="true" content_ui="combo" id="Project" order="0" sideWeight="0.6372007" visible="true" weight="0.18210863" />
<window_info id="Structure" order="1" sideWeight="0.36279926" side_tool="true" visible="true" weight="0.18210863" />
<window_info id="Designer" order="2" />
<window_info id="Build Variants" order="3" side_tool="true" />
<window_info id="Captures" order="4" side_tool="true" weight="0.32936507" />
......@@ -478,7 +497,7 @@
<window_info id="Image Layers" order="7" />
<window_info anchor="bottom" id="Message" order="0" />
<window_info anchor="bottom" id="Find" order="1" weight="0.32745314" />
<window_info anchor="bottom" id="Run" order="2" sideWeight="0.49478307" weight="0.42356688" />
<window_info anchor="bottom" id="Run" order="2" sideWeight="0.49478307" visible="true" weight="0.42356688" />
<window_info anchor="bottom" id="Debug" order="3" weight="0.34288865" />
<window_info anchor="bottom" id="Cvs" order="4" weight="0.25" />
<window_info anchor="bottom" id="Inspection" order="5" weight="0.4" />
......@@ -486,9 +505,9 @@
<window_info anchor="bottom" id="Android Profiler" order="7" show_stripe_button="false" />
<window_info anchor="bottom" id="Event Log" order="8" sideWeight="0.5052169" side_tool="true" weight="0.34068358" />
<window_info anchor="bottom" id="Version Control" order="9" />
<window_info anchor="bottom" id="Terminal" order="10" sideWeight="0.49533224" weight="0.4522293" />
<window_info anchor="bottom" id="Terminal" order="10" sideWeight="0.49533224" weight="0.46921444" />
<window_info anchor="bottom" id="Logcat" order="11" />
<window_info active="true" anchor="bottom" id="Messages" order="12" visible="true" weight="0.2356688" />
<window_info anchor="bottom" id="Messages" order="12" weight="0.2356688" />
<window_info anchor="bottom" id="Dependency Viewer" order="13" weight="0.32800853" />
<window_info anchor="bottom" id="Dart Analysis" order="14" weight="0.32590234" />
<window_info anchor="bottom" id="Flutter Performance" order="15" side_tool="true" />
......@@ -511,9 +530,7 @@
<option name="myLimit" value="2678400000" />
</component>
<component name="editorHistoryManager">
<entry file="file://$PROJECT_DIR$/example/assets/images/dart.svg">
<provider selected="true" editor-type-id="images" />
</entry>
<entry file="file://$PROJECT_DIR$/example/assets/images/dart.svg" />
<entry file="file://$PROJECT_DIR$/flutter_inappbrowser.iml">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="330">
......@@ -680,13 +697,7 @@
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/example/assets/page-3.html">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="270">
<caret line="18" column="30" selection-start-line="18" selection-start-column="30" selection-end-line="18" selection-end-column="30" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/example/assets/page-3.html" />
<entry file="file://$PROJECT_DIR$/android/build.gradle">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="-12">
......@@ -701,13 +712,6 @@
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/example/lib/webview_example.screen.dart">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="780">
<caret line="55" column="21" lean-forward="true" selection-start-line="50" selection-start-column="3" selection-end-line="55" selection-end-column="21" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/example/assets/css/style.css">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="1575">
......@@ -743,40 +747,51 @@
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/example/lib/inline_example.screen.dart">
<entry file="file://$PROJECT_DIR$/example/assets/index.html">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="106">
<caret line="45" column="8" selection-start-line="45" selection-start-column="8" selection-end-line="45" selection-end-column="8" />
<state relative-caret-position="349">
<caret line="40" column="4" selection-start-line="40" selection-start-column="4" selection-end-line="54" selection-end-column="13" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/README.md">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="173">
<caret line="825" column="64" selection-start-line="825" selection-start-column="64" selection-end-line="825" selection-end-column="64" />
<folding>
<element signature="e#0#39#0" expanded="true" />
<element signature="e#0#39#0" expanded="true" />
</folding>
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/example/assets/index.html">
<entry file="file://$PROJECT_DIR$/lib/flutter_inappbrowser.dart">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="211">
<caret line="40" column="4" selection-start-line="40" selection-start-column="4" selection-end-line="54" selection-end-column="13" />
<state relative-caret-position="308">
<caret line="602" column="101" selection-start-line="602" selection-start-column="101" selection-end-line="602" selection-end-column="101" />
<folding>
<element signature="e#814#831#0" expanded="true" />
</folding>
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/pubspec.yaml">
<entry file="file://$PROJECT_DIR$/CHANGELOG.md">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="30">
<caret line="2" column="14" selection-start-line="2" selection-start-column="14" selection-end-line="2" selection-end-column="14" />
<state relative-caret-position="105">
<caret line="7" column="8" lean-forward="true" selection-start-line="7" selection-start-column="8" selection-end-line="7" selection-end-column="8" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/CHANGELOG.md">
<entry file="file://$PROJECT_DIR$/pubspec.yaml">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="30">
<caret line="2" column="52" selection-start-line="2" selection-start-column="52" selection-end-line="2" selection-end-column="52" />
<state relative-caret-position="105">
<caret line="8" column="28" lean-forward="true" selection-start-line="8" selection-start-column="28" selection-end-line="8" selection-end-column="28" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/example/lib/main.dart">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="461">
<state relative-caret-position="515">
<caret line="47" column="36" selection-start-line="47" selection-start-column="14" selection-end-line="47" selection-end-column="36" />
<folding>
<element signature="e#0#20#0" expanded="true" />
......@@ -784,25 +799,20 @@
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/README.md">
<entry file="file://$PROJECT_DIR$/example/lib/inline_example.screen.dart">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="230">
<caret line="593" selection-start-line="593" selection-end-line="601" selection-end-column="3" />
<state relative-caret-position="151">
<caret line="57" column="12" selection-start-line="57" selection-start-column="12" selection-end-line="57" selection-end-column="12" />
<folding>
<element signature="e#0#20#0" expanded="true" />
<element signature="e#0#39#0" expanded="true" />
<element signature="e#0#39#0" expanded="true" />
</folding>
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/lib/flutter_inappbrowser.dart">
<entry file="file://$PROJECT_DIR$/example/lib/webview_example.screen.dart">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="159">
<caret line="1191" column="11" lean-forward="true" selection-start-line="1191" selection-start-column="11" selection-end-line="1191" selection-end-column="11" />
<folding>
<element signature="e#814#831#0" expanded="true" />
</folding>
<state relative-caret-position="200">
<caret line="77" column="70" lean-forward="true" selection-start-line="77" selection-start-column="70" selection-end-line="77" selection-end-column="70" />
</state>
</provider>
</entry>
......
## 1.1.2
- Fix InAppBrowser crashes the app when i change the page "Lost connection" [#74](https://github.com/pichillilorenzo/flutter_inappbrowser/issues/74)
- Fix javascript `...args` parameter of `window.flutter_inappbrowser.callHandler()`
- Merge Enable setTextZoom function of Android WebViewSetting [#81](https://github.com/pichillilorenzo/flutter_inappbrowser/pull/81)
- Merge bug fix for android build: Android dependency 'androidx.core:core' has different version for the compile (1.0.0) and runtime (1.0.1) classpath [#83](https://github.com/pichillilorenzo/flutter_inappbrowser/pull/83)
## 1.1.1
- Fixed README.md and `addJavaScriptHandler` method documentation
......
......@@ -250,7 +250,7 @@ All platforms support:
- __domStorageEnabled__: Set to `true` if you want the DOM storage API is enabled. The default value is `false`.
- __useWideViewPort__: Set to `true` if the WebView should enable support for the "viewport" HTML meta tag or should use a wide viewport. When the value of the setting is false, the layout width is always set to the width of the WebView control in device-independent (CSS) pixels. When the value is true and the page contains the viewport meta tag, the value of the width specified in the tag is used. If the page does not contain the tag or does not provide a width, then a wide viewport will be used. The default value is `true`.
- __safeBrowsingEnabled__: Set to `true` if you want the Safe Browsing is enabled. Safe Browsing allows WebView to protect against malware and phishing attacks by verifying the links. The default value is `true`.
- __textZoom__: Set text scaling of android-webview. The default value is `100`.
- __textZoom__: Set text scaling of the WebView. The default value is `100`.
**iOS** supports these additional options:
......@@ -824,6 +824,7 @@ Opens an `url` in a new `InAppBrowser` instance.
- __useWideViewPort__: Set to `true` if the WebView should enable support for the "viewport" HTML meta tag or should use a wide viewport. When the value of the setting is false, the layout width is always set to the width of the WebView control in device-independent (CSS) pixels. When the value is true and the page contains the viewport meta tag, the value of the width specified in the tag is used. If the page does not contain the tag or does not provide a width, then a wide viewport will be used. The default value is `true`.
- __safeBrowsingEnabled__: Set to `true` if you want the Safe Browsing is enabled. Safe Browsing allows WebView to protect against malware and phishing attacks by verifying the links. The default value is `true`.
- __progressBar__: Set to `false` to hide the progress bar at the bottom of the toolbar at the top. The default value is `true`.
- __textZoom__: Set text scaling of the WebView. The default value is `100`.
**iOS** supports these additional options:
......
......@@ -182,7 +182,6 @@ public class InAppWebView extends WebView {
settings.setLoadWithOverviewMode(true);
settings.setUseWideViewPort(options.useWideViewPort);
settings.setSupportZoom(options.supportZoom);
settings.setTextZoom(options.textZoom);
}
......
......@@ -13,6 +13,7 @@ public class InAppWebViewOptions extends Options {
public boolean javaScriptEnabled = true;
public boolean javaScriptCanOpenWindowsAutomatically = false;
public boolean mediaPlaybackRequiresUserGesture = true;
public int textZoom = 100;
public boolean clearSessionCache = false;
public boolean builtInZoomControls = false;
......@@ -22,5 +23,4 @@ public class InAppWebViewOptions extends Options {
public boolean useWideViewPort = true;
public boolean safeBrowsingEnabled = true;
public int textZoom = 100;
}
......@@ -17,9 +17,9 @@ public class JavaScriptBridgeInterface {
private FlutterWebView flutterWebView;
private InAppBrowserActivity inAppBrowserActivity;
public static final String flutterInAppBroserJSClass = "window." + name + ".callHandler = function(handlerName, ...args) {" +
public static final String flutterInAppBroserJSClass = "window." + name + ".callHandler = function() {" +
"var _callHandlerID = setTimeout(function(){});" +
"window." + name + "._callHandler(handlerName, _callHandlerID, JSON.stringify(args));" +
"window." + name + "._callHandler(arguments[0], _callHandlerID, JSON.stringify(Array.prototype.slice.call(arguments, 1)));" +
"return new Promise(function(resolve, reject) {" +
" window." + name + "[_callHandlerID] = resolve;" +
"});" +
......
......@@ -86,7 +86,7 @@ class _WebviewExampleScreenState extends State<WebviewExampleScreen> {
return new Center(
child: new RaisedButton(
onPressed: () {
widget.browser.open(url: "https://flutter.dev/", options: {
widget.browser.open(url: "https://google.com", options: {
"useShouldOverrideUrlLoading": true,
"useOnLoadResource": true
});
......
......@@ -71,9 +71,9 @@ let JAVASCRIPT_BRIDGE_NAME = "flutter_inappbrowser"
let javaScriptBridgeJS = """
window.\(JAVASCRIPT_BRIDGE_NAME) = {};
window.\(JAVASCRIPT_BRIDGE_NAME).callHandler = function(handlerName, ...args) {
window.\(JAVASCRIPT_BRIDGE_NAME).callHandler = function() {
var _callHandlerID = setTimeout(function(){});
window.webkit.messageHandlers['callHandler'].postMessage( {'handlerName': handlerName, '_callHandlerID': _callHandlerID, 'args': JSON.stringify(args)} );
window.webkit.messageHandlers['callHandler'].postMessage( {'handlerName': arguments[0], '_callHandlerID': _callHandlerID, 'args': JSON.stringify(Array.prototype.slice.call(arguments, 1))} );
return new Promise(function(resolve, reject) {
window.\(JAVASCRIPT_BRIDGE_NAME)[_callHandlerID] = resolve;
});
......@@ -629,7 +629,9 @@ public class InAppWebView: WKWebView, UIScrollViewDelegate, WKUIDelegate, WKNavi
if IABController != nil {
arguments["uuid"] = IABController!.uuid
}
getChannel().invokeMethod("onLoadStart", arguments: arguments)
if let channel = getChannel() {
channel.invokeMethod("onLoadStart", arguments: arguments)
}
}
public func onLoadStop(url: String) {
......@@ -637,7 +639,9 @@ public class InAppWebView: WKWebView, UIScrollViewDelegate, WKUIDelegate, WKNavi
if IABController != nil {
arguments["uuid"] = IABController!.uuid
}
getChannel().invokeMethod("onLoadStop", arguments: arguments)
if let channel = getChannel() {
channel.invokeMethod("onLoadStop", arguments: arguments)
}
}
public func onLoadError(url: String, error: Error) {
......@@ -645,7 +649,9 @@ public class InAppWebView: WKWebView, UIScrollViewDelegate, WKUIDelegate, WKNavi
if IABController != nil {
arguments["uuid"] = IABController!.uuid
}
getChannel().invokeMethod("onLoadError", arguments: arguments)
if let channel = getChannel() {
channel.invokeMethod("onLoadError", arguments: arguments)
}
}
public func onProgressChanged(progress: Int) {
......@@ -653,7 +659,9 @@ public class InAppWebView: WKWebView, UIScrollViewDelegate, WKUIDelegate, WKNavi
if IABController != nil {
arguments["uuid"] = IABController!.uuid
}
getChannel().invokeMethod("onProgressChanged", arguments: arguments)
if let channel = getChannel() {
channel.invokeMethod("onProgressChanged", arguments: arguments)
}
}
public func onLoadResource(response: URLResponse, fromRequest request: URLRequest?, withData data: Data, startTime: Int64, duration: Int64) {
......@@ -681,7 +689,9 @@ public class InAppWebView: WKWebView, UIScrollViewDelegate, WKUIDelegate, WKNavi
if IABController != nil {
arguments["uuid"] = IABController!.uuid
}
getChannel().invokeMethod("onLoadResource", arguments: arguments)
if let channel = getChannel() {
channel.invokeMethod("onLoadResource", arguments: arguments)
}
}
public func onScrollChanged(x: Int, y: Int) {
......@@ -689,7 +699,9 @@ public class InAppWebView: WKWebView, UIScrollViewDelegate, WKUIDelegate, WKNavi
if IABController != nil {
arguments["uuid"] = IABController!.uuid
}
getChannel().invokeMethod("onScrollChanged", arguments: arguments)
if let channel = getChannel() {
channel.invokeMethod("onScrollChanged", arguments: arguments)
}
}
public func shouldOverrideUrlLoading(url: URL) {
......@@ -697,7 +709,9 @@ public class InAppWebView: WKWebView, UIScrollViewDelegate, WKUIDelegate, WKNavi
if IABController != nil {
arguments["uuid"] = IABController!.uuid
}
getChannel().invokeMethod("shouldOverrideUrlLoading", arguments: arguments)
if let channel = getChannel() {
channel.invokeMethod("shouldOverrideUrlLoading", arguments: arguments)
}
}
public func onConsoleMessage(sourceURL: String, lineNumber: Int, message: String, messageLevel: String) {
......@@ -705,7 +719,9 @@ public class InAppWebView: WKWebView, UIScrollViewDelegate, WKUIDelegate, WKNavi
if IABController != nil {
arguments["uuid"] = IABController!.uuid
}
getChannel().invokeMethod("onConsoleMessage", arguments: arguments)
if let channel = getChannel() {
channel.invokeMethod("onConsoleMessage", arguments: arguments)
}
}
public func onCallJsHandler(handlerName: String, _callHandlerID: Int64, args: String) {
......@@ -714,19 +730,21 @@ public class InAppWebView: WKWebView, UIScrollViewDelegate, WKUIDelegate, WKNavi
arguments["uuid"] = IABController!.uuid
}
getChannel().invokeMethod("onCallJsHandler", arguments: arguments, result: {(result) -> Void in
if result is FlutterError {
print((result as! FlutterError).message)
}
else if (result as? NSObject) == FlutterMethodNotImplemented {}
else {
var json = "null"
if let r = result {
json = r as! String
if let channel = getChannel() {
channel.invokeMethod("onCallJsHandler", arguments: arguments, result: {(result) -> Void in
if result is FlutterError {
print((result as! FlutterError).message)
}
self.evaluateJavaScript("window.\(JAVASCRIPT_BRIDGE_NAME)[\(_callHandlerID)](\(json)); delete window.\(JAVASCRIPT_BRIDGE_NAME)[\(_callHandlerID)];", completionHandler: nil)
}
})
else if (result as? NSObject) == FlutterMethodNotImplemented {}
else {
var json = "null"
if let r = result {
json = r as! String
}
self.evaluateJavaScript("window.\(JAVASCRIPT_BRIDGE_NAME)[\(_callHandlerID)](\(json)); delete window.\(JAVASCRIPT_BRIDGE_NAME)[\(_callHandlerID)];", completionHandler: nil)
}
})
}
}
public func userContentController(_ userContentController: WKUserContentController, didReceive message: WKScriptMessage) {
......@@ -794,7 +812,7 @@ public class InAppWebView: WKWebView, UIScrollViewDelegate, WKUIDelegate, WKNavi
}
}
private func getChannel() -> FlutterMethodChannel {
return (IABController != nil) ? SwiftFlutterPlugin.channel! : IAWController!.channel!;
private func getChannel() -> FlutterMethodChannel? {
return (IABController != nil) ? SwiftFlutterPlugin.channel! : ((IAWController != nil) ? IAWController!.channel! : nil);
}
}
......@@ -184,6 +184,7 @@ class InAppBrowser {
/// - __useWideViewPort__: Set to `true` if the WebView should enable support for the "viewport" HTML meta tag or should use a wide viewport. When the value of the setting is false, the layout width is always set to the width of the WebView control in device-independent (CSS) pixels. When the value is true and the page contains the viewport meta tag, the value of the width specified in the tag is used. If the page does not contain the tag or does not provide a width, then a wide viewport will be used. The default value is `true`.
/// - __safeBrowsingEnabled__: Set to `true` if you want the Safe Browsing is enabled. Safe Browsing allows WebView to protect against malware and phishing attacks by verifying the links. The default value is `true`.
/// - __progressBar__: Set to `false` to hide the progress bar at the bottom of the toolbar at the top. The default value is `true`.
/// - __textZoom__: Set text scaling of the WebView. The default value is `100`.
///
/// - **iOS** supports these additional options:
///
......@@ -589,6 +590,7 @@ class InAppWebViewInitialData {
/// - __domStorageEnabled__: Set to `true` if you want the DOM storage API is enabled. The default value is `false`.
/// - __useWideViewPort__: Set to `true` if the WebView should enable support for the "viewport" HTML meta tag or should use a wide viewport. When the value of the setting is false, the layout width is always set to the width of the WebView control in device-independent (CSS) pixels. When the value is true and the page contains the viewport meta tag, the value of the width specified in the tag is used. If the page does not contain the tag or does not provide a width, then a wide viewport will be used. The default value is `true`.
/// - __safeBrowsingEnabled__: Set to `true` if you want the Safe Browsing is enabled. Safe Browsing allows WebView to protect against malware and phishing attacks by verifying the links. The default value is `true`.
/// - __textZoom__: Set text scaling of the WebView. The default value is `100`.
///
/// **iOS** supports these additional options:
///
......@@ -1214,7 +1216,7 @@ class InAppWebViewController {
}
///Takes a screenshot (in PNG format) of the WebView's visible viewport and returns a `Uint8List`. Returns `null` if it wasn't be able to take it.
///
///__safeBrowsingEnabled__
///**NOTE for iOS**: available from iOS 11.0+.
Future<Uint8List> takeScreenshot() async {
Map<String, dynamic> args = <String, dynamic>{};
......
name: flutter_inappbrowser
description: A Flutter plugin that allows you to add an inline webview or open an in-app browser window (inspired by the popular cordova-plugin-inappbrowser).
version: 1.1.1
version: 1.1.2
author: Lorenzo Pichilli <pichillilorenzo@gmail.com>
homepage: https://github.com/pichillilorenzo/flutter_inappbrowser
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment