mydeate/index.html
Lentil Hoffman 7a9fb5ac0c
Refactor to classes
This pattern is a natural fit for the js module system in the browser.
This gets rid of globals. Instead, index.js creates an instance of Main,
which then instantiates each of the specialized classes.

We should probably do class inheritance for the setMain pattern. On the other hand it's currently only 3 lines of code, so we'd only be saving 1 LOC per class, while creating a new class, and it wouldn't really be simpler. If our classes take on more features, we can further refactor.
2026-07-01 14:15:43 -05:00

21 lines
547 B
HTML

<!DOCTYPE html>
<html lang="en">
<head>
<title>Mydeate</title>
<meta name="viewport" content="width=device-width">
<link rel="stylesheet" href="./style.css">
</head>
<body>
<div id="mydeate-main" class="main-div"></div>
</body>
</html>
<!-- <script src="./js/util.js"></script>
<script src="./js/element.js"></script>
<script src="./js/elements.js"></script>
<script src="./js/pointer.js"></script>
<script src="./js/canvas.js"></script>
<script src="./js/main.js"></script> -->
<script defer type="module" src="./js/index.js"></script>