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

extra_body_script() support for script type="module" #1187

Closed
simonw opened this issue Jan 14, 2021 · 1 comment
Closed

extra_body_script() support for script type="module" #1187

simonw opened this issue Jan 14, 2021 · 1 comment

Comments

@simonw
Copy link
Owner

simonw commented Jan 14, 2021

Follows #1186. The extra_body_script() plugin hook should provide a mechanism for specifying that the script should use <script type="module">.

Relevant docs: https://docs.datasette.io/en/stable/plugin_hooks.html#extra-body-script-template-database-table-columns-view-name-request-datasette

@simonw
Copy link
Owner Author

simonw commented Jan 14, 2021

This plugin hook currently returns a string of JavaScript. It could optionally return this instead of a string:

{
  "script": "string of JavaScript goes here",
  "module": true
}

@simonw simonw closed this as completed in c38c429 Jan 14, 2021
simonw added a commit that referenced this issue Jan 19, 2021
@simonw simonw added this to the Datasette 0.54 milestone Jan 24, 2021
This was referenced Jan 25, 2021
simonw added a commit that referenced this issue Jan 25, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant