Browse Source

minor changes; update version to 0.0.18

iou90 7 years ago
parent
commit
6e3d01b952
3 changed files with 6 additions and 5 deletions
  1. 3
    0
      autoHeightWebView/index.android.js
  2. 1
    3
      autoHeightWebView/index.ios.js
  3. 2
    2
      package.json

+ 3
- 0
autoHeightWebView/index.android.js View File

@@ -79,6 +79,7 @@ export default class AutoHeightWebView extends Component {
79 79
         }
80 80
     }
81 81
 
82
+    // below kitkat
82 83
     listenWebViewBridgeMessage(body) {
83 84
         this.onMessage(body.message);
84 85
     }
@@ -91,6 +92,7 @@ export default class AutoHeightWebView extends Component {
91 92
         );
92 93
     };
93 94
 
95
+    // below kitkat
94 96
     sendToWebView(message) {
95 97
         UIManager.dispatchViewManagerCommand(
96 98
             findNodeHandle(this.webview),
@@ -163,6 +165,7 @@ export default class AutoHeightWebView extends Component {
163 165
                             injectedJavaScript={this.state.script + this.props.customScript}
164 166
                             scrollEnabled={false}
165 167
                             source={source}
168
+                            // below kitkat
166 169
                             onChange={this.onMessage}
167 170
                             onMessage={this.onMessage}
168 171
                             messagingEnabled={true} />

+ 1
- 3
autoHeightWebView/index.ios.js View File

@@ -113,9 +113,7 @@ const BaseScript =
113 113
             window.location.hash = ++i;
114 114
         }
115 115
         updateHeight();
116
-        window.addEventListener('load', function () {
117
-            updateHeight();
118
-        });
116
+        window.addEventListener('load', updateHeight);
119 117
         window.addEventListener('resize', updateHeight);
120 118
     } ());
121 119
     `;

+ 2
- 2
package.json View File

@@ -1,6 +1,6 @@
1 1
 {
2 2
   "name": "react-native-autoheightwebview",
3
-  "version": "0.0.17",
3
+  "version": "0.0.18",
4 4
   "description": "An auto height webview for React Native",
5 5
   "main": "autoHeightWebView",
6 6
   "files": [
@@ -20,4 +20,4 @@
20 20
     "url": "https://github.com/iou90/react-native-autoheightwebview/issues"
21 21
   },
22 22
   "homepage": "https://github.com/iou90/react-native-autoheightwebview#readme"
23
-}
23
+}