Created
March 4, 2020 23:22
-
-
Save thawkin3/90a9b6890b9c09b55fd425e94e7f6ff3 to your computer and use it in GitHub Desktop.
Using an import to initially load some JS
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { exportPdf } from './pdf-download.js' | |
const exportPdfButton = document.querySelector('.exportPdfButton') | |
exportPdfButton.addEventListener('click', exportPdf) | |
// this code is short, but the 'pdf-download.js' module is loaded on page load rather than when the button is clicked |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment