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

Re-add WS4.0 logic of ClientSide as a fallback #881

Closed
Jand42 opened this issue Jan 8, 2018 · 1 comment
Closed

Re-add WS4.0 logic of ClientSide as a fallback #881

Jand42 opened this issue Jan 8, 2018 · 1 comment

Comments

@Jand42
Copy link
Member

Jand42 commented Jan 8, 2018

With the changes on #853, the client function in back-compatibility package WebSharper.UI.Next is broken unless the old logic for looking up a single call to a static method from a quotation is restored as a fallback if no pre-compiled form of the quotation exists.

Also, uses of ClientSide always create a new generated JavaScript function for the expression (on current master), even if it is a single call to a static method which was the only form allowed in 4.0. By excluding these from pre-compilation with a simple pattern match, the fallback would work for them as before, resulting in no extra code that is just doing redirection.

@Jand42
Copy link
Member Author

Jand42 commented Jan 8, 2018

There is an unnecessary error thrown when a JavaScript argument is not quotation literal. Now the fallback can handle dynamic quotations again, if they are containing a call to a single static method. Also, in UI we need to pass along a quotation value in the client alias for Doc.ClientSide.

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

1 participant