-
Notifications
You must be signed in to change notification settings - Fork 65
Scripts fail to run when they are the only tag on page #876
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
The script tag runs without any elements. But we have to use is:inline in script tag
this works and got "hi!" in console |
Looks like in the compiler we need to emit |
@bluwy do you plan on working on this? |
Not yet. Feel free to take it! |
One of the tests I broke pointed me to this PR. It seems like this behavior was introduced intentionally. |
Astro Info
If this issue only occurs in one browser, which browser is a problem?
No response
Describe the Bug
Given the following code:
nothing happens.
If you add a div:
then it suddenly runs in console.
What's the expected result?
The script should run even without other tags present.
Link to Minimal Reproducible Example
https://stackblitz.com/edit/github-kwyexm?file=src%2Fpages%2Findex.astro,src%2Fpages%2FwithoutDiv.astro,src%2Fpages%2FwithDiv.astro
Participation
The text was updated successfully, but these errors were encountered: