[Greasemonkey] GM 0.6.4 and new DOMParser()

Nick Sieger nicksieger at gmail.com
Mon Dec 5 09:33:59 EST 2005


On 12/4/05, Aaron Boodman <zboogs at gmail.com> wrote:
>
> Holy crap, I didn't even know that would work. Yet another workaround
> for the DOMParser/XMLSerializer issue:
>
> new XPCNativeWrapper(window, "DOMParser").DOMParser
>
> works great. Wish I would have known, I'd've included this with GM 0.6.4.



Would this be a way of bringing back compatibility definitions of a lot of
the DOM-related objects?  Have a compatibility script as part of the GM core
with just a bunch of lines like:

  var DOMParser = new XPCNativeWrapper(window, "DOMParser");
  var XMLSerializer = new XPCNativeWrapper(window, "XMLSerializer");
  var HTMLBodyElement = new XPCNativeWrapper(window, "HTMLBodyElement");
  ... etc. ...

then references to all of the DOM-related types would just work in scripts?


More information about the Greasemonkey mailing list