Javascript and ActiveX
-
Hello everybody, Right now I'm creating an opengl activex control that allows JavaScript to communicate with the control. For example: ********************************************* function begin() { var object = document.SGLworld; object.StartRender(); } function stop() { var object = document.SGLworld; object.StopRender(); } ********************************************* I plan on having the ability to pass class or struct objects back to a JavaScript variable like this: ********************************************* function returnclass() { var box; var object = document.SGLworld; box = object.CreateBox(1.0, 1.0, 1.0); // return the createbox structure to the javascript variable(box) box.SetColor(1.0, 0.0, 0.0); // now the varible(box) should have access to the structers members functions } ********************************************* But the problem is I have no clue how to pass struct(or class) objects back to a js variable! So if anybody has an idea or can redirect to some information I’d be very grateful!!! :) Thanks, Caleb
-
Hello everybody, Right now I'm creating an opengl activex control that allows JavaScript to communicate with the control. For example: ********************************************* function begin() { var object = document.SGLworld; object.StartRender(); } function stop() { var object = document.SGLworld; object.StopRender(); } ********************************************* I plan on having the ability to pass class or struct objects back to a JavaScript variable like this: ********************************************* function returnclass() { var box; var object = document.SGLworld; box = object.CreateBox(1.0, 1.0, 1.0); // return the createbox structure to the javascript variable(box) box.SetColor(1.0, 0.0, 0.0); // now the varible(box) should have access to the structers members functions } ********************************************* But the problem is I have no clue how to pass struct(or class) objects back to a js variable! So if anybody has an idea or can redirect to some information I’d be very grateful!!! :) Thanks, Caleb
Have you tried SpiderMonkey? It's the javascript engine of the Mozilla project.
-
Have you tried SpiderMonkey? It's the javascript engine of the Mozilla project.
Thanks