Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Q] set html "<tag/>" to "<svg>" lost in IE11 #224

Open
ggreif opened this issue Jul 12, 2018 · 3 comments
Open

[Q] set html "<tag/>" to "<svg>" lost in IE11 #224

ggreif opened this issue Jul 12, 2018 · 3 comments

Comments

@ggreif
Copy link
Contributor

ggreif commented Jul 12, 2018

Update: there is no need for the inner, simply set html already shows the issue. Am I using it correctly in the proper namespace? I tried set html "<svg:g hhh=''/>" and that still won't do it.

I have a little snippet that behaves differently on IE11 and Firefox:

do test <- SVG.svg
    inner <- SVG.circle
    pure test # set html "<g hhh=''/>" #+ [pure inner]
    pure body #+ [ UI.div #+ [pure test] ]

In IE11 I get as DOM:

<svg xmlns="http://www.w3.org/2000/svg"><circle /></svg>

while in Mozilla I get

<svg><g hhh=""></g><circle></circle></svg>

Note the absence of <g> in the former. This does not happen in IE when I add stuff to a <div> in the same manner.

Am I using set html ... correctly for adding elements to an <svg> tag? At least one SVG example advertises this way. Or is the IE11 (or the threepenny binding) buggy? Is Firefox buggy to accept this?

@bradrn
Copy link
Contributor

bradrn commented Jul 12, 2018

I don't know if it's relevant, but isn't #223 also about problems with IE11?

@ggreif
Copy link
Contributor Author

ggreif commented Jul 12, 2018

@bradrn no I am already running with the IE11 fix for #223 :-)

@HeinrichApfelmus
Copy link
Owner

Am I using set html ... correctly for adding elements to an tag? At least one SVG example advertises this way.

You should use the functions from the Graphics.UI.Threepenny.SVG.* modules, they use the correct namespace. Using set html is not recommended — it is called html, after all. 😅 Looks like a namespace issue, indeed, but I don't know how fix that.

Which example suggests set html? If it is in the Threepenny repository, I should probably remove it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants