2021年3月30日星期二

HTMLScriptElement is not a function in IOS webview

const loadJs = (path, fn, target) => {    let elem = document.createElement('script'), loaded;    elem.onload = elem.onerror = elem.onreadystatechange = () => {      if ((elem.readyState && !(/^c|loade/.test(elem.readyState))) || loaded) {        return;      }      elem.onload = elem.onreadystatechange = null;      loaded = 1;      fn();    };    elem.async = 1;    elem.src = path;    target.appendChild(elem);  };  

HTMLScriptElement is not a function in IOS webview, It looks like that 'appendChild' has compatibility

enter image description here

https://stackoverflow.com/questions/66870550/htmlscriptelement-is-not-a-function-in-ios-webview March 30, 2021 at 07:59PM

没有评论:

发表评论