src/main/javascript/dom/floatz.dom.dom.js
/**
     * Load external HTML into element
     *
     * @param url Location of HTML file
     * @param {Function=} handler Optional handler that is executed after loading is finished
     * @returns {DOMElement} DOMElement for chaining
     */
Load external HTML into element
@param url Location of HTML file
@param {Function=} handler Optional handler that is executed after loading is finished
@returns {DOMElement} DOMElement for chaining
Load external HTML into element @param url Location of HTML file @param { Function = } handler Optional handler that is executed after loading is finished @returns { DOMElement } DOMElement for chaining
load(url, handler) {
        let request = new XMLHttpRequest();
        request.onload = () => {
            this.html(request.responseXML.body ? request.responseXML.body.innerHTML : request.responseText );
            if (handler) {
                handler(request);
            }
        };
        request.open("GET", url);
        request.setRequestHeader("Content-Type", "text/html;charset=UTF-8");
        request.responseType = "document"; 
        request.send();
        return this;
    }
load ( url , handler ) { let request = new XMLHttpRequest ( ) ; request . onload = ( ) => { this . html ( request . responseXML . body ? request . responseXML . body . innerHTML : request . responseText ) ; if ( handler ) { handler ( request ) ; } } ; request . open ( "GET" , url ) ; request . setRequestHeader ( "Content-Type" , "text/html;charset=UTF-8" ) ; request . responseType = "document" ; request . send ( ) ; return this ; }
Load external HTML into element
 @param url Location of HTML file
 @param {Function=} handler Optional handler that is executed after loading is finished
 @returns {DOMElement} DOMElement for chaining
Load external HTML into element @param url Location of HTML file @param { Function = } handler Optional handler that is executed after loading is finished @returns { DOMElement } DOMElement for chaining
/* Fix: IE9 */ // FIX: must be set AFTER open otherwise InvalidStateError in IE