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.

http://jsfiddle.net/zll4814s/

<h1 id="headertag">hello</h1>  <button onclick="changetext()">click change text</button> 

js

window.changetext = function() {     document.getelementbyid('headertag').innerhtml = "bye";     window.print(); } 

Comments

Popular posts from this blog

javascript - How to synchronize the Three.js and HTML/SVG coordinate systems (especially w.r.t. the y-axis)? -

javascript - How do I find how many occurences are there of a highlighted string, and which occurence is it? -

java - Reading data from multiple zip files and combining them to one -