Skip to content
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

Failing to specify script as text/javascript results in cryptic error message #516

Open
wgehner opened this issue Mar 20, 2025 · 0 comments · May be fixed by #519
Open

Failing to specify script as text/javascript results in cryptic error message #516

wgehner opened this issue Mar 20, 2025 · 0 comments · May be fixed by #519
Labels
nuejs-core Related to nuejs-core package

Comments

@wgehner
Copy link

wgehner commented Mar 20, 2025

This issue is related to #512 .

Describe the Bug

Unlike web standard, currently type='text/javascript' attribute is required for inline, non-module scripts. While that may be necessary, for usability maybe the error message could be less cryptic.

Environment

any

Minimal Reproduction

Use an inline <script> tag in any html (other than .dhtml)

Logs & Additional Context

!! parse error /home/animation.html
90 | return val?.constructor === Object || Array.isArray(val) || typeof val == 'function'
91 | }
92 |
93 | // exec('font-size:${_.size + "px"};', data)
94 | export function exec(expr, data = {}) {
95 | const fn = new Function('_', 'return ' + expr)
^
SyntaxError: Unexpected token '.'. Expected a ';' following a class field.
at (/Users/Wolfgang

@nobkd nobkd added nuekit Related to nuekit package nuejs-core Related to nuejs-core package and removed nuekit Related to nuekit package labels Mar 20, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
nuejs-core Related to nuejs-core package
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants