core
core copied to clipboard
WebSharper - Full-stack, functional, reactive web apps and microservices in F# and C#
`DomElement.ReplaceChildren` can't be used easily with empty params because of overload resolution:  This is defined in WIG as such: `"replaceChildren" => !+(T + Node) ^-> T`. This is a...
For instance, `XMLHttpRequest.Onreadystatechange` should be correctly capitalized as `OnReadyStateChange`. https://github.com/dotnet-websharper/core/blob/bdb53e91665cd66d462851eaa85c47e962969db4/src/stdlib/WebSharper.JavaScript/Html5.fs#L2266 Be sure to keep the old variants as obsolete, with a message to update calls to the new one.
I am throwing an exception with `failwithf "...."` and catch it as: ```fsharp try ... with | exn -> printfn "%A" exn ``` ... and find that the error message...
Given the following F# code: ```fsharp [] type Position = { pos_fname: string pos_lnum: int pos_orig_lnum: int pos_bol: int pos_cnum: int } member pos.FileName = pos.pos_fname member pos.Line = pos.pos_lnum...
A debug-oriented middleware to use readable WebSharper outputs through vite: ```fsharp .Use(fun context (next: RequestDelegate) -> if context.Request.Path.StartsWithSegments("/Scripts") || context.Request.Path.StartsWithSegments("/@vite") then let proxyRequest = context.Request.Path.Value context.Response.Redirect($"http://localhost:5173{proxyRequest}") Task.CompletedTask else next.Invoke(context) )...
Last piece needed for working with Sitelets using module-based JS. For local debug mode, for readability and quick iteration, it would be best if one-file-per-class readable .js files are used....
For example if a method of a `HashSet` is used through the `ISet` interface only, do not allow DCE to drop the method implementation.
I installed [dotnet preview 9](https://dotnet.microsoft.com/en-us/download/dotnet/9.0) and with `DOTNET_ROLL_FORWARD_TO_PRERELEASE=1` I'm getting this error during build. ``` Using "WebSharperTask" task from assembly "C:\Users\jimmy\.nuget\packages\websharper.fsharp\6.1.7.441-net8\build\/../tools/netstandard2.0/WebSharper.MSBuild.FSharp.dll". Task "WebSharperTask" C:\Users\jimmy\.nuget\packages\websharper.fsharp\6.1.7.441-net8\build\/../tools/net8.0/win-x64/wsfsc.exe "@C:\Users\jimmy\AppData\Local\Temp\tmpsyctnf.tmp" Unhandled exception. System.PlatformNotSupportedException: BinaryFormatter serialization...
The projects are not changed (targeting .net version/websharper lib references...) but not able to build after .net 9 preview installed. In event viewer, application log: ``` Application: wsfsc.exe CoreCLR Version:...