This function allows you to add a custom third-party script to the DOM.
# StateThe useScript
function exposes the following reactive state:
Boolean
If the script is still downloading. error Boolean
If the script didn't download correctly. # Methods
useScript
exposes a toPromise
method that returns a promise when the script loads successfully.
useScript
function takes an options object, the object must contain a src
property.
String
The 3rd party script URL. # Example
This example implements a Stripe elements example.
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4