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

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

Issue 901493005: Specs: dartification of gestures; move GestureManager from ApplicationDocument to Application; actu… (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 | « sky/specs/gestures.md ('k') | sky/specs/pointer.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 111 matching lines...) Expand 10 before | Expand all | Expand 10 after
122 } 122 }
123 123
124 class Module : AbstractModule { 124 class Module : AbstractModule {
125 constructor (Application application, Document document, String url); // O(1) 125 constructor (Application application, Document document, String url); // O(1)
126 readonly attribute Application application; // O(1) 126 readonly attribute Application application; // O(1)
127 127
128 attribute any exports; // O(1) // defaults to {} 128 attribute any exports; // O(1) // defaults to {}
129 } 129 }
130 130
131 class Application : AbstractModule { 131 class Application : AbstractModule {
132 constructor (Document document, String url); // O(1) 132 constructor (Document document, GestureManager gestureManager, String url); // O(1)
133 attribute String title; // O(1) 133 attribute String title; // O(1)
134 readonly attribute GestureManager gestureManager;
134 } 135 }
135 ``` 136 ```
136 137
137 138
138 Naming modules 139 Naming modules
139 -------------- 140 --------------
140 141
141 The ``as`` attribute on the ``import`` element binds a name to the 142 The ``as`` attribute on the ``import`` element binds a name to the
142 imported module: 143 imported module:
143 144
(...skipping 12 matching lines...) Expand all
156 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
157 various named imports in the script element's document, 158 various named imports in the script element's document,
158 ``source_code`` is the text content of the script element, 159 ``source_code`` is the text content of the script element,
159 ``source_module`` is the ``Module`` object of the script element's 160 ``source_module`` is the ``Module`` object of the script element's
160 module, and ``value_1`` through ``value_n`` are the values 161 module, and ``value_1`` through ``value_n`` are the values
161 exported by the various named imports in the script element's 162 exported by the various named imports in the script element's
162 document. 163 document.
163 164
164 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
165 bound to ``undefined``. 166 bound to ``undefined``.
OLDNEW
« no previous file with comments | « sky/specs/gestures.md ('k') | sky/specs/pointer.md » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698