You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Scripts that are not the component top-level script do not seem to execute.
Apparently the way that <script> gets inserted into the document matters for execution, maybe that needs a special case.
Reproduction
<div>
<!-- NOT a Svelte script -->
<script>
functionlogMessage(text) {console.log(text); }console.log('logMessage is', typeof logMessage);</script>
</div>
<buttononclick={() =>eval("logMessage('Hello')")}>
Log "Hello"
</button>
Describe the bug
Scripts that are not the component top-level script do not seem to execute.
Apparently the way that
<script>
gets inserted into the document matters for execution, maybe that needs a special case.Reproduction
v4 ✔
v5 ❌
Thought that maybe isolating the
<script>
so it would be inserted separately using{#if true}
instead of adiv
would maybe help, but it did not.Logs
No response
System Info
Severity
annoyance
The text was updated successfully, but these errors were encountered: