Questions tagged [websharper]

The web platform based on an F# to JavaScript compiler.

WebSharper is a web platform based on an F# to JavaScript compiler, comparable to Google Web Toolkit with F# instead of Java. WebSharper is a product of IntelliFactory.

Website: http://websharper.com/

156 questions
3
votes
2 answers

Using D3 with websharper

I have looked at the extensions that websharper provides here. Is it possible to use D3 with websharper? If so are there any examples around?
N00bsie
  • 469
  • 3
  • 19
3
votes
1 answer

WebSharper: opaque type with equality checking for `===`

I need a datatype that will be completely opaque in F# with equality defined in terms of JS ===. WebSharper manual says that I should override Equals but I can't make it work. let x : OpaqueType = X<_> let f (y : OpaqueType) = if x = y then //…
kirelagin
  • 13,248
  • 2
  • 42
  • 57
3
votes
2 answers

Make WebSharper generate simple field access

I need a type that will be translated into a plain JS object so that F# field access will be translated into simple JS field access (this is necessary, since the object will be sent through postMessage, so it'll lose all its methods). Again, I…
kirelagin
  • 13,248
  • 2
  • 42
  • 57
3
votes
1 answer

How can I create a slider using Websharper?

I'm just learning Websharper so I'm still quite confused. On the Intellifactory samples webpage the code for the calculator sample seems to use Button as if Webshaper provides some GUI controls but the code installed on disk uses its own helper…
J D
  • 48,105
  • 13
  • 171
  • 274
3
votes
3 answers

Real-time client-server interactivity using Websharper

I'm just learning Websharper but, in the short term, I have a business problem that I am trying to solve. I've written a server and WPF-based client that allows the user to vary inputs using controls like sliders and obtain feedback from the server…
J D
  • 48,105
  • 13
  • 171
  • 274
3
votes
0 answers

How can I build WebSharper on Mono 3.0 on Mac?

WebSharper looks interesting, and Mono 3.0 is just out with F# 3.0. Apparently xbuild can build some MSBuild projects. Straightforward attempt at building a WebSharper clone on mono fails since FSharpHome is unclear. What's a good way to define…
Alexy
  • 1,520
  • 2
  • 16
  • 30
3
votes
1 answer

Submit with enter key

Is there an idiomatic way for me trigger my formlet's submit action when a keydown event is pressed? Should I drop back down to DOM manipulation, or is there some Enhancement that I can use?
Khanzor
  • 4,830
  • 3
  • 25
  • 41
2
votes
1 answer

F# : Synchronous operations are disallowed. Call ReadAsync or set AllowSynchronousIO to true instead

While executing the POST or PUSH requests in Postman for the following repository (https://github.com/websharper-samples/PeopleAPI), I am getting this error : System.InvalidOperationException: Synchronous operations are disallowed. Call ReadAsync or…
2
votes
1 answer

Using WebSharper to render SVGs server-side

I'm trying to generate SVGs server-side, passing them in to a client using WebSharper's RPC mechanism. I'm basing this off the websharper-web template, using dotnet core. For the sake of thoroughness, I render the template like so: // Site.fs …
Gastove
  • 896
  • 2
  • 10
  • 21
2
votes
1 answer

How to use results of FSharp.Compiler.Services

I'm trying to build a system that is similar to FsBolero (TryWebassembly), Fable Repl and many more that uses Fsharp.Compiler.Services. So I expect it is feasible to achieve my goals but I encountered a problem that I hope is only a result of my…
2
votes
0 answers

com.ibm.ws.webcontainer.servlet.ServletWrapper service SRVE0014E: Uncaught service() exception root cause

I am using RAD and i am facing one problems while i am trying to run application on websphere 9.0v. I'm not able to understand this issue. errors: [1/1/19 5:56:05:918 UTC] 00000083 ServletWrappe E com.ibm.ws.webcontainer.servlet.ServletWrapper…
Dayananda CD
  • 21
  • 1
  • 2
2
votes
0 answers

Cannot build basic websharper app on dotnet core and ubuntu

I'm playing with websharper with the basic project template (websharper-web) on dotnet core 2.2 on ubuntu 16.04. I've just used the basic template to create the project: dotnet new websharper-web -lang F# When I try and build I'm getting a generic…
onemorecupofcoffee
  • 2,237
  • 1
  • 15
  • 21
2
votes
2 answers

How to use Database by opening File to send and receive data from Server to Client?

I want to receive data (simply as a string) from the client-web side to update the database, but it's a bit lock for me now, so first write the data to a file in the drive with using System.IO.File.WriteAllText(@"my-file.txt") I got that error…
2
votes
1 answer

Trying to embed a PowerBI report in a WebSharper Client Server F# application

I started from the downloaded PowerBIEmbedded_AppOwnsData C# razor demo, which works as expected. Then I tried to do the same starting with a WebSharper project, but didn't have success so far. The problem occurs when I try to istantiate a…
2
votes
1 answer

Slowing performance in Websharper application, possible memory leak

The sample code below in a single page Websharper application exhibits the issue encountered in my project. Over time, there is some action that progressively takes longer. It occurs every few seconds. After an extended period, 20 mins or more,…
cadull
  • 439
  • 4
  • 7