{"action":"closed","issue":{"url":"https://api.github.com/repos/intellifactory/websharper.ui.next/issues/66","labels_url":"https://api.github.com/repos/intellifactory/websharper.ui.next/issues/66/labels{/name}","comments_url":"https://api.github.com/repos/intellifactory/websharper.ui.next/issues/66/comments","events_url":"https://api.github.com/repos/intellifactory/websharper.ui.next/issues/66/events","html_url":"https://github.com/intellifactory/websharper.ui.next/issues/66","id":122975546,"number":66,"title":"Calling client function from server in on.* raises exception","user":{"login":"qwe2","id":1850930,"avatar_url":"https://avatars.githubusercontent.com/u/1850930?v=3","gravatar_id":"","url":"https://api.github.com/users/qwe2","html_url":"https://github.com/qwe2","followers_url":"https://api.github.com/users/qwe2/followers","following_url":"https://api.github.com/users/qwe2/following{/other_user}","gists_url":"https://api.github.com/users/qwe2/gists{/gist_id}","starred_url":"https://api.github.com/users/qwe2/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/qwe2/subscriptions","organizations_url":"https://api.github.com/users/qwe2/orgs","repos_url":"https://api.github.com/users/qwe2/repos","events_url":"https://api.github.com/users/qwe2/events{/privacy}","received_events_url":"https://api.github.com/users/qwe2/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-12-18T16:07:41Z","updated_at":"2015-12-18T16:08:36Z","closed_at":"2015-12-18T16:08:36Z","body":"Calling any of the `on.*` methods with a quotation from the server-side causes the following exception:\r\n\r\n```\r\nSystem.TypeInitializationException: \r\nThe type initializer for '.$Attr' threw an exception. ---> WebSharper.JavaScript.ClientSideOnly: This function is intended for client-side use only. \r\nat WebSharper.UI.Next.Client.Attr.OnAfterRender(FSharpFunc`2 callback) \r\nat .$Attr..cctor() --- End of inner exception stack trace --- \r\nat .$Attr.mk@109(FSharpList`1 acc, Address a) \r\nat .$Attr.func@103.Invoke(Info meta) \r\nat WebSharper.UI.Next.Attr.Write(Info meta, HtmlTextWriter w, Boolean removeDataHole) \r\nat .$Doc.Write@131-2.Invoke(Attr a) \r\nat Microsoft.FSharp.Primitives.Basics.List.iter[T](FSharpFunc`2 f, FSharpList`1 x) \r\nat WebSharper.UI.Next.Elt.Write(Info meta, HtmlTextWriter w, FSharpOption`1 res) \r\nat WebSharper.Sitelets.Content.renderBody@164.Invoke(HtmlTextWriter tw) \r\nat .$Page.get_Default@43.Invoke(FSharpOption`1 doctype, FSharpOption`1 title, FSharpFunc`2 writeHead, FSharpFunc`2 writeBody, HtmlTextWriter writer) \r\nat WebSharper.Sitelets.Content.writeBody@157.Invoke(Stream stream) \r\nat WebSharper.Owin.Internal.W2O.WriteResponse@164.Invoke(Task`1 obj)\r\n```\r\n\r\nThis is caused by `Attr.ValidateForm`, which contains client-side functionality, being a top-level binding instead of a function so it gets called when the module is referenced."}}