Fix document open & increase debounce time

This commit is contained in:
Gabriel Augendre 2023-03-02 12:43:29 +01:00
parent 274a66b74b
commit 963c0fdf69

View file

@ -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();