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
In Gecko (where the XMLSerializer API originates), this outputs: "<Plan version='1.0'/>" That is, the element isn't in a namespace in the DOM, so to keep it not in a namespace in the serialization, the xmlns attribute is dropped.
In WebKit and Blink, this outputs: "<Plan version='1.0' xmlns='http://www.example.com/'/>". That is, by retaining the xmlns attribute set via DOM Level 1, the element moves into a namespace in the serialization.
I believe the Gecko behavior is correct per the original intent of the semantics of the API, WebKit miscloned the API, and Blink inherited the WebKit bug. However, I don't know what the Web compat implications are at this point.
The spec should be clear about which behavior is intended. If there aren't pressing Web compat reasons to have the WebKit/Blink behavior, I think we should have the Gecko behavior, which is XML-wise correct.
The text was updated successfully, but these errors were encountered:
(Likely related to #47 but filing separately, because this is a reverse way of looking at the same problem space.)
https://bugzilla.mozilla.org/show_bug.cgi?id=1763779 gives the following example:
In Gecko (where the
XMLSerializer
API originates), this outputs:"<Plan version='1.0'/>"
That is, the element isn't in a namespace in the DOM, so to keep it not in a namespace in the serialization, thexmlns
attribute is dropped.In WebKit and Blink, this outputs:
"<Plan version='1.0' xmlns='http://www.example.com/'/>"
. That is, by retaining thexmlns
attribute set via DOM Level 1, the element moves into a namespace in the serialization.I believe the Gecko behavior is correct per the original intent of the semantics of the API, WebKit miscloned the API, and Blink inherited the WebKit bug. However, I don't know what the Web compat implications are at this point.
The spec should be clear about which behavior is intended. If there aren't pressing Web compat reasons to have the WebKit/Blink behavior, I think we should have the Gecko behavior, which is XML-wise correct.
The text was updated successfully, but these errors were encountered: