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();
|
||||
})
|
||||
.then((value) => {
|
||||
preview.document.open("text/html", "replace");
|
||||
preview.document.open();
|
||||
preview.document.write(value);
|
||||
preview.document.close();
|
||||
preview.scrollTo(scrollX, scrollY);
|
||||
|
@ -91,7 +91,7 @@ function prepareBody() {
|
|||
}
|
||||
|
||||
function setupLivePreview() {
|
||||
const debouncedLoadPreview = debounce(loadPreview, 200);
|
||||
const debouncedLoadPreview = debounce(loadPreview, 500);
|
||||
|
||||
function listener(event) {
|
||||
event.preventDefault();
|
||||
|
|
Reference in a new issue