{#each langs as lang}
{
createInlineScriptByLanguage(lang, name)
}}
/>
{/each}
{
createInlineScriptByLanguage(Script.language.DENO, name, 'pgsql')
}}
/>
Script executed in the client's browser directly: Frontend scripts are executed in the browser and can manipulate the app context directly
{
const newInlineScript = {
content: `// read outputs and ctx
console.log(ctx.email)
// access a global state store
if (!state.foo) { state.foo = 0 }
state.foo += 1
// you can also navigate to another page
//await goto("?foo=bar")
return state.foo`,
language: 'frontend',
path: 'frontend script',
schema: undefined
}
dispatch('new', newInlineScript)
}}
/>