src/js/libs/spiritual-gui.js
function(markup) {
		markup = markup || "";
		return gui.Guide.suspend(function() {
			var doc = document.implementation.createHTMLDocument("");
			if (markup.toLowerCase().contains("<!doctype")) {
				try {
					doc.documentElement.innerHTML = markup;
				} catch (ie9exception) {
					doc = new ActiveXObject("htmlfile");
					doc.open();
					doc.write(markup);
					doc.close();
				}
			} else {
				doc.body.innerHTML = markup;
			}
			return doc;
		});
	}
function(markup) {
		markup = markup || "";
		return gui.Guide.suspend(function() {
			var doc = document.implementation.createHTMLDocument("");
			if (markup.toLowerCase().contains("<!doctype")) {
				try {
					doc.documentElement.innerHTML = markup;
				} catch (ie9exception) {
					doc = new ActiveXObject("htmlfile");
					doc.open();
					doc.write(markup);
					doc.close();
				}
			} else {
				doc.body.innerHTML = markup;
			}
			return doc;
		});
	}
function ( markup ) { markup = markup || "" ; return gui . Guide . suspend ( function ( ) { var doc = document . implementation . createHTMLDocument ( "" ) ; if ( markup . toLowerCase ( ) . contains ( "<!doctype" ) ) { try { doc . documentElement . innerHTML = markup ; } catch ( ie9exception ) { doc = new ActiveXObject ( "htmlfile" ) ; doc . open ( ) ; doc . write ( markup ) ; doc . close ( ) ; } } else { doc . body . innerHTML = markup ; } return doc ; } ) ; }
Parse to document. Bear in mind that the
document.defaultView of this thing is null.
@TODO: Use DOMParser for text/html supporters
@param {String} markup
@returns {HTMLDocument}
Parse to document . Bear in mind that the document . defaultView of this thing is null .