E
e271828
Hi,
I'm helping to work a developer tool that verifies a given HTML element
has a given attribute (e.g., that all LABEL elements have a FOR
attribute, all INPUT elements have an ID attribute, etc.). Pretty much
all of the functionality is working except a feature that shows in
which line of the HTML source a violation of the user-set rule occurs
(e.g., where a LABEL element doesn't have a FOR attribute). There
doesn't seem to be a straightforward way with Javascript to find out at
which line a piece of a page's HTML code is, so I've been reading
through the XBL/XPCOM source code of Mozilla Firefox's Javascript
Console for some insight. While I'm slowly making progress with that
method, I was wondering if I haven't overlooked some way to do what I
want with Javascript. Has anyone dealt with this kind of problem?
Thanks,
Eric
I'm helping to work a developer tool that verifies a given HTML element
has a given attribute (e.g., that all LABEL elements have a FOR
attribute, all INPUT elements have an ID attribute, etc.). Pretty much
all of the functionality is working except a feature that shows in
which line of the HTML source a violation of the user-set rule occurs
(e.g., where a LABEL element doesn't have a FOR attribute). There
doesn't seem to be a straightforward way with Javascript to find out at
which line a piece of a page's HTML code is, so I've been reading
through the XBL/XPCOM source code of Mozilla Firefox's Javascript
Console for some insight. While I'm slowly making progress with that
method, I was wondering if I haven't overlooked some way to do what I
want with Javascript. Has anyone dealt with this kind of problem?
Thanks,
Eric