Browse Source

minor changes; update version to 0.0.18

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

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

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

+ 2
- 2
package.json View File

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