From 17cc09673898c3f786c258f67a0b0462ef4eaa95 Mon Sep 17 00:00:00 2001 From: Hixie Date: Fri, 24 Oct 2014 14:14:34 -0700 Subject: [PATCH] Docs: fix markdown in various files, update the README mildly Review URL: https://codereview.chromium.org/678693003 --- README.md | 29 ++++-- specs/README.md | 16 ++-- specs/apis.md | 30 +++---- specs/markup.md | 15 ++-- specs/modules.md | 2 +- specs/parsing.md | 228 +++++++++++++++++++++++------------------------ 6 files changed, 165 insertions(+), 155 deletions(-) diff --git a/README.md b/README.md index a4f2eda82..ac2666209 100644 --- a/README.md +++ b/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 - - +SKY MODULE + + - [ ... 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()); + } +}