Fork or copy user browser session in IE

Can I deploy a user session (or do something similar) in the Internet Explorer plugin?

I want to process the page on which the user is turned on when he clicks a button on the toolbar. In order not to interrupt user browsing, I would like to “copy” everything so that I can analyze and process the page in the background. Processing may include things such as loading the contents of links to a result in a Google search, if it clicked a button.

So basically I want to emulate " Ctrl+N", but hide the window from the user, so they will not be interrupted.

As you can see, if you fill out and submit the form at http://www.snee.com/xml/crud/posttest.html and click " Ctrl+N", everything published will still appear in a new window, but it will not publish data twice.

I was thinking about copying it somehow IWebBrowser2, but:

  • I'm not sure if this is possible (I could not find any information on MSDN)
  • I do not know if he is copying sessions.

Creating a new instance IWebBrowser2and simply navigating to the current URL is not a valid solution since POST-variables, of course, is not portable.

+3
source share
3 answers

BHO . , , . . IDocHostUIHandler, . IHTMLElementCollection . , , - ...

. , get/view.

// #
HRESULT SaveDocumenttoStream (IWebBrowser * pWebBrowser,                            IStream * pStream)
{
HRESULT hr;
IDispatch * pHtmlDoc = NULL;
IPersistStreamInit * pPersistStreamInit = NULL;
hr = pWebBrowser-> get_Document (& pHtmlDoc);
 (SUCCEEDED (hr) & pHtmlDoc)
{ //   IPersistStreamInit. hr = pHtmlDoc-> QueryInterface (IID_IPersistStreamInit,                              (void **) & pPersistStreamInit); if (SUCCEEDED (hr)) {    hr = pPersistStreamIni->  (, True);    pPersistStreamInit-> Release(); } pHtmlDoc-> Release();
}

stream.HTH

-

+1

. DOM holus-bolus DOM . . , .

0

, , , - . :

  • - (, IFRAME). , URL-, -, , . .
  • , , , . , .

, live - , ; , . , .

0

Source: https://habr.com/ru/post/1699152/


All Articles