Skip to content

Commit

Permalink
Merge remote-tracking branch 'refs/remotes/origin/experimentation' in…
Browse files Browse the repository at this point in the history
…to experimentation
  • Loading branch information
buuhuu committed May 23, 2024
2 parents 7ed47de + 89159e8 commit 0c3381b
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions scripts/editor-support.js
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,13 @@ async function applyChanges(event) {
return false;
}

function handleReloadPage(event) {
const a = document.createElement('a');
a.setAttribute('href', event.detail);
event.target.append(a);
a.click();
}

function attachEventListners(main) {
[
'aue:content-patch',
Expand All @@ -100,6 +107,8 @@ function attachEventListners(main) {
const applied = await applyChanges(event);
if (!applied) window.location.reload();
}));

main.addEventListener('extension:reloadPage', handleReloadPage);
}

attachEventListners(document.querySelector('main'));

0 comments on commit 0c3381b

Please sign in to comment.