Link https://widget.transactionlink.io/transactionlink-widget.umd.js to the file:
It should be located at the end of the file
Or added dynamically after completing points 1 and 2.
// Create a script elementconstscript=document.createElement('script');// Set the source attribute to the URL of the scriptscript.src='https://widget.transactionlink.io/transactionlink-widget.umd.js';// Append the script element to the document's headdocument.head.appendChild(script);
Simple code example:
Advanced code example:
Content Security Policy
To enhance security, include the following Content Security Policy (CSP) directive headers in the index.html file, within the tag: