How does Ember Inspector get data from the application?

I am exploring the creation of a Chrome extension that can be used with the Ember Inspector and provide information about the application, settings for my own use cases.

I tried different ways to access the application instance, but with our assembly it does not appear globally, and I'm not going to do it. However, the Ember Inspector can still see the application, controllers, routes, etc., and I wonder how it does it. I studied the inspector's source code, but I was not lucky to find what I was looking for. Can anyone understand how this works? I am using Ember 1.13.

+5
source share
1 answer

After further research, I found a solution: there is an array of Ember.Namespace.NAMESPACES , after checking which element is an instance of Ember.Application , we can use it to access the application instance.

0
source

Source: https://habr.com/ru/post/1262708/


All Articles