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

script type="module" support #1186

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

script type="module" support #1186

simonw opened this issue Jan 14, 2021 · 1 comment

Comments

@simonw
Copy link
Owner

simonw commented Jan 14, 2021

Custom JavaScript can be loaded in metadata.json like this:

{
    "extra_js_urls": [
        {
            "url": "https://code.jquery.com/jquery-3.2.1.slim.min.js",
            "sri": "sha256-k2WSCIexGzOj3Euiig+TlR8gA0EmPjuc79OEeY5L45g="
        }
    ]
}

Add a "module": true option which causes the resulting script element to use <script type="module">

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