Fix document open & increase debounce time
This commit is contained in:
parent
274a66b74b
commit
963c0fdf69
1 changed files with 2 additions and 2 deletions
|
@ -41,7 +41,7 @@ function loadPreview() {
|
||||||
return response.text();
|
return response.text();
|
||||||
})
|
})
|
||||||
.then((value) => {
|
.then((value) => {
|
||||||
preview.document.open("text/html", "replace");
|
preview.document.open();
|
||||||
preview.document.write(value);
|
preview.document.write(value);
|
||||||
preview.document.close();
|
preview.document.close();
|
||||||
preview.scrollTo(scrollX, scrollY);
|
preview.scrollTo(scrollX, scrollY);
|
||||||
|
@ -91,7 +91,7 @@ function prepareBody() {
|
||||||
}
|
}
|
||||||
|
|
||||||
function setupLivePreview() {
|
function setupLivePreview() {
|
||||||
const debouncedLoadPreview = debounce(loadPreview, 200);
|
const debouncedLoadPreview = debounce(loadPreview, 500);
|
||||||
|
|
||||||
function listener(event) {
|
function listener(event) {
|
||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
|
|
Reference in a new issue