[scriptable, uuid(5678d4a3-2543-4ece-afbb-079292f2866e)] interface calIServer : nsISupports { attribute AString host; attribute PRUint32 port; attribute AUTF8String status; } [scriptable, uuid(d1d2e05d-5472-482e-b0a4-a9e43925d530)] interface nsIFoo : nsISupports { readonly attribute calIServer server; void loadServerData(); }; var foo = Cc[...].getService(Ci.nsIFoo); foo.server.port = 80;