SSCCE: Ellie
module Main exposing (main)
import Html
import VirtualDom exposing (nodeNS)
main =
nodeNS "http://www.w3.org/2000/svg"
"script"
[]
[ Html.text "alert('Hi')" ]
The user John J on Slack found it, he had this research. Slack link
The crux of it seems to be that nodeNS arguments are swapped between Elm and JS, on the elm side the tag is the first argument passed into nodeNS. Link to code
nodeNS : String -> String -> List (Attribute msg) -> List (Node msg) -> Node msg
nodeNS tag =
Elm.Kernel.VirtualDom.nodeNS (Elm.Kernel.VirtualDom.noScript tag)
But on the JS side it is expecting the tag as the second argument
var _VirtualDom_nodeNS = F2(function(namespace, tag)
SSCCE: Ellie
The user John J on Slack found it, he had this research. Slack link
The crux of it seems to be that
nodeNSarguments are swapped between Elm and JS, on the elm side the tag is the first argument passed intonodeNS. Link to codeBut on the JS side it is expecting the tag as the second argument