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

Merge the JS module from WebSharper.Main with the JS type from WebSharper.JavaScript #807

Closed
Tarmil opened this issue Oct 9, 2017 · 3 comments
Assignees

Comments

@Tarmil
Copy link
Member

Tarmil commented Oct 9, 2017

The former is entirely comprised of inlines, I think its place should be in the WIG definition. This would also make it more consistent to use from C#, instead of separate JS and JSModule.

The only non-trivial part of this would be moving AnimationFrameResource, which is not a simple BaseResource and therefore can't be defined in WIG. I guess it would have to be defined in WS.Core.

@Jand42
Copy link
Member

Jand42 commented Mar 21, 2018

Moved this to 4.3 column, we should not introduce binary breaking changes in patch releases.

@Tarmil Tarmil added this to v4.3 in Releases Apr 17, 2018
@Tarmil
Copy link
Member Author

Tarmil commented Apr 23, 2018

A difficulty with this: WIG is unable to define a generic F# value JS.Undefined : 'T.

@Tarmil Tarmil moved this from v4.3 to v4.4 in Releases Jul 4, 2018
@Tarmil Tarmil self-assigned this Jul 5, 2018
@Tarmil
Copy link
Member Author

Tarmil commented Jul 5, 2018

The part of JS that is currently defined in the WebSharper.JavaScript assembly is just functions that are, in js, defined on the window object, plus Inline which is a WebSharper construct. So what we should do is:

  1. Ensure that these functions are defined on the Window proxy.
  2. Define aliases for them in the module WebSharper.JavaScript.JS in the WebSharper.Main assembly.
  3. Remove the class WebSharper.JavaScript.JS from the WebSharper.JavaScript assembly.

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