jQuery, 'document', and FF extensions

jQuery, 'document', and FF extensions


Greetings --
I have only recently begun using jQuery, so apologies in advance if my
question and proposal is way off base.
I'm using jQuery-1.2.6 within a Firefox extension. For the most part
it works as-is, though there are some methods that do not work because
they use the "document" object.
My extension gets a handle to the document in the browser, so I have
been using code that looks like:
$("#foo", docHandle).whatever...
Which works fine, but there are still many non-functioning methods
that do not have a context argument and are hardwired to use the
"document" object.
My solution was to create a class variable "root", whose default value
is "document" (output from diffing with 1.2.6)...
26a27,29