Re: How to get the source for a webpage page using C/C++?
In message [EMAIL PROTECTED], Boris Zbarsky [EMAIL PROTECTED] writes 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. Unfortunately, the APIs for doing that are not really exposed... You'd have to effectively do what nsDocShell::LoadHistoryEntry does. OK. Thank you for that. I've not found that function before. I'll take a look at that. Stephen -- Stephen Kellett Object Media Limitedhttp://www.objmedia.demon.co.uk/software.html Computer Consultancy, Software Development Windows C++, Java, Assembler, Performance Analysis, Troubleshooting ___ mozilla-embedding mailing list mozilla-embedding@mozilla.org http://mail.mozilla.org/listinfo/mozilla-embedding
Re: How to get the source for a webpage page using C/C++?
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. 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. -Boris ___ mozilla-embedding mailing list mozilla-embedding@mozilla.org http://mail.mozilla.org/listinfo/mozilla-embedding
Re: How to get the source for a webpage page using C/C++?
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 Limitedhttp://www.objmedia.demon.co.uk/software.html Computer Consultancy, Software Development Windows C++, Java, Assembler, Performance Analysis, Troubleshooting ___ mozilla-embedding mailing list mozilla-embedding@mozilla.org http://mail.mozilla.org/listinfo/mozilla-embedding
Re: How to get the source for a webpage page using C/C++?
Stephen Kellett wrote: 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? It looks in the cache. If it's not in the cache, it gets it from the network. There are some complications if POST data is involved, of course. 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. Unfortunately, the APIs for doing that are not really exposed... You'd have to effectively do what nsDocShell::LoadHistoryEntry does. -Boris ___ mozilla-embedding mailing list mozilla-embedding@mozilla.org http://mail.mozilla.org/listinfo/mozilla-embedding