Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
function appendDiv(message) {
const div = document.createElement('div')
div.textContent = message
export {appendDiv}
import {appendDiv} from './append-div.js'
function go() {
appendDiv('Hello from async script')
export {go}
<script type="module">
import {appendDiv} from './append-div.js'
appendDiv('Hello from inline script')
<script type="module" src="./script-src.js"></script>
import {appendDiv} from './append-div.js'
appendDiv('Hello from external script')
moduleExports => {
error => {
console.error('there was an error loading the script')
throw error
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.