Skip to content

Commit 49b6698

Browse files
authored
Update A-Frame link, kill Brick example
Brick's repo has been archived for years. And the A-Frame example works just like it did before.
1 parent cf350a7 commit 49b6698

File tree

1 file changed

+1
-12
lines changed

1 file changed

+1
-12
lines changed

docs/hyperscript.md

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,7 @@ m("input[readonly]")
182182
m("input[readOnly]")
183183
```
184184

185-
This even includes custom elements. For example, you can use [A-Frame](https://aframe.io/docs/0.8.0/introduction/) within Mithril.js, no problem!
185+
This even includes custom elements. For example, you can use [A-Frame](https://aframe.io/docs/1.6.0/introduction/) within Mithril.js, no problem!
186186

187187
```javascript
188188
m("a-scene", [
@@ -219,17 +219,6 @@ m("a-scene", [
219219
])
220220
```
221221

222-
And yes, this translates to both attributes and properties, and it works just like they would in the DOM. Using Brick's `brick-deck` (DEAD LINK, FIXME: http //brick.mozilla.io/docs/brick-deck) as an example, they have a `selected-index` attribute with a corresponding `selectedIndex` getter/setter property.
223-
224-
```javascript
225-
m("brick-deck[selected-index=0]", [/* ... */]) // lowercase
226-
m("brick-deck[selectedIndex=0]", [/* ... */]) // uppercase
227-
// I know these look odd, but `brick-deck`'s `selectedIndex` property is a
228-
// string, not a number.
229-
m("brick-deck", {"selected-index": "0"}, [/* ... */])
230-
m("brick-deck", {"selectedIndex": "0"}, [/* ... */])
231-
```
232-
233222
For custom elements, it doesn't auto-stringify properties, in case they are objects, numbers, or some other non-string value. So assuming you had some custom element `my-special-element` that has an `elem.whitelist` array getter/setter property, you could do this, and it'd work as you'd expect:
234223

235224
```javascript

0 commit comments

Comments
 (0)