You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am afraid the createNodesFromMarkup module does not properly handle a linearGradient & radialGradient nodes, or presumably any element whose tag has capital letters. getNodeName always converts the tag name to lowercase, so the node adopts incorrectly adopts the XHTML namespace.
import createNodesFromMarkup from 'fbjs/lib/createNodesFromMarkup'
const markup = '<linearGradient id="foo"></linearGradient>'
const result = createNodesFromMarkup(markup)
const node = result[0]
console.log(node.tagName) // 'LINEARGRADIENT', should be 'linearGradient'
console.log(node.localName) // 'lineargradient', should be 'linearGradient'
console.log(node.namespaceURI) // 'http://www.w3.org/1999/xhtml', should be 'http://www.w3.org/2000/svg'
Thank you for your time.
The text was updated successfully, but these errors were encountered:
I am afraid the
createNodesFromMarkup
module does not properly handle alinearGradient
&radialGradient
nodes, or presumably any element whose tag has capital letters.getNodeName
always converts the tag name to lowercase, so the node adopts incorrectly adopts the XHTML namespace.Here is a working demonstration with React. Notice that the circle's gradient fill is not working after the component is updated.
And here is a bare-bones example:
Thank you for your time.
The text was updated successfully, but these errors were encountered: