function spyEnabled(state, reason) {
      enabled = state === true;

      phantomas.log(
        "Spying " +
          (enabled ? "enabled" : "disabled") +
          (reason ? " - " + reason : "")
      );
    }
Proxy function to be used to track calls to native DOM functions

Callback is provided with arguments original function was called with

Example:

  window.__phantomas.proxy(window.document, 'getElementById', function() {
    // ...
  });