Move an the OptIn annotation in main.kt and load the script in the head of index.html
This commit is contained in:
parent
f715040e63
commit
639bfd5a36
|
@ -1,3 +1,4 @@
|
|||
@file:OptIn(ExperimentalJsExport::class)
|
||||
package fr.username404.website
|
||||
|
||||
import kotlinx.browser.document
|
||||
|
@ -5,7 +6,6 @@ import kotlinx.browser.window
|
|||
import kotlinx.html.dom.append
|
||||
import kotlinx.html.js.div
|
||||
|
||||
@OptIn(ExperimentalJsExport::class)
|
||||
@JsExport
|
||||
fun makeBody() {
|
||||
document.body!!.append.div {
|
||||
|
|
|
@ -34,6 +34,7 @@
|
|||
height: 300px;
|
||||
}
|
||||
</style>
|
||||
<script src="./Username404-Website.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<div class="mainBox">
|
||||
|
@ -47,7 +48,6 @@
|
|||
Source
|
||||
</a>
|
||||
</div>
|
||||
<script src="./Username404-Website.js"></script>
|
||||
<script>
|
||||
// TODO Call kotlin code from the html file
|
||||
</script>
|
||||
|
|
Loading…
Reference in New Issue