Open octaviancorlade opened 7 years ago
Just to keep track of what was found with some more testing (see comments on Issue #214):
No reason to use xhtml:pre
instead of pre
, since the namespace is removed in d3.selection.append()
and therefore doesn't affect the result.
No reason to remove the foreignObject
tag, which would be semantically more correct.
Just removing the .append("xhtml:body")
should be enough.
Consistency in appending .html()
or .text()
would be a good idea, probably using .text()
with \n
for new lines is easier inside pre
.
I haven't actually tested this, but based on the discussion and what I know/remember, this gets my seal of approval. Using the <foreignObject>
tag I think is necessary for older browser compatibility, but use of the <body>
tag, namespaced or not, seems to cause conflicts with other JavaScript packages when they select elements in the DOM.
this would probably fix #250 as well
The problem that this was intended to workaround has been fixed upstream in shiny
, so I'm not sure this needs to be merged anymore. Will leave open for now though as this may be a better strategy than the current one.
Removes the necessity of declaring a new namespace for each
Working on Chrome 60.0.3112.113, FF 55.0.3, Safari 10.1.2, IE11.
Fixes #214