Tracking when / where a variable is set in Javascript using FireBug

I am currently using FireBug to find out how the hypem provides him with content that allows his flash player to work (in particular, the functionality of the play button). I found that the variable is trackListfilled with data, but I do not know where it is installed.

How can I track when / where this collection is modified? I can add a clock to it, but I don’t know how to trap when it is installed.

FYI I do this because I want to get some of these functions and want to understand how they did it.

+3
source share
2 answers

Unfortunately this is not possible.

Javascript , ​​, .

+1

defineProperty . , window.$, . , debugger; - .

Object.defineProperty(window, "$",
{
  set: function(val) {
    console.log("$ was set to '",val,"' at ",Error().stack);
    this.$internal=val;
  },
  get: function() { return this.$internal; }
});
+2

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


All Articles