{"action":"created","issue":{"url":"https://api.github.com/repos/aspnet/Blazor/issues/689","repository_url":"https://api.github.com/repos/aspnet/Blazor","labels_url":"https://api.github.com/repos/aspnet/Blazor/issues/689/labels{/name}","comments_url":"https://api.github.com/repos/aspnet/Blazor/issues/689/comments","events_url":"https://api.github.com/repos/aspnet/Blazor/issues/689/events","html_url":"https://github.com/aspnet/Blazor/issues/689","id":318173475,"number":689,"title":"[Feature Request] Generate JavaScriptInterop using Roslyn","user":{"login":"grahamehorner","id":3924941,"avatar_url":"https://avatars1.githubusercontent.com/u/3924941?v=4","gravatar_id":"","url":"https://api.github.com/users/grahamehorner","html_url":"https://github.com/grahamehorner","followers_url":"https://api.github.com/users/grahamehorner/followers","following_url":"https://api.github.com/users/grahamehorner/following{/other_user}","gists_url":"https://api.github.com/users/grahamehorner/gists{/gist_id}","starred_url":"https://api.github.com/users/grahamehorner/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/grahamehorner/subscriptions","organizations_url":"https://api.github.com/users/grahamehorner/orgs","repos_url":"https://api.github.com/users/grahamehorner/repos","events_url":"https://api.github.com/users/grahamehorner/events{/privacy}","received_events_url":"https://api.github.com/users/grahamehorner/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2018-04-26T19:51:22Z","updated_at":"2018-04-26T21:42:42Z","closed_at":"2018-04-26T21:00:58Z","author_association":"NONE","body":"IMHO It would be a great if Blazor used Roslyn to dynamically create in memory implementation of JavaScriptInterop based of c# abstract classes, eg.\r\n\r\n`\r\nnamespace someJavascriptNamespace {\r\npublic abstract class someJavaScriptInterop { \r\npublic abstract bool someJavaScriptMethod(string stringParameter, bool boolParameter);\r\n...\r\n}\r\n}\r\n\r\n/// use roslyn to generate and compile the code that calls/invokes the javascript  \r\nTJavaScriptInteropDefinition GenerateImplementation<TJavaScriptInteropDefinition>( );\r\n`\r\n/// calling the generated implementation \r\nvar result = GenerateImplementation<TJavaScriptInteropDefinition>( )\r\n.someJavaScriptMethod(\"\",true);\r\n\r\n\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/aspnet/Blazor/issues/comments/384798203","html_url":"https://github.com/aspnet/Blazor/issues/689#issuecomment-384798203","issue_url":"https://api.github.com/repos/aspnet/Blazor/issues/689","id":384798203,"user":{"login":"grahamehorner","id":3924941,"avatar_url":"https://avatars1.githubusercontent.com/u/3924941?v=4","gravatar_id":"","url":"https://api.github.com/users/grahamehorner","html_url":"https://github.com/grahamehorner","followers_url":"https://api.github.com/users/grahamehorner/followers","following_url":"https://api.github.com/users/grahamehorner/following{/other_user}","gists_url":"https://api.github.com/users/grahamehorner/gists{/gist_id}","starred_url":"https://api.github.com/users/grahamehorner/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/grahamehorner/subscriptions","organizations_url":"https://api.github.com/users/grahamehorner/orgs","repos_url":"https://api.github.com/users/grahamehorner/repos","events_url":"https://api.github.com/users/grahamehorner/events{/privacy}","received_events_url":"https://api.github.com/users/grahamehorner/received_events","type":"User","site_admin":false},"created_at":"2018-04-26T21:42:42Z","updated_at":"2018-04-26T21:42:42Z","author_association":"NONE","body":"@SteveSandersonMS I was thinking this could be done at runtime server side, as this would also allow for dynamic loading of scripts and associated generated Interpol assemblies."}}
{"actor":{"display_login":"grahamehorner"}}