In an ES6 module, |import.meta| is new syntax that evaluates to an object that provides module-specific metadata from by the host environment.
Currently only the 'url' property is provided, which is the base URL of the executing module. This allows modules to locate resources relative to the module, so that module authors can easily bundle resource files with their modules. The ECMAScript proposal is at stage 3. Bug: https://bugzilla.mozilla.org/show_bug.cgi?id=1427610 Link to standard: https://github.com/tc39/proposal-import-meta/blob/master/README.md https://html.spec.whatwg.org/multipage/webappapis.html#hostgetimportmetaproperties Platform coverage: All. Estimated or target release: FF 62. Preference behind which this will be implemented: None. Is this feature enabled by default in sandboxed iframes? This is enabled everywhere modules are enabled. This preserves the current invariants. Do other browser engines implement this? Shipped in Chrome 64+ and Safari 42+. web-platform-tests: https://github.com/w3c/web-platform-tests/tree/master/html/semantics/scripting-1/the-script-element/module/import-meta Secure contexts: This is new JS syntax that will be available in all modules, so will not be restricted to secure contexts. _______________________________________________ dev-platform mailing list dev-platform@lists.mozilla.org https://lists.mozilla.org/listinfo/dev-platform