Inserting Javascript into DOM
You can add remote scripts to your integration through the vendor file
javascript: [
'./vendor/vendor.js'
]'use strict';
//remember the script element we add so that we can remove it on apikey change
let googleMapsApiScript = null;
//load the google maps api script and add it to the head
function initGoogleMaps(integration, userConfig, userOptions) {
}
onSettingsChange(initGoogleMaps); //remove an already existing script tag
if (googleMapsApiScript !== null) {
document.getElementsByTagName('head')[0].removeChild(googleMapsApiScript);
}Last updated