1const wait = (ms) => new Promise(resolve => setTimeout(resolve, ms)); 2const dlHtml = async (url, callback) => { 3 try { 4 const res = await fetch( 5 url, { 6 headers: { 7 'x-is-fetch': 'true', 8 } 9 }); 10 if (!res.ok) { 11 const errorMessage = await res.text(); 12 const error = new Error(errorMessage); 13 error.code = res.status; 14 throw error; 15 } 16 const html = await res.text(); 17 18 callback(html); 19 } catch (e) { 20 console.error(e); 21 displayError(e.message); 22 } 23 24} 25 26/** 27 * Instance de MainManager qui gère la logique métier 28 * @type {MainManager} 29 */ 30let mainManager; 31 32 33const ready = async () => { 34 35 console.log("Main.js Ready"); 36 37 mainManager = new MainManager(); 38 39 // Déclenche un événement custom pour signaler la fin 40 document.dispatchEvent(new CustomEvent('readyFinished')); 41 42} 43 44document.addEventListener('DOMContentLoaded', ready);
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.