diff --git a/guides/release/quick-reference/index.md b/guides/release/quick-reference/index.md new file mode 100644 index 0000000000..74601a7243 --- /dev/null +++ b/guides/release/quick-reference/index.md @@ -0,0 +1,71 @@ + + +## Counter Component + + + + +## if + +## if else + +## inline if + +## inline if else + +## unless + +## unless else + +## inline unless + +## inline unless else + +## let + +## each + +## keyed each + +## each-in + +## keyed each-in + +## in-element + + + +## yield + + + +## yield to="name" + + + +## modifier + + + +## component + + + +## component for attributes and modifiers + + + +## helper + + + +## fn + + + + diff --git a/guides/release/quick-reference/platform.md b/guides/release/quick-reference/platform.md new file mode 100644 index 0000000000..7d830b7f1a --- /dev/null +++ b/guides/release/quick-reference/platform.md @@ -0,0 +1,62 @@ +In [RFC #1070](https://github.com/emberjs/rfcs/pull/1070), we defined a set of criteria to allow many of the platform native utilities to be used directly within the `` region of components. + +
That criteria may be viewed here + + Criteria for inclusion in this list: + + Any of: + - begins with an uppercase letter + - guaranteed to never be added to glimmer as a keyword (e.g.: globalThis) + + And: + - must not need new to invoke + - must not require lifetime management (e.g.: setTimeout) + - must not be a single-word lower-case API, because of potential collision with future new HTML elements + - if the API is a function, the return value should not be a promise + - must be one one of these lists: + - https://tc39.es/ecma262/#sec-global-object + - https://tc39.es/ecma262/#sec-function-properties-of-the-global-object + - https://html.spec.whatwg.org/multipage/nav-history-apis.html#window + - https://html.spec.whatwg.org/multipage/indices.html#all-interfaces + - https://html.spec.whatwg.org/multipage/webappapis.html + +
+ +## TC39 + +### `globalThis` +### `Atomics` +### `JSON` +### `Math` +### `Reflect` + +### `isNaN` +### `isFinite` +### `parseInt` +### `parseFloat` +### `decodeURI` +### `decodeURIComponent` +### `encodeURI` +### `encodeURIComponent` + +### `Array` +### `BigInt` +### `Boolean` +### `Date` +### `Number` +### `Object` +### `String` + +### `Infinity` +### `NaN` + +## WHATWG + +### `localStorage` +### `sessionStorage` +### `URL` + +### `postMessage` +### `structuredClone` + +### `isSecureContext` diff --git a/public/samples/quick-reference/counter.gjs b/public/samples/quick-reference/counter.gjs new file mode 100644 index 0000000000..673145d6cb --- /dev/null +++ b/public/samples/quick-reference/counter.gjs @@ -0,0 +1,15 @@ +import Component from '@glimmer/component'; +import { tracked } from '@glimmer/tracking'; +import { on } from '@ember/modifier'; + +export default class HelloWorld extends Component { + @tracked count = 0; + + increment = () => this.count += 1; + + +}