On your class derived from nsIWebBrowserChrome take a look at
OnStateChange () and check your progressStateFlags for STATE_STOP...that
should be when the document has finished loading. Then you get hold of
the nsIDOMWindow by calling GetDOMWindow () from your aWebProgress
that was passed in nwIWebBrowserChrome::OnStateChange (). Then on the
nsIDOMWindow you just got, do a QueryInterface on it for your
nsIDOMEventTarget. Once you have that you call
nsIDOMEventTarget::AddEventListener () for any events you want to
receive notifications for.
Make sure to implement nsIWebBrowserChrome::HandleEvent () so you can
handle the events you just told Gecko to send you.
Hope this helps.
Niky Williams
Hello!
Thanks to your help I can receive events in my gecko embed app.
But still I dont know how to read values which user writes in input
fields.
For example I have following input field:
<input type="text" id="edit1" value="2">
When I read it by:
nsCOMPtr<nsIDOMNode> domNode;
nsString nodeValue;
....
....
domNode->GetNodeValue(nodeValue);
I always receive default value.
How can I read current value from input field?
lukt1
_______________________________________________
dev-embedding mailing list
[email protected]
https://lists.mozilla.org/listinfo/dev-embedding