Fable icon indicating copy to clipboard operation
Fable copied to clipboard

Unexpected behavior of the map function, when inserting nodes into the DOM tree

Open napretep opened this issue 2 years ago • 0 comments

Description

Unexpected behavior of the map function, when inserting nodes into the DOM tree

In fact these nodes are not inserted into the DOM tree by the map function

Repro code

here is the code

Expected and actual results

Open devtool, you can see that the node with id=crx-root2 has no child nodes, which means that the map function is not working properly image

But the result we expect should be that there are two buttons in this node image In other words, I think the following two pieces of code should be equivalent.

root.appendChild button1 
root.appendChild button2

and

[button1;button2;]
        |> Seq.map root.appendChild

Related information

  • Fable version: dotnet fable --version
  • Operating system

napretep avatar Aug 13 '22 12:08 napretep