<commit_before>var nativeDescriptor = Object.getOwnPropertyDescriptor;

Object.getOwnPropertyDescriptor = function(obj, prop) {
    var ret = nativeDescriptor(obj, prop);
    if(ret !== undefined) {
        return ret;
    }
    else if(prop == 'innerHTML') {
        return nativeDescriptor(document.createElement('div'), prop);
    }
    else if(prop == 'textContent') {
        return nativeDescriptor(document.createElement('div'), prop);
    }
};<commit_msg>Fix #17<commit_after>var ELEMENT_TAG = 'div';
var nativeDescriptor = Object.getOwnPropertyDescriptor;
var polyfill = function(obj, prop) {
    return {
        get: obj.__lookupGetter__(prop),
        set: obj.__lookupSetter__(prop)
    };
};

Object.getOwnPropertyDescriptor = function(obj, prop) {
    var ret = nativeDescriptor(obj, prop);
    if(ret !== undefined) {
        return ret;
    }
    else if(prop == 'innerHTML' || prop == 'textContent') {
        ret = nativeDescriptor(document.createElement(ELEMENT_TAG), prop);
        if(ret === undefined) {
            ret = polyfill(obj, prop);

            if(ret === undefined) {
                ret = polyfill(document.createElement(ELEMENT_TAG), prop);
            }
        }
    }
    else {
        ret = polyfill(obj, prop);
    }

    return ret;
};
{'fraction_non_alphanumeric': 0.13213448006254885, 'fraction_numerical': 0.001563721657544957, 'mean_word_length': 2.8208955223880596, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3735511', 'n_tokens_mistral': 361, 'n_tokens_neox': 361, 'n_words': 77}