Is there any way to register an event listener with function in second parameter? For example, like this:
class MyClass { constructor() { this.onSelectionChange = this.onSelectionChange.bind(this); this.subscribe(); } subscribe() { window.external.RegisterEventListener( 'SelectionChange', this.onSelectionChange ); } onSelectionChange() { alert('onSelectionChange'); }}new MyClass();
class MyClass {
Or string is the only way?