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

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

Issue 678693003: Docs: fix markdown in various files, update the README mildly (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 6 years, 2 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 | « sky/specs/markup.md ('k') | sky/specs/parsing.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:
(...skipping 12 matching lines...) Expand all
23 finished parsing, the document waits until its list of outstanding 23 finished parsing, the document waits until its list of outstanding
24 dependencies is empty before the module it represents is marked 24 dependencies is empty before the module it represents is marked
25 complete. 25 complete.
26 26
27 Module API 27 Module API
28 ---------- 28 ----------
29 29
30 Within a script in a module, the ```module``` identifier is bound to 30 Within a script in a module, the ```module``` identifier is bound to
31 the ```Module``` object that represents the module: 31 the ```Module``` object that represents the module:
32 32
33 ``` 33 ```javascript
34 interface Module : EventTarget { 34 interface Module : EventTarget {
35 constructor (Application application, Document document); // O(1) 35 constructor (Application application, Document document); // O(1)
36 attribute any exports; // O(1) // defaults to the module's document 36 attribute any exports; // O(1) // defaults to the module's document
37 readonly attribute Document document; // O(1) // the module's document 37 readonly attribute Document document; // O(1) // the module's document
38 readonly attribute Application application; // O(1) 38 readonly attribute Application application; // O(1)
39 } 39 }
40 ``` 40 ```
41 41
42 ### Exporting values ### 42 ### Exporting values ###
43 43
(...skipping 24 matching lines...) Expand all
68 Where ```name_1``` through ```name_n``` are the names bound to the 68 Where ```name_1``` through ```name_n``` are the names bound to the
69 various named imports in the script element's document, 69 various named imports in the script element's document,
70 ```source_code``` is the text content of the script element, 70 ```source_code``` is the text content of the script element,
71 ```source_module`` is the ```Module``` object of the script element's 71 ```source_module`` is the ```Module``` object of the script element's
72 module, and ```value_1``` through ```value_n``` are the values 72 module, and ```value_1``` through ```value_n``` are the values
73 exported by the various named imports in the script element's 73 exported by the various named imports in the script element's
74 document. 74 document.
75 75
76 When an import fails to load, the ```as``` name for the import gets 76 When an import fails to load, the ```as``` name for the import gets
77 bound to ```undefined```. 77 bound to ```undefined```.
OLDNEW
« no previous file with comments | « sky/specs/markup.md ('k') | sky/specs/parsing.md » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698