[英]React Native Webview not working when loading html / script
I am trying to load a widget using the `react-native-webview' library.我正在尝试使用 `react-native-webview' 库加载一个小部件。 I believe I am doing this right but the widget is not loading, I have tried to set breakpoints on the webview itself and it looks like its building, any advice?
我相信我这样做是正确的,但小部件没有加载,我试图在 webview 本身上设置断点,它看起来像它的建筑,有什么建议吗?
<WebView
source={{
html: `<!DOCTYPE html>
<html>
<body>
<script src="https://widgets.coingecko.com/coingecko-coin-price-marquee-widget.js"></script>
<coingecko-coin-price-marquee-widget coin-ids="bitcoin,ethereum,eos,ripple,litecoin" currency="usd" background-color="#ffffff" locale="en">
</coingecko-coin-price-marquee-widget>
</body>
</html>`,
}}
/>
Find a solution?找到解决办法? The ticker displays for me as it is above using react-native-webview 11.13.0.
代码显示为我使用 react-native-webview 11.13.0。
解决方案 - 我需要给 react-native-webview 一个宽度。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.