You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
This repo is archived. You can view files and clone it, but cannot push or open issues/pull-requests.
angularjs-batarang/js/services/appWatch.js

23 lines
529 B
JavaScript

// Service for running code in the context of the application being debugged
panelApp.factory('appWatch', function (chromeExtension) {
var _watchCache = {};
// Public API
// ==========
return {
getWatchTree: function (id, callback) {
chromeExtension.eval("function (window, args) {" +
"return window.__ngDebug.getWatchTree(args.id);" +
"}", {id: id}, function (tree) {
if (tree) {
_watchCache[id] = tree;
}
callback(_watchCache[id]);
});
}
};
});