I want to call a class or a function implemented into my embedder's
code from javascript init a page loaded by this embedder.
(Am I clear ?)
I look at SpiderMonkey module, and try to use the JS_functions.
I first try with the Customer and JSCustomer spiderMonkey's sample
classes.
I put the source code into mfcembed gecko's sample, and build my
embedder.
I put javascript code into a page and loads the page through the
embedded mozilla.
*************************************
Page qui lance un test
<script>
alert('test');
var c = new Customer();
c.name = "Franky";
c.age = 32;
c.computeReduction();
alert(c.getName());
</script>
********************************
Nothing appends.
Looking at the SpiderMonkey's javascript C embedder's guide. I
understand that I have to do 3 things before to use my class in
javascript
- 1 Loading the JS engine into the embedder (JS_NewRunTime)
- 2 create a new context into the embedder (JS_NewContext)
- 3 Declare my class JSCustomer using JS_InitClass
Am I right, or did I understand nothing at all...
Did someone of you do what I want to do, and do you have some sample
thank's for your responses
philippe
_______________________________________________
dev-embedding mailing list
[email protected]
https://lists.mozilla.org/listinfo/dev-embedding