I just started a project that I'm calling Diff.js. It has several functions, for detecting differences. One of the functions is detectNew(original_state, current_state);
It detects properties in the current_state, that are not in the original_state. What I want to do is detect new properties in the window object, but what I'm doing is:
var _window = window;
// ~Script that changes window~
detectNew(_window, window);
But the _window variable changes along with window. Anyone know how to prevent this behavior?
I ended up using this little snippet.