assuming its in a module, we can use async syntax ⎗ ✓ 1const toolbox = await fetch("./toolbox.xml").then(data => data.text()); or if its not ⎗ ✓ 1 2 3 4 5 6fetch("./toolbox.xml") .then(data => data.text()) .then(data => { const toolbox = data; //inject blockly })
Warning LINK You are about to visit a link which has been flagged with the above content warnings. Do you wish to continue? Continue Cancel