JSFiddle - React, Tailwind, and code Playground

HTML

<div>
    some text
    <span> child <b> some bold</b> </span> some more text
</div>

JavaScript

$.fn.originalHas = $.fn.has;

if ($.browser.msie && $.browser.version == 8.0) {
    $.fn.has = function(other_obj) {
        var result = [];

        if (false) {
            // if you want to call the original
            result = originalHas.apply(this, arguments);
        } else {
            var current = other_obj;
            while (current != document.body) {
                if (current == this[0]) {
                    result.push(this[0]);
                    break;
                }
                current = current.parentNode;
            }


        }
        return result;


    };

}

var textNode = $("span")[0].childNodes[0];
var result = $(textNode.parentNode).has(textNode);
console.log(result);
console.log(result[0] == $(textNode.parentNode).originalHas(textNode)[0]);