How to load external CDN Script into WebView (React Native)

Viewed 16

My goal is to be able to load the script below into a react Native WebView

<script src="https://paddle.test.com/paddle/paddle.js">

This is a CDN for a payment processor but it's not loading

Code for webview

<WebView
  originWhitelist={['*']}
  javaScriptEnabled={true}
  javaScriptEnabledAndroid={true}
  source={{ html: '<script src="https://cdn.paddle.com/paddle/paddle.js"></script><script type="text/javascript">Paddle.Setup({ vendor: 12345 });</script><a href="#!" class="paddle_button" data-product="12345" data-email="name@email.com">Buy now</a><h1>This is a static HTML source!</h1>' }}
/>

The webview is showing the text and button but no styling and no JS

Any suggestions appreciated

0 Answers
Related