Thursday, 15 April 2010

How to track/preserve global namespace in Javascript -



How to track/preserve global namespace in Javascript -

this question has reply here:

monitor javascript object properties (magic getters , setters) 3 answers

i wondering best way track changes made global namespace external javascripts. example, lets have website , know object beingness added global namespace 3rd party software running on visitor's machine. there way preserve global namespace these changes ?

es5 has object.freeze 'preserving' objects:

object.freeze(window); object.freeze(object); object.freeze(object.prototype);

etc.

es6's proxy api allow track changes objects, specification still beingness drafted. spidermonkey has prototype implementation.

javascript global-namespace window-object

No comments:

Post a Comment