Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Server-side event can cause JS runtime error #155

Closed
Jand42 opened this issue Feb 13, 2018 · 1 comment
Closed

Server-side event can cause JS runtime error #155

Jand42 opened this issue Feb 13, 2018 · 1 comment

Comments

@Jand42
Copy link
Member

Jand42 commented Feb 13, 2018

Events in server-side templating translate to a call to WebSharper.UI.Templating.Runtime.Server.Handler.EventQ2$120$42 but the script link to WebSharper.UI.Templating.Runtime.js might be missing because Sitelet runtime is not adding it.

For example:

Add a <button ws-onclick="Click">Click me</button> to a client-server template and use it at template instantiation as .Click(fun _ -> JavaScript.JS.Alert "Clicked!")

@Jand42 Jand42 added the bug label Feb 13, 2018
@Tarmil
Copy link
Member

Tarmil commented Feb 20, 2018

Actually, as I just tested this, it's not WebSharper.UI.Templating.Runtime.js that's missing, but the current project's js. EventQ2$120$42 is there, but the function called as argument to it is not.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants