This is for tracking a spec issue: https://github.com/w3c/css-houdini-drafts/issues/506
According to the ongoing discussion, import() seems to reject a promise on WorkletGlobalScope. Anyway, let's wait for the consensus.
CL: https://chromium-review.googlesource.com/c/chromium/src/+/790059
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/419d8078283ee3d6f8677c03c18c3e290c7bc2fb commit 419d8078283ee3d6f8677c03c18c3e290c7bc2fb Author: Hiroki Nakagawa <nhiroki@chromium.org> Date: Mon Dec 04 09:30:25 2017 Worklet: Reject dynamic import() on WorkletGlobalScope All networking APIs including dynamic import() are disallowed on WorkletGlobalScope. This CL makes dynamic import() always reject a promise with TypeError[1] on WorkletGlobalScope. [1] https://github.com/w3c/css-houdini-drafts/issues/506#issuecomment-344488690 Bug: 782538 Change-Id: Ieb94a4502b0ba35ff9b56e51c8fc34467ab96d0c Reviewed-on: https://chromium-review.googlesource.com/790059 Commit-Queue: Hiroki Nakagawa <nhiroki@chromium.org> Reviewed-by: Ian Kilpatrick <ikilpatrick@chromium.org> Reviewed-by: Hiroshige Hayashizaki <hiroshige@chromium.org> Reviewed-by: Kouhei Ueno <kouhei@chromium.org> Cr-Commit-Position: refs/heads/master@{#521295} [add] https://crrev.com/419d8078283ee3d6f8677c03c18c3e290c7bc2fb/third_party/WebKit/LayoutTests/http/tests/worklet/dynamic-import-expected.txt [add] https://crrev.com/419d8078283ee3d6f8677c03c18c3e290c7bc2fb/third_party/WebKit/LayoutTests/http/tests/worklet/dynamic-import.html [add] https://crrev.com/419d8078283ee3d6f8677c03c18c3e290c7bc2fb/third_party/WebKit/LayoutTests/http/tests/worklet/resources/dynamic-import-worklet-script.js [modify] https://crrev.com/419d8078283ee3d6f8677c03c18c3e290c7bc2fb/third_party/WebKit/Source/core/dom/WorkletModulatorImpl.cpp [modify] https://crrev.com/419d8078283ee3d6f8677c03c18c3e290c7bc2fb/third_party/WebKit/Source/core/dom/WorkletModulatorImpl.h
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/f534543c867d6bfdb328761f43d72361ed3d0272 commit f534543c867d6bfdb328761f43d72361ed3d0272 Author: Hiroki Nakagawa <nhiroki@chromium.org> Date: Tue May 15 08:00:10 2018 Worklet: Remove outdated comment from WPT Worklets don't support dynamic import (see the issue) Bug: 782538 Change-Id: Iea9b4352122e78d1ff671ae09a9947f6a7f1ef3b TBR: nhiroki@chromium.org Reviewed-on: https://chromium-review.googlesource.com/1058883 Reviewed-by: Hiroki Nakagawa <nhiroki@chromium.org> Commit-Queue: Hiroki Nakagawa <nhiroki@chromium.org> Cr-Commit-Position: refs/heads/master@{#558638} [modify] https://crrev.com/f534543c867d6bfdb328761f43d72361ed3d0272/third_party/WebKit/LayoutTests/external/wpt/worklets/resources/service-worker-interception-tests.js
Comment 1 by nhiroki@chromium.org
, Nov 8 2017