/    Sign up×
Community /Pin to ProfileBookmark

DOM Element Special Property Access

Hi guys,

I’ve been having this issue with Javascript that is just not getting resolved for a while. What I am basically doing is building a simple web browser extension that injects javascript on certain pages. I am using Firefox, Chrome and Safari. The issue I am having is accessing these so called “special properties” on a particular page. They look like the regular classNames, id, textContent and such but don’t appear to be standard. It would be very helpful if I can access them.

A particular example would be in Yahoo Mail. When you are in your inbox you have list of messages. With each message row there are associated attributes. You can get to them with your web inspector or if you search for the div element with id “PagedTableView_wrapper”, then follow the first child and then second child and you get a list of these messages being rendered. Each one of those rows has the regular className properties and such but also has “_checked”, “_focused”, “_selected” that look like custom Yahoo ones. I basically want to read those.

The issue is I can’t. I always end up getting a null exception, as if it doesn’t exist. I can read the className and the other standard ones fine, but not the special ones. (I’ve verified its the same element as well). I have tried the DOM navigation route with indexing, jQuery and XPATH, all with the same result. The weird part is that I can see them with the webInspector! Whats even more strange is that if I run firebug or commands in the Console, it actually works! But it doesn’t work for my injected code/extension! Baffled.

Any suggestions on this topic?

I have a screenshot for a clear picture:

[url]http://img22.imageshack.us/img22/6929/screenrna.jpg[/url]

Any thoughts on the topic are greatly appreciated!

-George

to post a comment
JavaScript

1 Comments(s)

Copy linkTweet thisAlerts:
@inferno_gogoauthorSep 25.2010 — Ughh no ideas? I am starting to think that what I am trying to do is too specific or impossible? Possible hacks/?

-George
×

Success!

Help @inferno_gogo spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.18,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...