Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactored the KoolApp JavaFX browser so its generic and reusable; us…
…ing a <script> tag to bind a page to the application (so multi-page applications are supported) along with using the new kotlin.browser API to access the DOM. Hopefully soon the same kotlin browser applications will work both in JavaFX and compiled to JavaScript; the script tag just changes then based on if you are using JS or Kotlin/JVM
- Loading branch information
Showing
8 changed files
with
122 additions
and
27 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
package org.koolapp.javafx | ||
|
||
import javafx.application.Application | ||
|
||
/** | ||
* A command line application which starts the JavaFX browser and boots up | ||
* the application defined by the first URL parameter. | ||
*/ | ||
fun main(args: Array<String>): Unit { | ||
println("Starting KoolApp browser: http://koolapp.org/ - pleasae keep kool!") | ||
Application.launch(javaClass<WebApplication>(), args.makeString(" ")) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,21 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
<head> | ||
<title>Sample</title> | ||
<title>Sample</title> | ||
|
||
<!-- this is the bootstrap mechanism to initialise our Kotlin application --> | ||
<script type="text/kotlin"> | ||
test.koolapp.myapp.namespace.myApp() | ||
</script> | ||
</head> | ||
<body> | ||
<h1>Sample</h1> | ||
|
||
<p>This example HTML was loaded from a local file!</p> | ||
|
||
<div id="view"/> | ||
|
||
<p>Should have generated stuff above...</p> | ||
|
||
</body> | ||
</html> |