[Greasemonkey] Turnabout: More Greasemonkey for IE
chris feldmann
cfeldmann at gmail.com
Wed Jun 1 01:49:02 EDT 2005
Damnit. gmail is a little buggy. I wasn't done.
a = getElementByTHIS;
for (i; i < a.length i++){
if a(i) = (this OR this OR this){
doStuff;
}
}
I feel not qualified to be talking about what I'm talking about, but you get
the idea, right? xpath translates into a getElementBy and a second trivial
test.
On 6/1/05, chris feldmann <cfeldmann at gmail.com> wrote:
>
> And to go back to this, I guess I mean most XPath queries (no all: most)
> could be translated to a getElementsByTagName or getELementById combined
> with another conditional, so is the DOM-walk you're talking about here just
> referring to those first two getElementBy's? Does that really take a long
> time? You do that then parse against a simple argument:
>
> a = getElementByTHIS;
> for (i; i < a.lenght i++){
>
>
> On 6/1/05, Jeremy Dunck <jdunck at gmail.com> wrote:
> >
> > On 5/31/05, chris feldmann <cfeldmann at gmail.com> wrote:
> > > How about the possiblility of an XPath translation layer? Most XPath
> > > queries I've seen (and written) for greasemonkey are "ACTIVE QUERY,
> > > document, null, standard format, null." Base functionality could be
> > > replicated with (cringe) regular expressions on the query, am I wrong?
> > The
> > > ability to plug in greasemonkey scripts without rewrite would be
> > facilitated
> > > greatly if minor DOM implementation differences could be accounted for
> > > without having to think about entirely unsupported things in IE such
> > as
> > > XPath.
> > >
> >
> > I think most XPath queries could be translated into DOM tree walks,
> > except that they won't work on MSHTML, due to the cycles Aaron
> > mentioned earlier.
> >
> > The JS XPath implementation which GreasemonkIE is very slow; I don't
> > have benchmarks, but maybe 100 times slower than FF's built-in XPath.
> >
> > I'd be surprised if that implementation isn't using tree walks...
> > _______________________________________________
> > Greasemonkey mailing list
> > Greasemonkey at mozdev.org
> > http://mozdev.org/mailman/listinfo/greasemonkey
> >
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mozdev.org/pipermail/greasemonkey/attachments/20050601/171ebd81/attachment.htm
More information about the Greasemonkey
mailing list