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

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

Issue 724093003: Specs: Make even the application scripts get 'module' as their local object, rather than 'applicati… (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 | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 145 matching lines...) Expand 10 before | Expand all | Expand 10 after
156 - Downloads and imports foo.sky in the background, using "foo" as its 156 - Downloads and imports foo.sky in the background, using "foo" as its
157 local name (see ``<script>``). 157 local name (see ``<script>``).
158 158
159 ``<template>`` 159 ``<template>``
160 - The contents of the element aren't placed in the Element itself. 160 - The contents of the element aren't placed in the Element itself.
161 They are instead placed into a DocumentFragment that you can obtain 161 They are instead placed into a DocumentFragment that you can obtain
162 from the element's "content" attribute. 162 from the element's "content" attribute.
163 163
164 ``<script>`` 164 ``<script>``
165 - Blocks until all previous imports have been loaded, then runs the 165 - Blocks until all previous imports have been loaded, then runs the
166 script, with either 'module' or 'application' as the first 166 script, with 'module' as the first argument, the exports of any
167 argument, the exports of any imports that have "as" attributes at 167 imports that have "as" attributes at this time passed in as
168 this time passed in as subsequent arguments, and with "this" set to 168 subsequent arguments, and with "this" set to null.
169 null.
170 169
171 ``<style>`` 170 ``<style>``
172 - Adds the contents to the document's styles. 171 - Adds the contents to the document's styles.
173 172
174 ``<content>`` 173 ``<content>``
175 ``<content select="...">`` 174 ``<content select="...">``
176 - In a shadow tree, acts as an insertion point for distributed nodes. 175 - In a shadow tree, acts as an insertion point for distributed nodes.
177 The select="" attribute gives the selector to use to pick the nodes 176 The select="" attribute gives the selector to use to pick the nodes
178 to place in this insertion point; it defaults to everything. 177 to place in this insertion point; it defaults to everything.
179 178
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
215 214
216 The following attributes are available on all elements: 215 The following attributes are available on all elements:
217 216
218 * ``id=""`` (any value) 217 * ``id=""`` (any value)
219 * ``class=""`` (any value, space-separated) 218 * ``class=""`` (any value, space-separated)
220 * ``style=""`` (declaration part of a Sky style rule) 219 * ``style=""`` (declaration part of a Sky style rule)
221 * ``lang=""`` (language code) 220 * ``lang=""`` (language code)
222 * ``dir=""`` (ltr or rtl only) 221 * ``dir=""`` (ltr or rtl only)
223 * ``contenteditable=""`` (subject to future developments) 222 * ``contenteditable=""`` (subject to future developments)
224 * ``tabindex=""`` (subject to future developments) 223 * ``tabindex=""`` (subject to future developments)
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698