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.
23 lines
529 B
JavaScript
23 lines
529 B
JavaScript
12 years ago
|
// 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]);
|
||
|
});
|
||
|
}
|
||
|
|
||
|
};
|
||
|
});
|