Allow use of `id` attribute on in-browser script tags to propagate to compilation output

This commit is contained in:
Tony Garnock-Jones 2024-03-09 11:22:10 +01:00
parent 306d542600
commit 4c8796b6c9
1 changed files with 1 additions and 1 deletions

View File

@ -20,7 +20,7 @@ const currentSyndicateTarget = Syndicate.Dataspace.global;
const sourceCode = sourceUrl ? await (await fetch(sourceUrl)).text() : script.innerHTML;
const compilationResult = SyndicateCompiler.compile({
name: sourceUrl || 'anonymous-script-tag',
name: sourceUrl || script.id || 'anonymous-script-tag',
source: sourceCode,
module: isModule ? 'es6' : 'none',
runtime: isModule ? void 0 : 'Syndicate',