1

I'm trying to simplify an IE ActiveX project into a single.js file and I'm having some trouble with ActiveX events

The project has them defined as but I would like to move the entire script tag into the js file and allow people to add an EventListener to the event if they need to be notified of it.

<script for="Component" event="TargetEvent(args)" language="javascript">Component_TargetEvent(args)</script>

Trying to bind the the event itself has not worked. I have tried the following items but I still get a "Uncaught SyntaxError: Unexpected token ." and "Uncaught SyntaxError: Unexpected token :" respectively.

function Component.TargetEvent(args){}

function Component::TargetEvent(args){}
user2467731
  • 191
  • 1
  • 3
  • 12

1 Answers1

1

Use

Component.TargetEvent = function(args) {};
4castle
  • 32,613
  • 11
  • 69
  • 106