| OLD | NEW |
| 1 Sky Markup: Syntax | 1 Sky Markup: Syntax |
| 2 ================== | 2 ================== |
| 3 | 3 |
| 4 A Sky file must consist of the following components: | 4 A Sky file must consist of the following components: |
| 5 | 5 |
| 6 1. If the file is intended to be a top-level Sky application, the | 6 1. If the file is intended to be a top-level Sky application, the |
| 7 string "``#!mojo mojo:sky``" followed by a U+0020, U+000A or | 7 string "``#!mojo mojo:sky``" followed by a U+0020, U+000A or |
| 8 U+000D character. | 8 U+000D character. |
| 9 | 9 |
| 10 If the file is intended to be a module, then the string "SKY", a | 10 If the file is intended to be a module, then the string "SKY", a |
| (...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 158 ``<import src="foo.sky" as="foo">`` | 158 ``<import src="foo.sky" as="foo">`` |
| 159 - Downloads and imports foo.sky in the background, using "foo" as its | 159 - Downloads and imports foo.sky in the background, using "foo" as its |
| 160 local name (see ``<script>``). | 160 local name (see ``<script>``). |
| 161 | 161 |
| 162 ``<template>`` | 162 ``<template>`` |
| 163 - The contents of the element aren't placed in the Element itself. | 163 - The contents of the element aren't placed in the Element itself. |
| 164 They are instead placed into a DocumentFragment that you can obtain | 164 They are instead placed into a DocumentFragment that you can obtain |
| 165 from the element's "content" attribute. | 165 from the element's "content" attribute. |
| 166 | 166 |
| 167 ``<script>`` | 167 ``<script>`` |
| 168 - Blocks until all previous imports have been loaded, then runs the | 168 - Blocks until all previous imports have been loaded, then loads the |
| 169 script, with 'module' as the first argument, the exports of any | 169 library given in the script block, as described in |
| 170 imports that have "as" attributes at this time passed in as | 170 [scripts.md](scripts.md). |
| 171 subsequent arguments, and with "this" set to null. | |
| 172 | 171 |
| 173 ``<style>`` | 172 ``<style>`` |
| 174 - Adds the contents to the document's styles. | 173 - Adds the contents to the document's styles. |
| 175 | 174 |
| 176 ``<content>`` | 175 ``<content>`` |
| 177 ``<content select="...">`` | 176 ``<content select="...">`` |
| 178 - In a shadow tree, acts as an insertion point for distributed nodes. | 177 - In a shadow tree, acts as an insertion point for distributed nodes. |
| 179 The select="" attribute gives the selector to use to pick the nodes | 178 The select="" attribute gives the selector to use to pick the nodes |
| 180 to place in this insertion point; it defaults to everything. | 179 to place in this insertion point; it defaults to everything. |
| 181 | 180 |
| (...skipping 19 matching lines...) Expand all Loading... |
| 201 ``<a href="foo.bin">`` | 200 ``<a href="foo.bin">`` |
| 202 - A widget that, when invoked, causes mojo to open a new application | 201 - A widget that, when invoked, causes mojo to open a new application |
| 203 for "foo.bin". | 202 for "foo.bin". |
| 204 | 203 |
| 205 ``<title>`` | 204 ``<title>`` |
| 206 - Sets the contents as the document's title (as provided by Sky to | 205 - Sets the contents as the document's title (as provided by Sky to |
| 207 the view manager). (Actually just ensures that any time the element | 206 the view manager). (Actually just ensures that any time the element |
| 208 is mutated, theTitleElement.ownerScope.ownerDocument.title is set | 207 is mutated, theTitleElement.ownerScope.ownerDocument.title is set |
| 209 to the element's contents.) | 208 to the element's contents.) |
| 210 | 209 |
| 211 ``<error>`` | |
| 212 - Represents a parse error. | |
| 213 | |
| 214 | 210 |
| 215 Sky Markup: Global Attributes | 211 Sky Markup: Global Attributes |
| 216 ============================= | 212 ============================= |
| 217 | 213 |
| 218 The following attributes are available on all elements: | 214 The following attributes are available on all elements: |
| 219 | 215 |
| 220 * ``id=""`` (any value) | 216 * ``id=""`` (any value) |
| 221 * ``class=""`` (any value, space-separated) | 217 * ``class=""`` (any value, space-separated) |
| 222 * ``style=""`` (declaration part of a Sky style rule) | 218 * ``style=""`` (declaration part of a Sky style rule) |
| 223 * ``lang=""`` (language code) | 219 * ``lang=""`` (language code) |
| 224 * ``dir=""`` (ltr or rtl only) | 220 * ``dir=""`` (ltr or rtl only) |
| 225 * ``contenteditable=""`` (subject to future developments) | 221 * ``contenteditable=""`` (subject to future developments) |
| 226 * ``tabindex=""`` (subject to future developments) | 222 * ``tabindex=""`` (subject to future developments) |
| OLD | NEW |