Update migration, fix various minor issues
- Lot of people couldn't migrate to v1 and plan to reevaluate when v2 is released. - It's "npm" not "NPM". It doesn't stand for anything, and it never has - it was initially chosen simply because it was easy to type. It has a lot of unofficial backronyms with "Node Package Manager" being one of the most common ones, but it's never officially stood for anything as an acronym *or* initialism. - Fixed a few errors in the change log, like non-breaking changes being included in the "Breaking Changes" section and an inaccuracy in the summary of a particular change. - Fixed RawGit URLs to point to GitHack, which is a lighter proxy that offloads caching to Cloudflare instead of also implementing it itself. (It also just uses nginx for all the important server logic, so it scales better.) - Add a few more v0.2 references as appropriate
This commit is contained in:
parent
8186818e10
commit
234b1c9302
26 changed files with 1389 additions and 935 deletions
|
|
@ -122,8 +122,8 @@ m("section.container")
|
|||
m("input[type=text][placeholder=Name]")
|
||||
// <input type="text" placeholder="Name" />
|
||||
|
||||
m("a#exit.external[href='http://example.com']", "Leave")
|
||||
// <a id="exit" class="external" href="http://example.com">Leave</a>
|
||||
m("a#exit.external[href='https://example.com']", "Leave")
|
||||
// <a id="exit" class="external" href="https://example.com">Leave</a>
|
||||
```
|
||||
|
||||
If you omit the tag name, Mithril assumes a `div` tag.
|
||||
|
|
@ -215,7 +215,7 @@ m("a-scene", [
|
|||
])
|
||||
```
|
||||
|
||||
And yes, this translates to both attributes and properties, and it works just like they would in the DOM. Using [Brick's `brick-deck`](http://brick.mozilla.io/docs/brick-deck) as an example, they have a `selected-index` attribute with a corresponding `selectedIndex` getter/setter property.
|
||||
And yes, this translates to both attributes and properties, and it works just like they would in the DOM. Using [Brick's `brick-deck`](https://brick.mozilla.io/docs/brick-deck) as an example, they have a `selected-index` attribute with a corresponding `selectedIndex` getter/setter property.
|
||||
|
||||
```javascript
|
||||
m("brick-deck[selected-index=0]", [/* ... */]) // lowercase
|
||||
|
|
@ -232,7 +232,7 @@ For custom elements, it doesn't auto-stringify properties, in case they are obje
|
|||
m("my-special-element", {
|
||||
whitelist: [
|
||||
"https://example.com",
|
||||
"http://neverssl.com",
|
||||
"https://neverssl.com",
|
||||
"https://google.com",
|
||||
],
|
||||
})
|
||||
|
|
@ -462,7 +462,7 @@ You cannot use JavaScript statements such as `if` or `for` within JavaScript exp
|
|||
|
||||
In Mithril, well-formed HTML is valid JSX. Little effort other than copy-pasting is required to integrate an independently produced HTML file into a project using JSX.
|
||||
|
||||
When using hyperscript, it's necessary to convert HTML to hyperscript syntax before the code can be run. To facilitate this, you can [use the HTML-to-Mithril-template converter](http://arthurclemens.github.io/mithril-template-converter/index.html).
|
||||
When using hyperscript, it's necessary to convert HTML to hyperscript syntax before the code can be run. To facilitate this, you can [use the HTML-to-Mithril-template converter](https://arthurclemens.github.io/mithril-template-converter/index.html).
|
||||
|
||||
---
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue