1 2 3 4 5 6 7 8 9
<body> <script> var script = `function foo() { console.log('called foo'); } //# sourceURL=my-foo.js`; eval(script); </script> </body>