dynamicScriptInject = (src) => {
  return new Promise((resolve) => {
    const script = document.createElement("script");
    script.src = src;
    script.type = "text/javascript";
    document.head.appendChild(script);
    script.addEventListener("load", () => {
      resolve(script);
    });
  });
}
Injects a script into document.head
@param {string} src path of script to be injected in <head>
@return {Promise} Promise object that resolves on script load event