In message <[EMAIL PROTECTED]>, Boris Zbarsky
<[EMAIL PROTECTED]> writes
Stephen Kellett wrote:
Scenario: I'm in a JavaScript callback (for example the callHook
callback) and I have a JSContext * and a JSScript at my disposal. How
can I get the page source code for this page?
You can't, in general.
I'm not so sure. See below. I have the name of the page at my disposal.
However if its a non-local file such as
http://someWebAddress/page.html or one of the chrome:// pages then I
can't open that. I don't want to fetch the page myself as the page
content may be different for each call - I want the same source as the
page which resulted in my script being called.
That may not be stored anywhere.
That raises the question: When I do View Page Source from the View menu
or the context menu how does it get the page source to display in the
window?
All I want to do is that. I don't know how to do that. Either it is
refetched or it is in a local page-cache managed by Mozilla. I don't
care where it is, just how to fetch it.
Stephen
--
Stephen Kellett
Object Media Limited http://www.objmedia.demon.co.uk/software.html
Computer Consultancy, Software Development
Windows C++, Java, Assembler, Performance Analysis, Troubleshooting
_______________________________________________
mozilla-embedding mailing list
[email protected]
http://mail.mozilla.org/listinfo/mozilla-embedding