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

Unified Diff: sky/specs/modules.md

Issue 846523003: Specs: try to import elements from module.exports as well as module.exports.* (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 5 years, 11 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | sky/specs/runloop.md » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sky/specs/modules.md
diff --git a/sky/specs/modules.md b/sky/specs/modules.md
index 4a83f4d519f672ada6fd673cb0b28fe1a0102e24..c223fc94ddb8251d79b2aebb5fb040a6390e0b3d 100644
--- a/sky/specs/modules.md
+++ b/sky/specs/modules.md
@@ -42,10 +42,16 @@ the module is to expose some ``template`` elements.
### Exporting element definitions ###
-When importing a module into another, Sky looks at the properties on
-the imported module's ``exports`` value, and for each property that is
-an element constructor (generated by ``registerElement()``), it adds
-an element to the importee's element registry.
+When importing a module into another, Sky runs the following steps:
+ - let export be the imported module's ``exports`` value
+ - try to import export
+ - if that fails:
+ - try to import each property of export
+
+"Try to import" a value means to run the following steps:
+ - if the value is an element constructor (generated by
+ ``registerElement()``), call this importer module's
+ ``registerElement()`` with the value
### IDL ###
« no previous file with comments | « no previous file | sky/specs/runloop.md » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698