printing - Do Javascript changes to the DOM affect the print version of a page? -
there page need sorting via javascript.
if such sorting, , user decides print page, original dom printed or updated dom?
i see being original dom, reloads page, , applies @media print styles, or see switching css page.
if there difference between browsers, care chrome , firefox.
in both chrome , ff see updated dom in print preview , in chrome's network tab, no new interaction server logged.
<h1 id="headertag">hello</h1> <button onclick="changetext()">click change text</button>
js
window.changetext = function() { document.getelementbyid('headertag').innerhtml = "bye"; window.print(); }
Comments
Post a Comment