title: To get the active javascript functions of a webpage as soon as we open
body: <p>I want to print the function calls which are made to the web browser from the webpage i.e the active functions of a javascript. But my approach is not correct i guess because with the help of the below code I m getting all the javascript functions.</p>
  
  <pre><code>function tracecalls(par) {
      var f, fname;
      for (fname in window) {
          f = window[fname];
          if (typeof fun === 'function') {
              window[fname] = (function(fname, fun) {
                  var arg = arguments;
                  return function() {
                      return par.apply(this, arg);
                      f.apply(this, arg);
                  }
              })(fname, f);
          }
      }
  }
  tracecalls(function(fname, f) {
      console.log("Function Name : " + fname);
  });
  </code></pre>
  
  <p>After going through some articles I came to know that, we can get the active function i.e the names of the functions which are invoked dynamically with the help of Ecmascript 6 Proxy. As I am completely new to this can anyone guide me on how to proceed with the proxies.. </p>