polyfills icon indicating copy to clipboard operation
polyfills copied to clipboard

html-imports: script[type=module] not supported in imported documents

Open nektro opened this issue 3 years ago • 1 comments

Description

see title

Example

<!DOCTYPE html>
<html lang="en">
    <head>
        <title>Document</title>
        <meta charset="UTF-8">
        <meta name="viewport" content="width=device-width, initial-scale=1.0">
        <script defer src="https://unpkg.com/@webcomponents/[email protected]/webcomponents-bundle.js"></script>
        <script defer src="https://unpkg.com/@webcomponents/[email protected]/html-imports.min.js"></script>
        <link rel="import" href="component.html">
    </head>
    <body>
    </body>
</html>
<script type="module">
    //
	console.log("hello");
</script>

Steps to reproduce

see example

Expected behavior

console output is

hello

Actual behavior

console output is

Error: Inline module scripts are not supported in HTML Imports.

Version

Tested with:

Browsers affected

  • [x] Chrome
  • [x] Firefox
  • [x] Edge
  • [x] Safari
  • [x] IE 11

Tested on:

  • Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Firefox/68.0
  • Firefox 68.11.0esr (64-bit)
  • Linux 4.19.0-9-amd64 #1 SMP Debian 4.19.118-2+deb10u1 (2020-06-07) x86_64 GNU/Linux

nektro avatar Aug 02 '20 06:08 nektro