[Greasemonkey] GM 0.6.4 and new DOMParser()
Aaron Boodman
zboogs at gmail.com
Mon Dec 5 20:31:21 EST 2005
If you want to know if an element is a select element, the usual way
is to check the tagName property. It would be "select" in this case.
- a
On 12/5/05, Nick Sieger <nicksieger at gmail.com> wrote:
> On 12/5/05, Aaron Boodman <zboogs at gmail.com> wrote:
> >
> > Is HTMLBodyElement missing?
>
>
>
> Well, HTMLBodyElement I can't say for sure, but I had some 0.5 scripts that
> were doing tests like
>
> if (elem instanceof HTMLSelectElement) {
> ...
> }
>
> and upon moving to 0.6 HTMLSelectElement wasn't defined. I assume it's the
> same for most of the DOM types...
>
> (btw, my current hack for the equivalent test of above is
> "/HTMLSelectElement/.test(elem.toString())" which is an ugly hack. Anyone
> have a better suggestion?)
>
> /Nick
> _______________________________________________
> Greasemonkey mailing list
> Greasemonkey at mozdev.org
> http://mozdev.org/mailman/listinfo/greasemonkey
>
More information about the Greasemonkey
mailing list