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

Unified Diff: sky/README.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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | sky/specs/README.md » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sky/README.md
diff --git a/sky/README.md b/sky/README.md
index a4f2eda82418c071a6936ca892e4a5e2229d7645..ac266620943d4e0719f134e6823e6996531f6cdd 100644
--- a/sky/README.md
+++ b/sky/README.md
@@ -17,7 +17,7 @@ theme layer that gives each widget a concrete visual and interactive design.
Elements
--------
-The Sky engine contains a handful of primitive elements and the tools with which
+The Sky engine contains [a handful of primitive elements](specs/markup.md) and the tools with which
to create custom elements. The following elements are built into the engine:
- ``script``: Executes script
@@ -27,9 +27,10 @@ to create custom elements. The following elements are built into the engine:
- ``template``: Captures descendants for use as a template
- ``content``: Visually projects descendents of the shadow host
- ``shadow``: Visually projects older shadow roots of the shadow host
- - ``image``: Displays an image
+ - ``img``: Displays an image
- ``a``: Links to another Mojo application
- ``title``: Briefly describes the current application state to the user
+ - ``t``: Preserve whitespace (by default, whitespace nodes are dropped)
### Additional Elements ###
@@ -64,10 +65,19 @@ For example, the ``AnnualReport`` constructor uses the ``BalanceSheet`` class
exported by that module.
```html
-<import href=”/sky/framework” />
-<import href=”/another/module.sky” as=”foo” />
+SKY MODULE
+<import src=”/sky/framework” />
+<import src=”/another/module.sky” as=”foo” />
<sky-element name=”my-element”>
- [ ... custom element definition ... ]
+class extends SkyElement {
+ constructor () {
+ this.addEventListener('click', (event) => this.updateTime());
+ this.createShadowTree().appendChild('Click to show the time');
+ }
+ updateTime() {
+ this.shadowTree.firstChild.replaceWith(new Date());
+ }
+}
</sky-element>
<script>
class AnnualReport {
@@ -114,9 +124,10 @@ As an example, the following is a sketch of a module that wraps Mojo's
``network_service`` in a simpler functional interface:
```html
-<import href=”mojo://shell” as=”shell” />
-<import href="/mojo/network/network_service.mojom.sky" as="net" />
-<import href="/mojo/network/url_loader.mojom.sky" as="loader" />
+SKY MODULE
+<import src=”mojo://shell” as=”shell” />
+<import src="/mojo/network/network_service.mojom.sky" as="net" />
+<import src="/mojo/network/url_loader.mojom.sky" as="loader" />
<script>
module.exports = function fetch(url) {
return new Promise(function(resolve, reject) {
@@ -150,6 +161,6 @@ and the specification are in flux, but hopefully they'll converge over time.
Contributing
------------
-Instructions for building and testing Sky are contained in [HACKING.md]. For
+Instructions for building and testing Sky are contained in [HACKING.md](HACKING.md). For
coordination, we use the ``#mojo`` IRC channel on
[Freenode](https://freenode.net/).
« no previous file with comments | « no previous file | sky/specs/README.md » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698