-
Notifications
You must be signed in to change notification settings - Fork 62
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
Update code for Blazor's new IJSInterop abstraction #1
Comments
The only |
I've extended the FileReaderJsInterop by two functions for mocking the old functionality of JSInterop.
Additionally, the TypeScript-Code should be adapted so that the code from Blazor.registerFunction() is moved to some function residing below window.(namespace). |
Yes, I did something like this yesterday, think its the way to go for this. I'll have to pass all sync methods to async as well, to avoid using the special methods, and implement the js/ts as a class instance. |
Pulled the 0.5-Branch; it's pretty work in progress, so I'll wait in order to prevent merge conflicts. |
I've got it fully working now. Had to change most of the API but in any case I like it better now. There is some weird behaviour when calling back to .NET from js, I was unable to figure out what it was. I didn't manage to call back without more than one parameter (first one was lost, not the second one?). Might be a bug in blazor, might have been me doing something goofy. In any case, current solution is not that bad anyway, might even be better. |
Great! |
:) Well, the intention was a merge, but didnt really end up that way, had some conflict gore when branching out in the middle to save 0.4.0. That'll teach me not to merge late at night |
I suppose, every dev has some bad memories about git and merging... ;-) |
* File folder path drag drop (#1) * . * Add TypeScript MSBuild * Add Check in GetFiles for missing files. Get from dragdrop instead. * Update Demos * Use native input functionality for drag / drop. Add option to switch between using webkitdirectory. Use div / ondrop to drop multiple folders and files. * Move property to non standard properties * Update Demo * Fix/Cleanup * Fix async issue * remove try catches not needed and rethrow others
Blazor.registerFunction() is no longer needed, because the new IJSRuntime.InvokeAsync() invokes the (specified) method on the current window-object.
The text was updated successfully, but these errors were encountered: