Writing a jQuery-powered bookmarklet: is jQuery mature enough to be injected into any webpage and work?

Writing a jQuery-powered bookmarklet: is jQuery mature enough to be injected into any webpage and work?


Hi,
I'm writing a jQuery-powered bookmarklet: I first inject jQuery into a
webpage so that my bookmarklet can then take advantage of jQuery's
cross-browser functionality (similar to Remy Sharp's Microformats
bookmarklet: http://leftlogic.com/lounge/articles/microformats_bookmarklet).
I've run into a few problems so far with the bookmarklet not working
on some webpages, some of them caused by jQuery (detailed below). So
before I continue with this approach, do you guys believe that jQuery
can be injected into most/all webpages and work? How well does jQuery
work in a "hostile" JS environment?
jQuery bookmarklet problems so far (jQuery loaded using
jQuery.noConflict(true)):
1. JQuery blows up when hosting webpage JS has added attributes to
Object.prototype. I fixed this by patching jQuery for-in loops as
discussed in: http://dev.jquery.com/ticket/2721
2. JQuery blows up on certain xhtml+xml pages as it uses innerHTML().
Actually, this turned out to be a bug in Firebox. However, jQuery's
use of the the non-standard innerHTML(), rather than createElement()/
appendChild() has made me question whether jQuery will work on all
browser/web-page combinations. Then again, innerHTML should become
standard in HTML 5..
3. jQuery blows up when hosting webpage JS redefines createElement().
Thanks eBay, that was hilarious! This one would obviously affect any
JS bookmarklet, but it does indicate the "hostile" environment jQuery
could be operating in.
Opinions greatly appreciated!
Oh, and thanks for a great JS library.
Greg