Move an the OptIn annotation in main.kt and load the script in the head of index.html

This commit is contained in:
Username404-59 2021-06-20 14:39:33 +02:00 committed by Username404
parent f715040e63
commit 639bfd5a36
Signed by: Username404-59
GPG Key ID: 7AB361FBB257A5D1
2 changed files with 2 additions and 2 deletions

View File

@ -1,3 +1,4 @@
@file:OptIn(ExperimentalJsExport::class)
package fr.username404.website package fr.username404.website
import kotlinx.browser.document import kotlinx.browser.document
@ -5,7 +6,6 @@ import kotlinx.browser.window
import kotlinx.html.dom.append import kotlinx.html.dom.append
import kotlinx.html.js.div import kotlinx.html.js.div
@OptIn(ExperimentalJsExport::class)
@JsExport @JsExport
fun makeBody() { fun makeBody() {
document.body!!.append.div { document.body!!.append.div {

View File

@ -34,6 +34,7 @@
height: 300px; height: 300px;
} }
</style> </style>
<script src="./Username404-Website.js"></script>
</head> </head>
<body> <body>
<div class="mainBox"> <div class="mainBox">
@ -47,7 +48,6 @@
Source Source
</a> </a>
</div> </div>
<script src="./Username404-Website.js"></script>
<script> <script>
// TODO Call kotlin code from the html file // TODO Call kotlin code from the html file
</script> </script>