I've been busy converting something into a module, which was previously included from a <script> command in an overlay extension. Part of that code uses DomParser. For which you have to use
Code: Select all
const DOMParser = Components.Constructor("@mozilla.org/xmlextras/domparser;1", "nsIDOMParser");
however, it promptly blue up on some XML that it had previously accepted. Fortunately you get some trace in the console saying where it had got upset. And what it didn't like was a tag that had the attribute
Code: Select all
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"'
I don't really understand why it should error that. Firstly it was totally happy with that when I was using the non module DomParser(). Secondly, that's not invalid XML.
It's easy enough to get round - I just strip that tag out of the file before I process it. I'm not sure how it got in there, though I imagine once it was in, it will have stayed in because of the way the code deals with the XML. But it is a somewhat disconcerting difference in behaviour.