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

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

Issue 730223002: Specs: default exports to {} rather than document, since it makes writing modules saner (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 6 years, 1 month 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/examples/radio.sky ('k') | sky/specs/modules.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 APIs 1 APIs
2 ==== 2 ====
3 3
4 The Sky core API 4 The Sky core API
5 ---------------- 5 ----------------
6 6
7 ```javascript 7 ```javascript
8 module 'sky:core' { 8 module 'sky:core' {
9 9
10 // EVENTS 10 // EVENTS
(...skipping 293 matching lines...) Expand 10 before | Expand all | Expand 10 after
304 // the values passed in on options 304 // the values passed in on options
305 // 6. register the new element 305 // 6. register the new element
306 306
307 readonly attribute ScriptElement? currentScript; // O(1) // returns the <scr ipt> element currently being executed if any, and if it's in this module; else n ull 307 readonly attribute ScriptElement? currentScript; // O(1) // returns the <scr ipt> element currently being executed if any, and if it's in this module; else n ull
308 } 308 }
309 309
310 class Module : AbstractModule { 310 class Module : AbstractModule {
311 constructor (Application application, Document document, String url); // O(1 ) 311 constructor (Application application, Document document, String url); // O(1 )
312 readonly attribute Application application; // O(1) 312 readonly attribute Application application; // O(1)
313 313
314 attribute any exports; // O(1) // defaults to the module's document 314 attribute any exports; // O(1) // defaults to {}
315 } 315 }
316 316
317 class Application : AbstractModule { 317 class Application : AbstractModule {
318 constructor (Document document, String url); // O(1) 318 constructor (Document document, String url); // O(1)
319 attribute String title; // O(1) 319 attribute String title; // O(1)
320 } 320 }
321 321
322 // see script.md for a description of the global object, though note that 322 // see script.md for a description of the global object, though note that
323 // the sky core module doesn't use it or affect it in any way. 323 // the sky core module doesn't use it or affect it in any way.
324 324
(...skipping 169 matching lines...) Expand 10 before | Expand all | Expand 10 after
494 the core mojo fabric JS API sky:mojo:fabric:core 494 the core mojo fabric JS API sky:mojo:fabric:core
495 the asyncWait/cancelWait mojo fabric JS API (interface to IPC thread) sky:moj o:fabric:ipc 495 the asyncWait/cancelWait mojo fabric JS API (interface to IPC thread) sky:moj o:fabric:ipc
496 the mojom for the shell, proxying through C++ so that the shell pipe isn't exp osed sky:mojo:shell 496 the mojom for the shell, proxying through C++ so that the shell pipe isn't exp osed sky:mojo:shell
497 the sky API sky:core 497 the sky API sky:core
498 the sky debug symbols for private APIs sky:debug 498 the sky debug symbols for private APIs sky:debug
499 ``` 499 ```
500 500
501 TODO(ianh): determine if we want to separate the "this" from the 501 TODO(ianh): determine if we want to separate the "this" from the
502 Document, especially for Modules, so that exposing a module's element 502 Document, especially for Modules, so that exposing a module's element
503 doesn't expose the module's exports attribute. 503 doesn't expose the module's exports attribute.
OLDNEW
« no previous file with comments | « sky/examples/radio.sky ('k') | sky/specs/modules.md » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698