-
Notifications
You must be signed in to change notification settings - Fork 150
Expose starting and finished load events in WebView #303
base: main
Are you sure you want to change the base?
Conversation
Hi @pietrodicaprio thank you for the PR! I think that adding support for these events would be great! There's a pattern for mapping from Blazor events to Mobile Blazor Bindings / Xamarin.Forms events for registration and also making sure they can get un-registered. You can see an example of this with the Button's Clicked event:
I think that to fully support the events we should try to follow this pattern. Would you be able to update the PR with this pattern? |
Hi @Eilon , I saw it but did not completely understood how it is working. I'll give it a try today and eventually push here. |
Interesting thing: after closing, reopening, closing, leaving the project away for a couple of hours, opening again, binding a function that has only Now the question is: why my VS / Intellisense can't get the updated metadata in order to provide the proper suggestion? |
It looks like you're using a VS extension for Intellisense or another IDE? Is that ReSharper or something else? You could try disabling that and see what the built-in Intellisense shows up. Maybe that's the issue? |
BTW sometimes closing & re-opening is the only fix anyway because of how things get cached. Or even doing |
I confirm that I have ReSharper. Solved by deleting the .vs folders and executing the git command you provided, thank you for the suggestion! I confirm that the code works and Intellisense is updated. 🎉 There is only one thing I don't understand: why Said that, if the code matches your expectation I have nothing to add right now. |
Exposing
OnNavigationStarting
andOnNavigationFinished
in razor in order to execute actions on top of the base events.Disclaimer:
the method I used is probably not the best one. Is the first time I code on such kind of project and I'm not sure about how all the stuff is working in behind scenes.
This PR is not intended to be a final approach but mostly a rise of hand about a need I have on this framework.
Is then the method is acceptable, well, I'm happier :)
P.S.
I didn't create a branch on the latest commit because I can't update my Android project dependencies for it :(