Ci, Cc does not work any longer

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Ci, Cc does not work any longer

opto
are there any changes in TB 60?

This now throws an exception if used. I think it did not before:

const {classes: Cc, interfaces: Ci, utils: Cu, results : Cr} = Components;

example:


            let accountManager = Cc["@mozilla.org/messenger/account-manager;1"]
                               .getService(Ci.nsIMsgAccountManager);
 

throws an exception.

---------------------------

            let accountManager = Components.classes["@mozilla.org/messenger/account-manager;1"]                               .getService(Components.interfaces.nsIMsgAccountManager);


does not.


_______________________________________________
dev-apps-thunderbird mailing list
[hidden email]
https://lists.mozilla.org/listinfo/dev-apps-thunderbird
Reply | Threaded
Open this post in threaded view
|

Re: Ci, Cc does not work any longer

Onno Ekker-2
Cc, Ci, Cu, and Cr are now defined by default in chrome, although you
should be able to redefine them, if I understand the bug correctly:

https://bugzil.la/767640
Define Ci, Cr, Cc, and Cu whenever Components is defined for a chrome scope

Op 16-12-2018 om 21:35 schreef opto:

> are there any changes in TB 60?
>
> This now throws an exception if used. I think it did not before:
>
> const {classes: Cc, interfaces: Ci, utils: Cu, results : Cr} = Components;
>
> example:
>
>
>             let accountManager = Cc["@mozilla.org/messenger/account-manager;1"]
>                                .getService(Ci.nsIMsgAccountManager);
>  
>
> throws an exception.
>
> ---------------------------
>
>             let accountManager = Components.classes["@mozilla.org/messenger/account-manager;1"]                               .getService(Components.interfaces.nsIMsgAccountManager);
>
>
> does not.
>
>

_______________________________________________
dev-apps-thunderbird mailing list
[hidden email]
https://lists.mozilla.org/listinfo/dev-apps-thunderbird