| 93 | | eTargetDocument.write( '<html><head>' + sBase + '<script type="text/javascript"> var adjust = function() { window.frameElement.height = document.body.scrollHeight ; }; window.onresize = adjust; window.onload = function () {window.setTimeout( adjust, 0 );}</script></head><body style="overflow: hidden">' + document.getElementById( 'xToolbarSpace' ).innerHTML + '</body></html>' ) ; |
| | 93 | eTargetDocument.write( '<html><head>' + sBase + '<script type="text/javascript"> var adjust = function() { window.frameElement.height = document.body.scrollHeight ; }; ' |
| | 94 | + 'window.onresize = window.onload = ' |
| | 95 | + 'function(){' // poll scrollHeight until it no longer changes for 1 sec. |
| | 96 | + 'var timer = null;' |
| | 97 | + 'var lastHeight = -1;' |
| | 98 | + 'var lastChange = 0;' |
| | 99 | + 'var poller = function(){' |
| | 100 | + 'var currentHeight = document.body.scrollHeight || 0;' |
| | 101 | + 'var currentTime = (new Date()).getTime();' |
| | 102 | + 'if (currentHeight != lastHeight){' |
| | 103 | + 'lastChange = currentTime;' |
| | 104 | + 'adjust();' |
| | 105 | + 'lastHeight = document.body.scrollHeight;' |
| | 106 | + '}' |
| | 107 | + 'if (lastChange < currentTime - 1000) clearInterval(timer);' |
| | 108 | + '};' |
| | 109 | + 'timer = setInterval(poller, 100);' |
| | 110 | + '}' |
| | 111 | + '</script></head><body style="overflow: hidden">' + document.getElementById( 'xToolbarSpace' ).innerHTML + '</body></html>' ) ; |