This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.
https://xhr.spec.whatwg.org/#dom-xmlhttprequest-send It should probably point to: https://dvcs.w3.org/hg/innerhtml/raw-file/tip/index.html#dfn-concept-fragment-serializing-algorithm
That seems to take a flag. Bit unclear what contexts should not set that flag...
From APIs defined in that spec [DOM P&S], innerHTML and outerHTML set the flag, and serializeToString does not. Basically, you pass true for the flag if you want to have the algorithm throw on invalid XML serialization. So, if send() may throw (and I think it anticipates that possibility) than pass true.
https://github.com/whatwg/xhr/commit/829579048b349bbab3fd24c33f5faf822d5f3c0b
Thanks! https://dvcs.w3.org/hg/innerhtml/raw-file/tip/index.html#dfn-concept-fragment-serializing-algorithm doesn't actually scroll to the right part of the spec, but I'm going to blame ReSpec for that. Note that Blink always serializes as application/xml, and the discrepancy is why I filed this bug.