1import { sdkURL } from "./config.mjs"; 2 3export async function loadSDK() { 4 if (document.querySelector(`script[src="${CSS.escape(sdkURL)}"]`)) { 5 return !!window.Yappli; 6 } 7 8 return await new Promise((resolve, reject) => { 9 const el = document.createElement("script"); 10 el.src = sdkURL; 11 el.addEventListener("load", () => resolve(true), { passive: true }); 12 el.addEventListener("error", (error) => reject(error), { passive: true }); 13 document.head.appendChild(el); 14 }); 15}
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.