diff options
| author | Joris | 2025-03-22 07:39:07 +0100 | 
|---|---|---|
| committer | Joris | 2025-03-22 07:39:07 +0100 | 
| commit | 03ea9806bf7ea1f97e1704451bad51ab834df54b (patch) | |
| tree | 5da1b384dc159e5a1bb491e9c7a2891014485afb /src | |
| parent | c6ac1ec310db17b517c5b978752c22de5b4de3f5 (diff) | |
Configure element to mount to
Diffstat (limited to 'src')
| -rw-r--r-- | src/example.ts | 6 | ||||
| -rw-r--r-- | src/rx.ts | 4 | 
2 files changed, 5 insertions, 5 deletions
| diff --git a/src/example.ts b/src/example.ts index 0870f4e..5a22419 100644 --- a/src/example.ts +++ b/src/example.ts @@ -126,7 +126,7 @@ const chrono =      }))    ]) -const doubleMapChild =  +const doubleMapChild =    withState(true, isEven =>      withState('', search => {        const books = [...Array(50).keys()] @@ -150,7 +150,7 @@ const doubleMapChild =          ),          h('hr'),          isEven.map(b => -          b  +          b              ? filteredBooks.map(xs => `isEven (${xs.length})`)              : filteredBooks.map(xs => `isOdd (${xs.length})`)          ), @@ -204,7 +204,7 @@ const view = h('main',    indirectCheckbox  ) -mount(view) +mount(document.body, view)  // Checkbox @@ -222,9 +222,9 @@ class Sequence<A> extends Rx<Array<A>> {  // Mount -export function mount(html: Html): Cancelable { +export function mount(element: HTMLElement, html: Html): Cancelable {    const state = new State() -  let appendRes = appendChild(state, document.body, html) +  let appendRes = appendChild(state, element, html)    return appendRes.cancel  } | 
