Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(62)

Side by Side Diff: sky/specs/modules.md

Issue 878453003: Specs: dartification of script.md (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 5 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | sky/specs/script.md » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 Sky Module System 1 Sky Module System
2 ================= 2 =================
3 3
4 This document describes the Sky module system. 4 This document describes the Sky module system.
5 5
6 Overview 6 Overview
7 -------- 7 --------
8 8
9 The Sky module system is based on the ``import`` element. In its 9 The Sky module system is based on the ``import`` element. In its
10 most basic form, you import a module as follows: 10 most basic form, you import a module as follows:
11 11
12 ```html 12 ```html
13 <import src="path/to/module.sky" /> 13 <import src="path/to/module.sky" />
14 ``` 14 ```
15 15
16 As these ``import`` elements are inserted into a document, the 16 As these ``import`` elements are inserted into a document, the
17 document's list of outstanding dependencies grows. When an imported 17 document's list of outstanding dependencies grows. When an imported
18 module completes, it is removed from the document's list of 18 module completes, it is removed from the document's list of
19 outstanding dependencies. 19 outstanding dependencies.
20 20
21 Before executing script or inserting an element that is not already 21 Before compiling script or inserting an element that is not already
22 registered, the parser waits until the list of outstanding 22 registered, the parser waits until the list of outstanding
23 dependencies is empty. After the parser has finished parsing, the 23 dependencies is empty. After the parser has finished parsing, the
24 document waits until its list of outstanding dependencies is empty 24 document waits until its list of outstanding dependencies is empty
25 before the module it represents is marked complete. 25 before the module it represents is marked complete.
26 26
27 27
28 Module API 28 Module API
29 ---------- 29 ----------
30 30
31 Within a script in a module, the ``module`` identifier is bound to 31 Within a script in a module, the ``module`` identifier is bound to
(...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after
157 Where ``name_1`` through ``name_n`` are the names bound to the 157 Where ``name_1`` through ``name_n`` are the names bound to the
158 various named imports in the script element's document, 158 various named imports in the script element's document,
159 ``source_code`` is the text content of the script element, 159 ``source_code`` is the text content of the script element,
160 ``source_module`` is the ``Module`` object of the script element's 160 ``source_module`` is the ``Module`` object of the script element's
161 module, and ``value_1`` through ``value_n`` are the values 161 module, and ``value_1`` through ``value_n`` are the values
162 exported by the various named imports in the script element's 162 exported by the various named imports in the script element's
163 document. 163 document.
164 164
165 When an import fails to load, the ``as`` name for the import gets 165 When an import fails to load, the ``as`` name for the import gets
166 bound to ``undefined``. 166 bound to ``undefined``.
OLDNEW
« no previous file with comments | « no previous file | sky/specs/script.md » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698