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
|
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 {
|
||||||
|
|
|
@ -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>
|
||||||
|
|
Loading…
Reference in New Issue