我已经创建了一个简单的html页面并将其加载到WebView中:
const OurStoryHTML = require ('./test.html');
import { WebView } from "react-native-webview";
<WebView
source={OurStoryHTML}
originWhitelist={["*"]}
/>我的网页包含以下标签:
<script async="async" src='http://www.youvisit.com/tour/Embed/js2'></script>然而,脚本似乎不能在react-native-webview中加载,但在浏览器中运行良好。是否有解决此问题的方法?
发布于 2020-10-07 04:17:48
在WebView中,必须将双花括号放在源代码属性后面
source={{OurStoryHTML}}
https://stackoverflow.com/questions/62061030
复制相似问题