JSFiddle - React, Tailwind, and code Playground

by nathan

JavaScript

(function () {
    
    var nativeSupport = Object.hasOwnProperty('defineProperty'),
        nonDomSupport,
        testObject = {},
        definition;

    definition = {
        get : function () {
            return 'b';
        }
    };

    if (nativeSupport) {
        Object.defineProperty(testObject, 'test', definition);
        if (testObject.test === 'b') {
            nonDomSupport = true;
        }
    }

    function doIE678() {
        var obj = document.createElement('dynamicObjectHelper');
        document.root.appendChild(obj);
        return obj;
    }
    
}();