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

Tagged template literals not supported? #28

Open
stoyanov-x opened this issue Aug 18, 2024 · 0 comments
Open

Tagged template literals not supported? #28

stoyanov-x opened this issue Aug 18, 2024 · 0 comments

Comments

@stoyanov-x
Copy link

If I try to use a tagged template literal, I get the error message Unexpected token after prop: `

The SandboxJS code can be as simple as return primitivesOnlyValidator`Input string`; as long as the primitivesOnlyValidator function is defined in the globals/scope of the execution.

Apparently, the engine/parser "thinks" that primitivesOnlyValidator is referring to a variable or a property being accessed, so the ` character is not valid in that context.

Here is a sample article on this concept.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant