Prepare for v2, s/markup/html/g in code blocks

This commit is contained in:
Isiah Meadows 2019-07-23 16:40:45 -04:00
parent 20f0759103
commit b580e241c8
6 changed files with 58 additions and 57 deletions

View file

@ -45,8 +45,8 @@ var Stream = require("mithril/stream")
You can also download the module directly if your environment does not support a bundling toolchain:
```markup
<script src="https://unpkg.com/mithril@next/stream/stream.js"></script>
```html
<script src="https://unpkg.com/mithril/stream/stream.js"></script>
```
When loaded directly with a `<script>` tag (rather than required), the stream library will be exposed as `window.m.stream`. If `window.m` is already defined (e.g. because you also use the main Mithril script), it will attach itself to the existing object. Otherwise it creates a new `window.m`. If you want to use streams in conjunction with Mithril as raw script tags, you should include Mithril in your page before `mithril/stream`, because `mithril` will otherwise overwrite the `window.m` object defined by `mithril/stream`. This is not a concern when the libraries are consumed as CommonJS modules (using `require(...)`).