Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Adding a custom Object to JS

6 views
Skip to first unread message

Mohan

unread,
Aug 27, 2009, 5:41:36 PM8/27/09
to
Hi All,

I'm trying to add a custom built-in object to JS. I have added the
necessary class, objectops and objectmap entries and also modified
jsproto.tbl and jsapi.cpp (standard_class_atoms and
JS_InitStandardClasses). Everything compiles well but when I run -

var a = new MyObject();

the script fails. Have I missed out a step?

Also, what changes should I make to convert MyObject* to JSObject* ?
Will a simple cast suffice?

I would be grateful if someone can give me pointers to how to get over
this problem.

Regards,
mohan

0 new messages