A complete example of how to create a C# COM object for use in JavaScript / HTML, including event handling ...