hive/html/js/basic.js
// Firefox only supports textContent, old IE versions only support innerText
Firefox only supports textContent, old IE versions only support innerText
Firefox only supports textContent old IE versions only support innerText
function textContent(elt_or_html)
{
    if (elt_or_html == null || elt_or_html == undefined) return "";
    var elt;
    if (typeof elt_or_html === "string") {
        if (elt_or_html.indexOf("<") < 0 && elt_or_html.indexOf("&") < 0)
            return elt_or_html;
        elt = document.createElement("div");
        elt.innerHTML = elt_or_html;
    } else {
        elt = elt_or_html;
    }
    return elt.textContent || elt.innerText || "";
}
function textContent ( elt_or_html ) { if ( elt_or_html == null || elt_or_html == undefined ) return "" ; var elt ; if ( typeof elt_or_html === "string" ) { if ( elt_or_html . indexOf ( "<" ) < 0 && elt_or_html . indexOf ( "&" ) < 0 ) return elt_or_html ; elt = document . createElement ( "div" ) ; elt . innerHTML = elt_or_html ; } else { elt = elt_or_html ; } return elt . textContent || elt . innerText || "" ; }
Firefox only supports textContent, old IE versions only support innerText
Firefox only supports textContent old IE versions only support innerText
// if the argument is a string without html tags, it's good enough already