[Greasemonkey] evaluate and XPCNativeWrapper in 0.6.4
Bruce Perry
bhrperry at comcast.net
Tue Jan 31 11:42:06 EST 2006
At 10:42 AM 1/31/2006, you wrote:
Thanks for the reply. And thank you to everyone else who replied too. As
you can probably tell, my DOM experience is, let's say, limited. Now that
I'm trying for the right attribute (innerHTML), things are working much better.
><snip>
>The second issue, as pointed out elsewhere in this thread, is because
>outerHTML is an IE-proprietary attribute that Firefox doesn't emulate.
> If you give us a better sense of what you're actually trying to do
>with the h2 elements, perhaps we can suggest an alternative.
Well, going for h2 was my attempt to get XPath to work at all. I'm new to
that too. What I'm actually trying to do is get a bunch of links that are
children of h4 nodes. The h4 nodes all come after a specific h3 node (no
ID, but will contain specific text). All this is contained in a div tag
with the id of 'sidebar', but this situation probably won't be duplicated
elsewhere on the page. I certainly don't expect anyone to wade through all
that for me. I'll build more specific XPath expressions and narrow in on
what I really want.
<snip>
>As I said, you should be able to access all of the supported
>attributes and methods without caring that the element is "wrapped".
>There is a way to access the "unwrapped" version, but this is
>inherently unsafe (for reasons detailed in Hack #12), so I'm going to
>be slightly patronizing and not tell you how to do it until you give
>us more details on what you're trying to do. It is very likely that
>you can do what you need without "unwrapping" each element.
Now that I know that my problem is DOM-related, I certainly don't need to
dabble in unsafe access methods.
Thanks again,
Bruce
More information about the Greasemonkey
mailing list