Open iWeaverMan opened 7 years ago
I presume you're talking about OW/TW/OWTS binding to the WebView itself? The main concern I would have with this, is a lot of platforms require the bridge to be accessed on the UI Thread (i.e Android), meaning that any changes to the model will cause a "Stop the World" on the UI thread. This isn't too much of an issue in itself unless the ViewModel is big, for example clearing a dictionary with a lot of records.
Another thing to mention is that by default all calls are asynchronous, meaning that you would have to propagate changes and wait for them with some kind of listener, via both ends.
I will mark is as an enhancement, but its not something which is supported by WebViews by default so I really wouldn't want to rush developing this. Of course I will keep you up to date when I start to make progress on this :)
Overview of changes required for this to work: 1) Ability to run native to JS functions synchronously via a listener mechanism 2) Ability for the WebView to be aware of the current BindingContext and its state 3) Ability for the JS to be able to notify and access objects within its BindingContext
If I am getting the wrong idea please do let me know.
Regards, Ryan
Ability to create objects with methods and properties and to transmit them through js bridge into HTML page context in order to manage C# objects with the page's js-scripts