WebSharper 6.1
This is a major release of WebSharper 6. NuGet version 6.1.0.249
.
Templates for .NET Core SDK: dotnet new -i WebSharper.Templates::6.1.0.249
This release adds support for FSharp.Core 7.0
, while being compatible with referencing any FSharp.Core 6.0+
.
Templates are still using .NET 6 (LTS) by default.
The compiler needs a .NET 6 runtime, but supports targeting .NET 7. If you update an F# WebSharper project to net7.0
, you will also need to set <ProduceReferenceAssembly>false</ProduceReferenceAssembly>
on your project.
Enhancements
- #1289 Support for new FSharp.Core 7.0 functions in
Result
andMap
modules. - #1298 for Proxy projects,
"UseJavaScriptSymbol": true
is the default, so you can use#if JAVASCRIPT
in original code to separate WebSharper proxy related code. - #1281 Added missing shadow DOM related bindings to WebSharper.JavaScript.
- #1275 WIG (WebSharper.InterfaceGenerator) allows using
WithWarning
on constructors and properties. - #1276 Added Media Capture and Streams API bindings to WebSharper.JavaScript.
- #1277 Added Geometry API bindings to WebSharper.JavaScript.
- #1270 Updates for File API bindings in WebSharper.JavaScript.
- #1274 Updated Canvas API bindings in WebSharper.JavaScript.
Fixes
- #1285 Fix typo in
MutationRecord.Type
binding. - #1283 F# generic arithmethics now use custom
get_Zero
member if defined for a custom numeric type. - #1284 F#
Seq.sum
/sumBy
/average
/averageBy
functions (andList
/Array
equivalents) are working as in .NET for custom numeric types, using theirget_Zero
,op_Addition
and for averaging,DivideByInt
members, same as in .NET F#.
Breaking changes
- #1274 Canvas API bindings have some renames on enumeration types:
TextDirection
,LineJoin
,TextAlign
,TextBaseLine
has been renamed toCanvasTextDirection
,CanvasLineJoin
,CanvasTextAlign
,CanvasTextBaseLine
. - #1284 Any function using
sum
/sumBy
/average
/averageBy
must use it with resolved generics or be marked with[<Inline>]
so that WebSharper compiler can resolve these functions specific to the type used.