On Sat, Jun 6, 2009 at 11:13 PM, meryl <[email protected]> wrote: > > Hi, > > I add debug print status in BrowserRenderProcessHost::OnPageContents > () to print out the value of 'contents' > > void BrowserRenderProcessHost::OnPageContents(const GURL& url, > int32 page_id, > const std::wstring& contents); > // original code > > // I add this: > cout << " BrowserRenderProcessHost::OnPageContents" << endl; > cout << " <<<<<" << endl; > > cout << contents; > > cout << " <<<<<" << endl; > > } > > My question is why I only see the 'Text' of the page? I tried loading > www.google.ca, but I only see these values:
I'm assuming your question is why it doesn't also contain the HTML... This function is called by the renderer with the text of the page so we can index it for history search. As a result, it contains only the text, since we don't want to index the HTML. If you have code that needs to get the full HTML of the page, you need to be in the renderer process and walk the DOM yourself. Brett --~--~---------~--~----~------------~-------~--~----~ Chromium Developers mailing list: [email protected] View archives, change email options, or unsubscribe: http://groups.google.com/group/chromium-dev -~----------~----~----~----~------~----~------~--~---
