Click here to Skip to main content
12,078,370 members (48,036 online)
Rate this:
 
Please Sign up or sign in to vote.
See more: C++ Extension IE9 DOM BHO
Hello everyone. I am trying to copy the complete content of one IHTMLDocument2 to another new instantiated copy of IHTMLDocument2. In pseudo code, it would be something like this:

IHTMLDocument2 newDoc.content() = oldDoc.content()

The reason why I'd like to do so, is simply that whenever a new webpage is loaded in the browser, i would like to create a copy of that page, process it while the original copy is being displayed to the user on screen. This way, the user wouldn't have to wait for the document to be processed before being displayed on screen.

Any thoughts would be truly appreciated. Thanks in advance!
Posted 20-Feb-13 23:50pm
Daroosh731
Edited 20-Feb-13 23:56pm
v2

1 solution

Rate this: bad
 
good
Please Sign up or sign in to vote.

Solution 1

(haven't tried it) I think you might be able to do this with innerHTML property.
  Permalink  
Comments
Daroosh 6-Mar-13 7:51am
   
Unfortunately, its not that simple! You'll be only copying the STRING content, however, i need to copy the whole page structure, along with the tags and scripts and everything.
H.Brydon 6-Mar-13 10:02am
   
Also be aware that the 'wait' that you are talking about is not generally the time to process the web page - it is the time to download the page through the network. Processing time is usually minimal compared with traversal through the wire.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month


Advertise | Privacy | Mobile
Web04 | 2.8.160212.1 | Last Updated 21 Feb 2013
Copyright © CodeProject, 1999-2016
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100