Re: Get html code with line breaks
Posted: Fri Apr 27, 2018 1:59 pm
CEF4Delphi doesn't change the string returned by CEF when you call TChromium.RetrieveHTML. It seems that Chromium returns "cleaner" HTML.
By cleaner I mean that the rendering engine collapses whitespace as the CSS specs dictate. The rendering results are exactly the same if the raw HTML has some extra CRLF sequences or consecutive spaces in some places.
Try the JSExtension demo and use the "Visit DOM in JavaScript" option in the context menu. JavaScript seems to keep more line breaks in the HTML results.
By cleaner I mean that the rendering engine collapses whitespace as the CSS specs dictate. The rendering results are exactly the same if the raw HTML has some extra CRLF sequences or consecutive spaces in some places.
Try the JSExtension demo and use the "Visit DOM in JavaScript" option in the context menu. JavaScript seems to keep more line breaks in the HTML results.