-
-
Notifications
You must be signed in to change notification settings - Fork 53
Expand file tree
/
Copy pathweb.mjs
More file actions
11 lines (9 loc) · 618 Bytes
/
web.mjs
File metadata and controls
11 lines (9 loc) · 618 Bytes
1
2
3
4
5
6
7
8
9
10
11
// This is a placeholder file which shows how you can access functions and data defined in other files.
// It can be loaded into index.html.
// Note that when running locally, in order to open a web page which uses modules, you must serve the directory over HTTP e.g. with https://www.npmjs.com/package/http-server
// You can't open the index.html file using a file:// URL.
import { getGreeting } from "./common.mjs";
import daysData from "./days.json" with { type: "json" };
window.onload = function() {
document.querySelector("body").innerText = `${getGreeting()} - there are ${daysData.length} known days`;
}