You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The injectedjavascript described in the document is a JS code injected before the web page is loaded, but in the actual test, it is the JS code executed at the end of the document object.
Version
2.15.0
Output of npx react-native info
info Fetching system and libraries information...
System:
OS: macOS 11.4
CPU: (8) x64 Apple M1
Memory: 22.82 MB / 16.00 GB
Shell: 5.8 - /bin/zsh
Binaries:
Node: 12.18.0 - ~/.nvm/versions/node/v12.18.0/bin/node
Yarn: 1.22.19 - /opt/homebrew/bin/yarn
npm: 6.14.4 - ~/.nvm/versions/node/v12.18.0/bin/npm
Watchman: 2022.03.21.00 - /opt/homebrew/bin/watchman
Managers:
CocoaPods: 1.11.3 - /opt/homebrew/bin/pod
SDKs:
iOS SDK:
Platforms: DriverKit 21.2, iOS 15.2, macOS 12.1, tvOS 15.2, watchOS 8.3
Android SDK: Not Found
IDEs:
Android Studio: Not Found
Xcode: 13.2.1/13C100 - /usr/bin/xcodebuild
Languages:
Java: Not Found
Python: 2.7.16 - /usr/bin/python
npmPackages:
@react-native-community/cli: Not Found
react: 16.13.1 => 16.13.1
react-native: git+https://code.taou.com/git/maimai/react-native-0.63.2.git#v0.63.2_08 => 0.63.2
react-native-macos: Not Found
npmGlobalPackages: react-native: Not Found
Description
The injectedjavascript described in the document is a JS code injected before the web page is loaded, but in the actual test, it is the JS code executed at the end of the document object.
Version
2.15.0
Output of
npx react-native info
info Fetching system and libraries information...
System:
OS: macOS 11.4
CPU: (8) x64 Apple M1
Memory: 22.82 MB / 16.00 GB
Shell: 5.8 - /bin/zsh
Binaries:
Node: 12.18.0 - ~/.nvm/versions/node/v12.18.0/bin/node
Yarn: 1.22.19 - /opt/homebrew/bin/yarn
npm: 6.14.4 - ~/.nvm/versions/node/v12.18.0/bin/npm
Watchman: 2022.03.21.00 - /opt/homebrew/bin/watchman
Managers:
CocoaPods: 1.11.3 - /opt/homebrew/bin/pod
SDKs:
iOS SDK:
Platforms: DriverKit 21.2, iOS 15.2, macOS 12.1, tvOS 15.2, watchOS 8.3
Android SDK: Not Found
IDEs:
Android Studio: Not Found
Xcode: 13.2.1/13C100 - /usr/bin/xcodebuild
Languages:
Java: Not Found
Python: 2.7.16 - /usr/bin/python
npmPackages:
@react-native-community/cli: Not Found
react: 16.13.1 => 16.13.1
react-native: git+https://code.taou.com/git/maimai/react-native-0.63.2.git#v0.63.2_08 => 0.63.2
react-native-macos: Not Found
npmGlobalPackages:
react-native: Not Found
Steps to reproduce
`
<WebView
ref={(view) => {
webviewRef = view;
}}
source={{
uri:"http://localhost:8080/SlideTest.html", // 这个html内容是通过http-server启动了本地服务,生成的网页,该html内容下方会粘贴;
}}
originWhitelist={['*']}
injectedJavaScript={
test("NativeApp");true;
} // 网页加载前allowFileAccess={true}
domStorageEnabled={true}
javaScriptEnabled={true}
onMessage={(event) => {}}
onLoadStart={() => {
webviewRef.injectJavaScript(``);
}}
/>
`
`
Android and IOS didn't meet expectations:
Snack, code example, screenshot, or link to a repository
The text was updated successfully, but these errors were encountered: