| OLD | NEW |
| 1 Sky IDL | 1 Sky IDL |
| 2 ======= | 2 ======= |
| 3 | 3 |
| 4 The Sky IDL language is used to describe JS APIs found in Sky, in | 4 The Sky IDL language is used to describe JS APIs found in Sky, in |
| 5 particular, the JS APIs exposed by the four magical imports defined in | 5 particular, the JS APIs exposed by the four magical imports defined in |
| 6 this document. | 6 this document. |
| 7 | 7 |
| 8 Sky IDL definitions are typically compiled to C++ that exposes the C++ | 8 Sky IDL definitions are typically compiled to C++ that exposes the C++ |
| 9 implementations of the APIs to JavaScript. | 9 implementations of the APIs to JavaScript. |
| 10 | 10 |
| (...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 120 | 120 |
| 121 ### Types ### | 121 ### Types ### |
| 122 | 122 |
| 123 The following types are available: | 123 The following types are available: |
| 124 | 124 |
| 125 * ``Integer`` - WebIDL ``long long`` | 125 * ``Integer`` - WebIDL ``long long`` |
| 126 * ``Float`` - WebIDL ``double`` | 126 * ``Float`` - WebIDL ``double`` |
| 127 * ``Infinity`` - singleton type with value ``Infinity`` | 127 * ``Infinity`` - singleton type with value ``Infinity`` |
| 128 * ``String`` - WebIDL ``USVString`` | 128 * ``String`` - WebIDL ``USVString`` |
| 129 * ``Boolean`` - WebIDL ``boolean`` | 129 * ``Boolean`` - WebIDL ``boolean`` |
| 130 # ``Object`` - WebIDL ``object`` (``ClassName`` can be used as a literal for thi
s type) | 130 * ``Object`` - WebIDL ``object`` (``ClassName`` can be used as a literal for thi
s type) |
| 131 * ``ClassName`` - an instance of the class ClassName | 131 * ``ClassName`` - an instance of the class ClassName |
| 132 * ``Class<ClassName>`` - a class ClassName or one of its subclasses (not an inst
ance) | 132 * ``Class<ClassName>`` - a class ClassName or one of its subclasses (not an inst
ance) |
| 133 * ``DictionaryName`` - an instance of the dictionary DictionaryName | 133 * ``DictionaryName`` - an instance of the dictionary DictionaryName |
| 134 * ``Promise<Type>`` - WebIDL ``Promise<T>`` | 134 * ``Promise<Type>`` - WebIDL ``Promise<T>`` |
| 135 * ``Generator<Type>`` - An ECMAScript generator function that returns data of th
e given type | 135 * ``Generator<Type>`` - An ECMAScript generator function that returns data of th
e given type |
| 136 * ``Array<Type>`` - WebIDL ``sequence<T>`` | 136 * ``Array<Type>`` - WebIDL ``sequence<T>`` |
| 137 * ``Dictionary<Type>`` - unordered set of name-value String-Type pairs with no d
uplicate names | 137 * ``Dictionary<Type>`` - unordered set of name-value String-Type pairs with no d
uplicate names |
| 138 * ``Type?`` - union of Type and the singleton type with value ``null`` (WebIDL n
ullable) | 138 * ``Type?`` - union of Type and the singleton type with value ``null`` (WebIDL n
ullable) |
| 139 * ``(Type1 or Type2)`` - union of Type1 and Type2 (WebIDL union) | 139 * ``(Type1 or Type2)`` - union of Type1 and Type2 (WebIDL union) |
| 140 * ``any`` - union of all types (WebIDL ``any``) | 140 * ``any`` - union of all types (WebIDL ``any``) |
| 141 | 141 |
| 142 Methods that return nothing (undefined, in JS) use the keyword "void" | 142 Methods that return nothing (undefined, in JS) use the keyword "void" |
| 143 instead of a type. | 143 instead of a type. |
| 144 | 144 |
| 145 | 145 |
| 146 TODO(ianh): Define in detail how this actually works | 146 TODO(ianh): Define in detail how this actually works |
| 147 | 147 |
| 148 | 148 |
| 149 Mojom IDL | 149 Mojom IDL |
| 150 --------- | 150 --------- |
| 151 | 151 |
| 152 The Mojom IDL language is used to describe the APIs exposed over Mojo | 152 The Mojom IDL language is used to describe the APIs exposed over Mojo |
| 153 pipes. | 153 pipes. |
| 154 | 154 |
| 155 Mojom IDL definitions are typically compiled to wrappers in each | 155 Mojom IDL definitions are typically compiled to wrappers in each |
| 156 language, which are then used as imports. | 156 language, which are then used as imports. |
| 157 | 157 |
| 158 TODO(ianh): Define in detail how this actually works | 158 TODO(ianh): Define in detail how this actually works |
| OLD | NEW |