Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add example to spec #12

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 13 additions & 2 deletions index.bs
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ Title: Explicit JavaScript Compile Hints (File-based)
Shortname: explicit-js-compile-hints
Level: None
Status: LD
Repository: explainers-by-googlers/explicit-javascript-compile-hints-file-based
URL: https://explainers-by-googlers.github.io/explicit-javascript-compile-hints-file-based/
Repository: WICG/explicit-javascript-compile-hints-file-based
URL: https://github.com/WICG/explicit-javascript-compile-hints-file-based
Editor: Marja Hölttä, Google, https://google.com, [email protected]
Abstract: A magic comment in JavaScript for signaling certain scripts / functions should be prioritized.
Markup Shorthands: markdown yes, css no
Expand All @@ -25,6 +25,17 @@ This proposal introduces a new magic comment that signals to browsers that the f

In its current form, it’s not a defined standard and is subject to modifications.

Example usage {#example}
========================

In this example, the magic comment is used for triggering the eager compilation of the two JavaScript functions in the file:
```JavaScript
//# eagerCompilation=all

function foo() { ... } // will now be eagerly parsed and compiled
function bar() { ... } // will now be eagerly parsed and compiled
```

Additions to Script Records and Source Text Module Records {#additions}
=======================================================================

Expand Down