Sutil fails with `Child not found` when transitionning from `Html.parse` to a real `SutilElement`
MangelMaxime opened this issue · 0 comments
MangelMaxime commented
type Reproduction =
| Case1
| Case2
let app () =
let state = Store.make Reproduction.Case1
Html.div [
Bind.fragment
state
(fun state ->
match state with
| Reproduction.Case1 ->
Html.parse "This is case 1"
| Reproduction.Case2 ->
Html.div [
Html.text "This is case 2"
]
)
Html.button [
Ev.onClick (fun _ -> Store.set state Reproduction.Case2)
prop.text "Go to case 2"
]
]
My suspicion is that Html.parse
does not create a child but set innerHtml
or something like that. I think the access to child
in the replaceChild
function should be protected.