Re: Get POST body from Embedding App?
edburns wrote: But I'm finding that avail is always 0, even when I know there is a post body. Isn't that because the stream has been read by then? Would rewinding it work? -Boris ___ mozilla-embedding mailing list mozilla-embedding@mozilla.org http://mail.mozilla.org/listinfo/mozilla-embedding
Get POST body from Embedding App?
In my embedding app, I want to get programmatic access to the request body for a POST request. Here's what I thought would work. * Create an nsIWebProgressListener. * In my OnStateChange(), if ((aStateFlags & STATE_STOP) && (aStateFlags & STATE_IS_REQUEST)) { nsCOMPtr channel = do_QueryInterface(aRequest); nsCOMPtr upload = do_QueryInterface(channel); if (upload) { nsCOMPtr uploadStream = nsnull; if (NS_SUCCEEDED(rv = upload->GetUploadStream(getter_AddRefs(uploadStream { PRUint32 avail; rv = uploadStream->Available(&avail); } } } But I'm finding that avail is always 0, even when I know there is a post body. I've tried putting this code into the if ((aStateFlags & STATE_START) && (aStateFlags & STATE_IS_REQUEST)) { case, but still I get the same result. How can I get the POST body sent by the browser? Thanks, Ed ___ mozilla-embedding mailing list mozilla-embedding@mozilla.org http://mail.mozilla.org/listinfo/mozilla-embedding
Re: How to retrieve the DOM Tree ?
CHEN Benfeng wrote: I want to use Gecko's HTML parser to parse a HTML file and get the DOM Tree as output. Which API should I look at ? There is currently no reasonable API to the HTML parser -Boris ___ mozilla-embedding mailing list mozilla-embedding@mozilla.org http://mail.mozilla.org/listinfo/mozilla-embedding
Click() doesn't work like real mouse click
To want to send a form, by calling Click() method of nsIDOMInputElement on submit button. But browser do not send contains of other form elements, like textfields, radiobuttons, etc. It looks like, the other fields of form was left unfilled. When I take a mouse into my hand, and click that button, it wors fine... How to send a form with all submit data? ___ mozilla-embedding mailing list mozilla-embedding@mozilla.org http://mail.mozilla.org/listinfo/mozilla-embedding
How to retrieve the DOM Tree ?
Hi, all: I want to use Gecko's HTML parser to parse a HTML file and get the DOM Tree as output. Which API should I look at ? Thanks very much. ___ mozilla-embedding mailing list mozilla-embedding@mozilla.org http://mail.mozilla.org/listinfo/mozilla-embedding