-
-
Notifications
You must be signed in to change notification settings - Fork 107
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
Add IJSObjectReference support / JS Module support #288
Conversation
Hey @KristofferStrube, this is my initial draft. There are still tests missing, and at least some clean up of the code needed. But let me know what you think about the API. This is probably most easily done through |
Codecov Report
@@ Coverage Diff @@
## dev #288 +/- ##
==========================================
+ Coverage 82.64% 82.77% +0.13%
==========================================
Files 118 126 +8
Lines 3612 3710 +98
Branches 468 481 +13
==========================================
+ Hits 2985 3071 +86
- Misses 480 491 +11
- Partials 147 148 +1
Continue to review full report at Codecov.
|
I've looked through the tests and it looks good. I tried to modify one of the tests to test a custom import without any parameters. Then we have to write the following: JSInterop.SetupModule("customImport", Array.Empty<object>());
var module = await JSInterop.JSRuntime.InvokeAsync<IJSObjectReference>("customImport"); to specify that this is a custom import function with no arguments. I'm not sure if that is intuitive but it would of course cause an overload of the Overall looking good. 👍 |
That was indeed my point about making the args array required. I did consider having a If folks need that in their lives, they can easily add it though, it's just an extension methods. |
…tReference, IJSUnmarshalledObjectReference
Pull request description
PR meta checklist
DEV
branch.Content checklist