From: "T. V. Raman" <raman@cs.cornell.edu>
To: blinux-list@redhat.com
Subject: dealing with javascript
Date: Thu, 23 May 2002 08:11:37 -0700 [thread overview]
Message-ID: <15597.1705.864789.104855@gargle.gargle.HOWL> (raw)
In-Reply-To: <15596.31791.84467.201839@pjrnb-as.dar.csiro.au>
If you want to write some code, here is an approach that
will work:
Basically Javascript of interest does one of 3 things:
0) generate content (document.write )
1) Provides an event handler e.g. for mouse rollovers etc
--the only handler that is really of interest is the one on
form submit and anchor clicks (href="javascript:")
2) These handlers typically show up as JS functions written
by the site author -- and eventually end up calling
window.open or something equivalent like
document.location="url"
You can handle all of these by essentially running the HTML
page through a JS interpreter and telling the interpreter to
produce HTML with the JS code evaluated
and results spliced back in as HTML.
Look at rhino.jar for a full JS implementation in Java
--take rhino.jar and write yourself the above interpreter
--if you dont like Java pick your favorite language.
Finally hook the "interpreter" above
into a proxy server and test it.
the proxy server should run JS enabled WWW pages through
your interpreter.
If you build this it will work for all browsers.
>>>>> "RAYNER" == RAYNER Peter <peter.rayner@csiro.au> writes:
RAYNER> I guess we're all running into problems with
RAYNER> javascript more and more often. I'm wondering
RAYNER> if it's time to put some collective effort into
RAYNER> a solution and, if so, what it might be. The
RAYNER> last time this topic turned up on the emacs-w3
RAYNER> list, Bill Perry's suggestion was for some kind
RAYNER> of external parser, rather than extending the
RAYNER> capabilities of emacs-w3 itself. The other
RAYNER> alternatives I see are to wait and hope the
RAYNER> netscape accessibility efforts make the problem
RAYNER> go away or to extend the capabilities of some
RAYNER> other access tool. Does anyone have any
RAYNER> suggestions for which alternative might be
RAYNER> preferable? If we do decide on an external
RAYNER> filter what kinds of capabilities must it have?
RAYNER> The few times I've looked inside inaccessible
RAYNER> pages the JS seems to be doing uninteresting
RAYNER> things like drop-down lists which could easily
RAYNER> be handled other ways. But I don't know enough
RAYNER> about the capabilities of javascript to know
RAYNER> what other kinds of events we might have to deal
RAYNER> with. I'm happy to try and hack something
RAYNER> together to do this provided there's a
RAYNER> reasonable chance of success; it's about time I
RAYNER> brushed up my perl anyway. There also look to
RAYNER> be some open-source implementations of
RAYNER> interpretters out there we could possibly modify
RAYNER> for the task. So do people have a view of
RAYNER> whether and how to go forward with this? Any
RAYNER> currently active projects? Other comments
RAYNER> cheers Peter Rayner
RAYNER> _______________________________________________
RAYNER> Blinux-list mailing list Blinux-list@redhat.com
RAYNER> https://listman.redhat.com/mailman/listinfo/blinux-list
--
Best Regards,
--raman
Email: raman@cs.cornell.edu
WWW: http://www.cs.cornell.edu/home/raman/
AIM: TVRaman
PGP: http://www.cs.cornell.edu/home/raman/raman.asc
next prev parent reply other threads:[~ UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
RAYNER Peter
` Shaun Oliver
` Dave Mielke
` Cheryl Homiak
` T. V. Raman [this message]
` Cheryl Homiak
` Reformatting websites " Mario Lang
` Andor Demarteau
` Peter Durieux
` Andor Demarteau
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=15597.1705.864789.104855@gargle.gargle.HOWL \
--to=raman@cs.cornell.edu \
--cc=blinux-list@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).