I’d like to receive callbacks from Javascript code to my Silverlight host without using ScriptableAttribute. I’ve seen it done before, but I couldn’t work out how they did it. Has anyone got any ideas? Thanks
I’d like to receive callbacks from Javascript code to my Silverlight host without using
Share
Simple enough use:-
In the javascript in the page hosting the silverlight have:-
Edit: Ken is right the above is the wrong way round.
Lets say you have this function in Silverlight:-
You can now make this function available to javascript like this:-
Now code in javascript can simply do something like this:-