Skip to content

Commit

Permalink
Remove print iframe from DOM once job is complete
Browse files Browse the repository at this point in the history
  • Loading branch information
crabbly committed Oct 7, 2020
1 parent a3c5c3e commit 72d3b78
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/js/functions.js
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,13 @@ export function cleanUp (params) {
window.removeEventListener(event, handler)

params.onPrintDialogClose()

// Remove iframe from the DOM
const iframe = document.getElementById(params.frameId)

if (iframe) {
iframe.remove()
}
}

window.addEventListener(event, handler)
Expand Down

0 comments on commit 72d3b78

Please sign in to comment.