I have build a few Haxe projects for internal use and am still learning. I did try find if this question has been raised before so apologies if it is duplicate but I could not find it.
I have started a Game tool editing project and I could switch from HTML to other compilations but really HTML would be really great if I can get it all done there.
The project is Kha-HTML5 using haxeui.
I am trying to add my own support for window.showOpenFilePicker but would like to know if that support has been considered in any future versions.
Javascript function to open a file. This must be imported in your base html. <script src="of.js"></script>
Of.hx
package of;
import js.html.File;
import haxe.Constraints.Function;
@:native("of")
extern class Of {
static function showOpenFilePicker(description:String,mimeType:String,extensions:Array<String>,excludeAcceptAllOption:Bool,oopenFunction:Function):File;
}
Haxe class to represent the javascript file.
Usage
To use this you need to be responding to a user event. This is a security requirement from the browser.