Improve Object.defineProperty patch for IE8
Improve Object.defineProperty patch for IE8

To enable getters/setters on native JavaScript objects in IE8, apply the
IE8PP function to them before calling Object.defineProperty:

    var Singleton   = {};
    var currentPage = 1;

    /** Get this working in IE8 */
    Singleton       = IE8PP( Singleton );
    Object.defineProperty(Singleton, "page", {
        get: function(){ return currentPage },
        set: function(i){ currentPage = i; }
    });

Comment out the call to IE8PP, and the browser will choke the second you
target it with Object.defineProperty. Amazing, huh?

Alhadis/Snippets,Alhadis/Snippets,Alhadis/Snippets,Alhadis/Snippets,Alhadis/Snippets