Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit177dd9d

Browse files
committed
Add import.meta.url
This integrates with the stage 3 import.meta proposal located athttps://github.com/tc39/proposal-import-meta/. This is based onhttps://github.com/tc39/proposal-import-meta/blob/f5d39bc471a5bf2791708f9a3fec943380d9e3ee/HTML%20Integration.mdalthough it only includes the easier part, import.meta.url.import.meta.scriptElement is still being discussed, at#1013, and assuch is excluded for now.
1 parente568aaa commit177dd9d

File tree

1 file changed

+28
-0
lines changed

1 file changed

+28
-0
lines changed

‎source

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3070,6 +3070,14 @@ a.setAttribute('href', 'https://example.com/'); // change the content attribute
30703070
<li>The <dfn data-x-href="https://tc39.github.io/proposal-dynamic-import/#sec-finishdynamicimport">FinishDynamicImport</dfn> abstract operation</li>
30713071
</ul>
30723072

3073+
<p>Users agents that support JavaScript must also implement the <cite>import.meta</cite>
3074+
proposal. The following term is defined there, and used in this specification: <ref
3075+
spec=JSIMPORTMETA></p>
3076+
3077+
<ul class="brief">
3078+
<li>The <dfn data-x="js-HostGetImportMetaProperties" data-x-href="https://tc39.github.io/proposal-import-meta/#sec-hostgetimportmetaproperties">HostGetImportMetaProperties</dfn> abstract operation</li>
3079+
</ul>
3080+
30733081
</dd>
30743082

30753083

@@ -88215,6 +88223,23 @@ import "https://example.com/foo/../module2.js";</pre>
8821588223
<li><p>Return undefined.</p></li>
8821688224
</ol>
8821788225

88226+
<h6
88227+
id="hostgetimportmetaproperties"><dfn>HostGetImportMetaProperties</dfn>(<var>moduleRecord</var>)</h6>
88228+
88229+
<p>The <cite>import.meta</cite> proposal contains an implementation-defined <span
88230+
data-x="js-HostGetImportMetaProperties">HostGetImportMetaProperties</span> abstract operation.
88231+
User agents must use the following implementation: <ref spec=JSIMPORTMETA></p>
88232+
88233+
<ol>
88234+
<li><p>Let <var>module script</var> be <var>moduleRecord</var>.[[HostDefined]].</p></li>
88235+
88236+
<li><p>Let <var>urlString</var> be <var>module script</var>'s <span
88237+
data-x="concept-script-base-url">base URL</span>, <span
88238+
data-x="concept-url-serializer">serialized</span>.</p></li>
88239+
88240+
<li><p>Return « Record { [[Key]]: "url", [[Value]]: <var>urlString</var> } ».</p></li>
88241+
</ol>
88242+
8821888243
<h5>Integration with the JavaScript agent formalism</h5>
8821988244

8822088245
<p>JavaScript defines the concept of an <span>agent</span>. Until such a time that this standard
@@ -119863,6 +119888,9 @@ INSERT INTERFACES HERE
119863119888
<dt id="refsJSIMPORT">[JSIMPORT]</dt>
119864119889
<dd><cite><a href="https://tc39.github.io/proposal-dynamic-import/">import()</a></cite>. Ecma International.</dd>
119865119890

119891+
<dt id="refsJSIMPORTMETA">[JSIMPORTMETA]</dt>
119892+
<dd><cite><a href="https://tc39.github.io/proposal-import-meta/">import.meta</a></cite>. Ecma International.</dd>
119893+
119866119894
<dt id="refsJSINTL">[JSINTL]</dt>
119867119895
<dd><cite><a href="https://tc39.github.io/ecma402/">ECMAScript Internationalization API Specification</a></cite>. Ecma International.</dd>
119868119896

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp