complete request document.
This commit is contained in:
4
main.js
4
main.js
@ -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;
|
||||
});
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user