0
comment
comment
on 7/31/2018 3:59 AM
This is a minor release for WebSharper and WebSharper.UI.
Install templates for .NET Core SDK: dotnet new -i WebSharper.Templates::4.4.1.261
Download templates for Visual Studio 2017: http://websharper.com/installers/WebSharper.4.4.1.261.vsix
WebSharper
Features
- #988 Add proxy for the JavaScript
fetchAPI. - #988 Add
Router.Fetchas a fetch-based equivalent toRouter.Ajax.`fsharp type EndPoint = | [<EndPoint "GET /article-data">] GetArticleData of id: int type ArticleData = { id: int; (* ... *) } let router = Router.Infer<EndPoint>() promise { // Fetch /article-data/12... let! resp = Router.Fetch router (GetArticleData 12) // ... get its body as JSON... let! respJson = resp.Json() // ... and decode it as an instance of ArticleData. let article = Json.Decode<ArticleData> respJson Console.Log(article) }`
Fixes
- #985 Fix reading C# tuple type signatures, this also fixes remoting with tuples in C#.
- #989 RPC signature verification works as intended: compiler attempts to create JSON de/serializers, if there is any unsupported types found, a compile-time error is given.
- #990 The
runngen.ps1scripts in thetoolsfolder in bothWebSharper.FSharpandWebSharper.CSharppackages now correctly installs the compiler tools in thenet461folder. Run this script in administrator mode to speed up WebSharper compilation. - #991 Fix regression in overriding implementation methods, there is no more incorrect
Instance member name conflicterrors. - #993 Fix scoping of "this" in function conversions. This notably fixes C# event handlers in WebSharper.UI.
- #994 Fix control flow for C# try/catch in asynchronous methods.
- #996 Don't use
jQuery.on('ready', ...)for the web control activator. This removes the dependency on jQuery for many sitelets. - #997 Add proxy for
Printf.kprintf. - #998 Don't serialize System.UI.Web.Control's private fields. Since the Serializable attribute requirement was dropped in 4.4.0, web controls would output a number of null fields in the
<meta>tag; this is now fixed.
WebSharper UI
Fixes
- #181
Elt.WithAttrsis no longer public, it was intended to be internal. - #181
Elt.RemoveClassremoves unneeded spaces fromclassattribute value. - #182
jQueryis now not used internally forElt.AddClass/RemoveClassandRouter.Install/InstallInto. - #184 In sitelets using a template with
ClientLoad.FromDocument, when outputting aws-replacetag, make the tag name depend on the parent tag (eg. if the parent is<tbody>, output<tr>) instead of always<div>, so that the HTML is parsed correctly.
Happy coding!






