Re: inIDOMUtils is now InspectorUtils

Patrick Brosset <[email protected]> Thu, 11 Jan 2018 08:59:04 +0100
Newsgroups gmane.comp.mozilla.devel.layout
Message-ID <CABcuYMDnptcE9qDeF6VrNBAjLVdqUdQZNSu9O7XAQGY8pL8jWQ@mail.gmail.com>
This is wonderful Cameron!
Thank you for making this part way easier.

On Thu, Jan 11, 2018 at 5:56 AM, Cameron McCormack <[email protected]> wrote:

> Hi,
>
> I just landed bug 1427419 on inbound, which coverts inIDOMUtils from an
> XPCOM interface to a [ChromeOnly] Web IDL interface named InspectorUtils.
> This should make dealing with this utility class simpler.
>
> Before, accessing inIDOMUtils was done using Cc.getService(). Now,
> accessing InspectorUtils is done as follows:
>
> * For plain mochitests, use SpecialPowers.InspectorUtils.  Note that this
> is a SpecialPowers-wrapped object, so objects you get back from calling
> InspectorUtils methods will be wrapped, so be careful when writing tests
> that perform object identity tests.
>
> * In chrome windows, including chrome mochitests, InspectorUtils is
> already available on the window.
>
> * For devtools, use `const InspectorUtils = require("InspectorUtils");`.
>
> * For other non-Window contexts, use Cu.importGlobalProperties(["
> InspectorUtils"]).
>
> Thanks,
>
> Cameron
> _______________________________________________
> dev-developer-tools mailing list
> [email protected]
> https://lists.mozilla.org/listinfo/dev-developer-tools
>