GitHub user dosubot[bot] added a comment to the discussion: Add frontend js to 
custom sql

<!-- Greeting -->
Hi @cnhfeng! I'm [Dosu](https://go.dosu.dev/dosubot) and I’m helping the 
superset team.

<!-- Answer -->
Superset does not support running JavaScript code in custom SQL queries—this is 
intentionally blocked for security reasons and cannot be enabled via 
configuration or feature flags like ENABLE_JAVASCRIPT_CONTROLS or 
HTML_SANITIZATION_SCHEMA_EXTENSIONS. These settings only affect certain legacy 
chart controls or HTML sanitization in markdown/HTML widgets, and even then, 
JavaScript execution is either deprecated, sandboxed, or not allowed at all 
[cite1](https://github.com/apache/superset/issues/32764) 
[cite2](https://github.com/apache/superset/blob/a64b9ac84f48074340d14e5cf92505627451ec52/superset/config.py).

If you need dynamic data manipulation, consider using SQL, Jinja templating (if 
enabled), or preprocess your data outside Superset before visualization. If you 
have a specific use case in mind, let me know and I can suggest a supported 
approach.


<!-- Dosu Comment Footer -->
*To reply, just mention [@dosu](https://go.dosu.dev/dosubot).*

---
<sup>How did I do? 
[Good](https://app.dosu.dev/response-feedback/033da410-d821-478d-b20b-6874e80a49b0?feedback_type=great_response)
 | 
[Irrelevant](https://app.dosu.dev/response-feedback/033da410-d821-478d-b20b-6874e80a49b0?feedback_type=irrelevant_answer)
 | 
[Incorrect](https://app.dosu.dev/response-feedback/033da410-d821-478d-b20b-6874e80a49b0?feedback_type=incorrect_sources)
 | 
[Verbose](https://app.dosu.dev/response-feedback/033da410-d821-478d-b20b-6874e80a49b0?feedback_type=too_verbose)
 | 
[Hallucination](https://app.dosu.dev/response-feedback/033da410-d821-478d-b20b-6874e80a49b0?feedback_type=hallucination)
 | [Report 
🐛](https://app.dosu.dev/response-feedback/033da410-d821-478d-b20b-6874e80a49b0?feedback_type=bug_report)
 | 
[Other](https://app.dosu.dev/response-feedback/033da410-d821-478d-b20b-6874e80a49b0?feedback_type=other)</sup>&nbsp;&nbsp;[![Join
 
Discord](https://img.shields.io/badge/join-5865F2?logo=discord&logoColor=white&label=)](https://go.dosu.dev/discord-bot)&nbsp;[![Sh
 are on 
X](https://img.shields.io/badge/X-share-black)](https://twitter.com/intent/tweet?text=%40dosu_ai%20helped%20me%20solve%20this%20issue!&url=https%3A//github.com/apache/superset/discussions/33754)

GitHub link: 
https://github.com/apache/superset/discussions/33754#discussioncomment-13444849

----
This is an automatically sent email for [email protected].
To unsubscribe, please send an email to: 
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to