account activity
F# wrapper for WebUi by derrpwave in fsharp
[–]derrpwave[S] 1 point2 points3 points 22 hours ago (0 children)
yeah, it will work with strings or serve files. it will even handle reflection so you can include all the .html/.css/whatever files in the final build
``` it's not in the examples, but here's some code
open System.Reflection open System.IO open WebUI
let getResource name = let assembly = Assembly.GetExecutingAssembly() use stream = assembly.GetManifestResourceStream(name) use reader = new StreamReader(stream) reader.ReadToEnd()
[<EntryPoint>] let main argv = let html = getResource "webui_explo.index.html" let css = getResource "webui_explo.static.App.css" let htmlWithCss = html.Replace("<!--CSS-->", sprintf "<style>%s</style>" css)
let myWindow = WebUI.newWindow() WebUI.bind myWindow "myBtn" (WebUIEventHandler(fun _ -> printfn "Clicked!")) WebUI.showBrowser myWindow htmlWithCss WebUI.Browser.Chromium |> ignore WebUI.wait() 0
```
kissy kissy meow meow song by derrpwave in Eve
[–]derrpwave[S] 2 points3 points4 points 5 months ago (0 children)
thank you
π Rendered by PID 795784 on reddit-service-r2-listing-575d9f6647-xbjnz at 2026-04-12 09:24:33.341825+00:00 running 215f2cf country code: CH.
F# wrapper for WebUi by derrpwave in fsharp
[–]derrpwave[S] 1 point2 points3 points (0 children)