Today I have extended the ExposedFunctions example. In our scenario we have written a javascript library in c# with jsc and we would like to consume some of its exposed functionality. We are going to edit our html file with Visual Studio inside the WebApplication1 subproject.
In the previous version the API consumer was only able to set text and index fields.
This time around the consumer is able to optionally specify mouse handlers and invoke GetString function on demand in javascript.
In this html file I have added two new buttons to consume the exposed API. The Example2 button will react on mouseover and mouseout events. Clicking on the data will invoke the onclick handler in which we will invoke the C# code to provide us some text to be displayed.
Tagged: javascript
