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
FixGH-12870: Creating an xmlns attribute results in a DOMException
There were multiple things here since forever, see the GH thread [1]
for discussion.
There were already many fixes to this function previously, and as a
consequence of one of those fixes this started throwing exceptions for a
correct use-case. It turns out that even when reverting to the previous
behaviour there are still bugs. Just fix all of them while we have the
chance.
[1] #12870ClosesGH-12888.
/* Either memory allocation failure, or it's because of a prefix conflict.
1604
+
* We'll assume a conflict and try again. If it was a memory allocation failure we'll just fail again, whatever.
1605
+
* This isn't needed for every caller (such as createElementNS & DOMElement::__construct), but isn't harmful and simplifies the mental model "when do I use which function?".
1606
+
* This branch will also be taken unlikely anyway as in those cases it'll be for allocation failure. */
/* Either memory allocation failure, or it's because of a prefix conflict.
1609
-
* We'll assume a conflict and try again. If it was a memory allocation failure we'll just fail again, whatever.
1610
-
* This isn't needed for every caller (such as createElementNS & DOMElement::__construct), but isn't harmful and simplifies the mental model "when do I use which function?".
1611
-
* This branch will also be taken unlikely anyway as in those cases it'll be for allocation failure. */
0 commit comments