From 0ad3d1115b8542b79bc4d8598b9d8029fab12244 Mon Sep 17 00:00:00 2001 From: Hiroshige Hayashizaki Date: Mon, 23 Oct 2017 18:33:39 -0700 Subject: [PATCH] [import.meta.url] Implement import.meta.url behind flag (Blink-side) This CL implements https://html.spec.whatwg.org/#hostgetimportmetaproperties as HostGetImportMetaProperties() in V8Initializer.cpp and Modulator, and thus enables import.meta.url behind the flag added in https://chromium-review.googlesource.com/c/chromium/src/+/727179. This CL also adds a layout test, and sets up virtual test for that. Bug: 773713 Change-Id: I1d28123f803095535ed9a0208587e1dd873376cb Reviewed-on: https://chromium-review.googlesource.com/726525 Commit-Queue: Hiroshige Hayashizaki Reviewed-by: Kouhei Ueno Cr-Commit-Position: refs/heads/master@{#510988} --- .../import-meta/import-meta-dependent.js | 1 + .../module/import-meta/import-meta-root.js | 2 ++ .../module/import-meta/import-meta-url.html | 23 +++++++++++++++++++ 3 files changed, 26 insertions(+) create mode 100644 html/semantics/scripting-1/the-script-element/module/import-meta/import-meta-dependent.js create mode 100644 html/semantics/scripting-1/the-script-element/module/import-meta/import-meta-root.js create mode 100644 html/semantics/scripting-1/the-script-element/module/import-meta/import-meta-url.html diff --git a/html/semantics/scripting-1/the-script-element/module/import-meta/import-meta-dependent.js b/html/semantics/scripting-1/the-script-element/module/import-meta/import-meta-dependent.js new file mode 100644 index 00000000000000..cfaeabc47e1dc3 --- /dev/null +++ b/html/semantics/scripting-1/the-script-element/module/import-meta/import-meta-dependent.js @@ -0,0 +1 @@ +export let importMetaOnDependentModule = import.meta; diff --git a/html/semantics/scripting-1/the-script-element/module/import-meta/import-meta-root.js b/html/semantics/scripting-1/the-script-element/module/import-meta/import-meta-root.js new file mode 100644 index 00000000000000..62ec082a8ef131 --- /dev/null +++ b/html/semantics/scripting-1/the-script-element/module/import-meta/import-meta-root.js @@ -0,0 +1,2 @@ +export let importMetaOnRootModule = import.meta; +export { importMetaOnDependentModule } from "./import-meta-dependent.js"; diff --git a/html/semantics/scripting-1/the-script-element/module/import-meta/import-meta-url.html b/html/semantics/scripting-1/the-script-element/module/import-meta/import-meta-url.html new file mode 100644 index 00000000000000..3c853b22d6e874 --- /dev/null +++ b/html/semantics/scripting-1/the-script-element/module/import-meta/import-meta-url.html @@ -0,0 +1,23 @@ + + + +