complete request document.

This commit is contained in:
2023-03-31 08:32:04 +08:00
parent 45ae222d25
commit 877e9e7208
2 changed files with 77 additions and 1 deletions

View File

@ -19,7 +19,9 @@ function navigate(page) {
const range = document.createRange();
range.selectNode(document.body);
const doc = range.createContextualFragment(html);
document.querySelector('#container').replaceChildren(doc);
const container = document.querySelector('#container');
container.replaceChildren(doc);
container.scrollTop = 0;
});
}