This would be nice. It might even be sorta doable on the codegen side. Problem: Some of the __init methods use __DOM_OBJECT__. That's clearly not possible in a constructor... If we can solve this problem, then we can hack generateNSGetFactory to expose the relevant functions on the factory object by contractid. Then we getClassObjectByContractID(), QI to XPCWrappedJS, extract the JSObject, GetProperty to get the correct function. Then we have to invoke it, ideally with JS_New; this might need some hackery to the callback infrastructure and maybe a JSAPI change to give us a JS_New signature matching JS_CallFunctionValue. Or something. But first we need to sort out the __DOM_OBJECT__ thing.
> But first we need to sort out the __DOM_OBJECT__ thing. I _meant_ __DOM_IMPL__.
You need to log in before you can comment on or make changes to this bug.