mirror of
https://github.com/mozilla/pdf.js.git
synced 2025-04-20 15:18:08 +02:00
Removing introduced by the test run DOM elements
This commit is contained in:
parent
e96e9a14bb
commit
107576d634
2 changed files with 14 additions and 0 deletions
|
@ -50,7 +50,20 @@ function load() {
|
|||
r.send(null);
|
||||
}
|
||||
|
||||
function cleanup() {
|
||||
var styleSheet = document.styleSheets[0];
|
||||
if (styleSheet) {
|
||||
while (styleSheet.cssRules.length > 0)
|
||||
styleSheet.deleteRule(0);
|
||||
}
|
||||
var guard = document.getElementById('content-end');
|
||||
while (document.body.lastChild != guard)
|
||||
document.body.removeChild(document.body.lastChild);
|
||||
}
|
||||
|
||||
function nextTask() {
|
||||
cleanup();
|
||||
|
||||
if (currentTaskIdx == manifest.length) {
|
||||
return done();
|
||||
}
|
||||
|
|
|
@ -14,6 +14,7 @@
|
|||
<body onload="load();">
|
||||
<pre style="width:800; height:800; overflow: scroll;"id="stdout"></pre>
|
||||
<p>Inflight requests: <span id="inFlightCount"></span></p>
|
||||
<div id="content-end"><!-- cleanup() guard --></div>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue