microformat-shiv.js
function( options ){
			var baseTag,
				href;

            // use current document to define baseUrl, try/catch needed for IE10+ error
            try {
                if (!options.baseUrl && this.document && this.document.location) {
                    this.options.baseUrl = this.document.location.href;
                }
            } catch (e) {
                // there is no alt action
            }


			// find base tag to set baseUrl
			baseTag = modules.domUtils.querySelector(this.document,'base');
			if(baseTag) {
				href = modules.domUtils.getAttribute(baseTag, 'href');
				if(href){
					this.options.baseUrl = href;
				}
			}

			// get path to rootNode
			// then clone document
			// then reset the rootNode to its cloned version in a new document
			var path,
				newDocument,
				newRootNode;

			path = modules.domUtils.getNodePath(this.rootNode);
			newDocument = modules.domUtils.cloneDocument(this.document);
			newRootNode = modules.domUtils.getNodeByPath(newDocument, path);

			// check results as early IE fails
			if(newDocument && newRootNode){
				this.document = newDocument;
				this.rootNode = newRootNode;
			}

			// add includes
			if(this.addIncludes){
				this.addIncludes( this.document );
			}

			return (this.rootNode && this.document);
		}
function( options ){
			var baseTag,
				href;

            // use current document to define baseUrl, try/catch needed for IE10+ error
            try {
                if (!options.baseUrl && this.document && this.document.location) {
                    this.options.baseUrl = this.document.location.href;
                }
            } catch (e) {
                // there is no alt action
            }


			// find base tag to set baseUrl
			baseTag = modules.domUtils.querySelector(this.document,'base');
			if(baseTag) {
				href = modules.domUtils.getAttribute(baseTag, 'href');
				if(href){
					this.options.baseUrl = href;
				}
			}

			// get path to rootNode
			// then clone document
			// then reset the rootNode to its cloned version in a new document
			var path,
				newDocument,
				newRootNode;

			path = modules.domUtils.getNodePath(this.rootNode);
			newDocument = modules.domUtils.cloneDocument(this.document);
			newRootNode = modules.domUtils.getNodeByPath(newDocument, path);

			// check results as early IE fails
			if(newDocument && newRootNode){
				this.document = newDocument;
				this.rootNode = newRootNode;
			}

			// add includes
			if(this.addIncludes){
				this.addIncludes( this.document );
			}

			return (this.rootNode && this.document);
		}
function ( options ) { var baseTag , href ; // use current document to define baseUrl, try/catch needed for IE10+ error try { if ( ! options . baseUrl && this . document && this . document . location ) { this . options . baseUrl = this . document . location . href ; } } catch ( e ) { // there is no alt action } // find base tag to set baseUrl baseTag = modules . domUtils . querySelector ( this . document , 'base' ) ; if ( baseTag ) { href = modules . domUtils . getAttribute ( baseTag , 'href' ) ; if ( href ) { this . options . baseUrl = href ; } } // get path to rootNode // then clone document // then reset the rootNode to its cloned version in a new document var path , newDocument , newRootNode ; path = modules . domUtils . getNodePath ( this . rootNode ) ; newDocument = modules . domUtils . cloneDocument ( this . document ) ; newRootNode = modules . domUtils . getNodeByPath ( newDocument , path ) ; // check results as early IE fails if ( newDocument && newRootNode ) { this . document = newDocument ; this . rootNode = newRootNode ; } // add includes if ( this . addIncludes ) { this . addIncludes ( this . document ) ; } return ( this . rootNode && this . document ) ; }
prepares DOM before the parse begins

@param  {Object} options
@return {Boolean}
prepares DOM before the parse begins