Closed Bug 1494055 Opened 6 years ago Closed 5 years ago

Worker constructor ignores the type option

Categories

(Core :: DOM: Workers, defect, P3)

62 Branch
defect

Tracking

()

RESOLVED DUPLICATE of bug 1247687

People

(Reporter: jmareda, Unassigned)

Details

Attachments

(1 file)

Attached file test.html
User Agent: Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:62.0) Gecko/20100101 Firefox/62.0
Build ID: 20180920131237

Steps to reproduce:

Try following code:

## test.html

<html>
<head></head>
<body><script type="text/javascript">
    new Worker("worker.js", { type: "module" });

    </script></body>
</html>

## worker.js

    import Nothing from "./nothing.js";


Actual results:

SyntaxError: import declarations may only appear at top level of a module


Expected results:

Loading failed for the module with source “http://localhost:1218/nothing.js”.
Priority: -- → P3
Status: UNCONFIRMED → RESOLVED
Closed: 5 years ago
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: