function loadFile(path, callbackFn, args, numTries) {
	      var doc = document,
	          async = args.async,
	          maxTries = (args.numRetries || 0) + 1,
	          beforeCallbackFn = args.before || devnull,
	          pathStripped = path.replace(/^(css|img)!/, ''),
	          isLegacyIECss,
	          e;
	      numTries = numTries || 0;

	      if (/(^css!|\.css$)/.test(path)) {
	        // css
	        e = doc.createElement('link');
	        e.rel = 'stylesheet';
	        e.href = pathStripped; // tag IE9+

	        isLegacyIECss = 'hideFocus' in e; // use preload in IE Edge (to detect load errors)

	        if (isLegacyIECss && e.relList) {
	          isLegacyIECss = 0;
	          e.rel = 'preload';
	          e.as = 'style';
	        }
	      } else if (/(^img!|\.(png|gif|jpg|svg)$)/.test(path)) {
	        // image
	        e = doc.createElement('img');
	        e.src = pathStripped;
	      } else {
	        // javascript
	        e = doc.createElement('script');
	        e.src = path;
	        e.async = async === undefined ? true : async;
	      }

	      e.onload = e.onerror = e.onbeforeload = function (ev) {
	        var result = ev.type[0]; // treat empty stylesheets as failures to get around lack of onerror
	        // support in IE9-11

	        if (isLegacyIECss) {
	          try {
	            if (!e.sheet.cssText.length) result = 'e';
	          } catch (x) {
	            // sheets objects created from load errors don't allow access to
	            // `cssText` (unless error is Code:18 SecurityError)
	            if (x.code != 18) result = 'e';
	          }
	        } // handle retries in case of load failure


	        if (result == 'e') {
	          // increment counter
	          numTries += 1; // exit function and try again

	          if (numTries < maxTries) {
	            return loadFile(path, callbackFn, args, numTries);
	          }
	        } else if (e.rel == 'preload' && e.as == 'style') {
	          // activate preloaded stylesheets
	          return e.rel = 'stylesheet'; // jshint ignore:line
	        } // execute callback


	        callbackFn(path, result, ev.defaultPrevented);
	      }; // add to document (unless callback returns `false`)


	      if (beforeCallbackFn(path, e) !== false) doc.head.appendChild(e);
	    }
function loadFile(path, callbackFn, args, numTries) {
	      var doc = document,
	          async = args.async,
	          maxTries = (args.numRetries || 0) + 1,
	          beforeCallbackFn = args.before || devnull,
	          pathStripped = path.replace(/^(css|img)!/, ''),
	          isLegacyIECss,
	          e;
	      numTries = numTries || 0;

	      if (/(^css!|\.css$)/.test(path)) {
	        
	        e = doc.createElement('link');
	        e.rel = 'stylesheet';
	        e.href = pathStripped; 

	        isLegacyIECss = 'hideFocus' in e; 

	        if (isLegacyIECss && e.relList) {
	          isLegacyIECss = 0;
	          e.rel = 'preload';
	          e.as = 'style';
	        }
	      } else if (/(^img!|\.(png|gif|jpg|svg)$)/.test(path)) {
	        
	        e = doc.createElement('img');
	        e.src = pathStripped;
	      } else {
	        
	        e = doc.createElement('script');
	        e.src = path;
	        e.async = async === undefined ? true : async;
	      }

	      e.onload = e.onerror = e.onbeforeload = function (ev) {
	        var result = ev.type[0]; 
	        

	        if (isLegacyIECss) {
	          try {
	            if (!e.sheet.cssText.length) result = 'e';
	          } catch (x) {
	            
	            
	            if (x.code != 18) result = 'e';
	          }
	        } 


	        if (result == 'e') {
	          
	          numTries += 1; 

	          if (numTries < maxTries) {
	            return loadFile(path, callbackFn, args, numTries);
	          }
	        } else if (e.rel == 'preload' && e.as == 'style') {
	          
	          return e.rel = 'stylesheet'; 
	        } 


	        callbackFn(path, result, ev.defaultPrevented);
	      }; 


	      if (beforeCallbackFn(path, e) !== false) doc.head.appendChild(e);
	    }
function loadFile ( path , callbackFn , args , numTries ) { var doc = document , async = args . async , maxTries = ( args . numRetries || 0 ) + 1 , beforeCallbackFn = args . before || devnull , pathStripped = path . replace ( / ^(css|img)! / , '' ) , isLegacyIECss , e ; numTries = numTries || 0 ; if ( / (^css!|\.css$) / . test ( path ) ) { // css e = doc . createElement ( 'link' ) ; e . rel = 'stylesheet' ; e . href = pathStripped ; // tag IE9+ isLegacyIECss = 'hideFocus' in e ; // use preload in IE Edge (to detect load errors) if ( isLegacyIECss && e . relList ) { isLegacyIECss = 0 ; e . rel = 'preload' ; e . as = 'style' ; } } else if ( / (^img!|\.(png|gif|jpg|svg)$) / . test ( path ) ) { // image e = doc . createElement ( 'img' ) ; e . src = pathStripped ; } else { // javascript e = doc . createElement ( 'script' ) ; e . src = path ; e . async = async === undefined ? true : async ; } e . onload = e . onerror = e . onbeforeload = function ( ev ) { var result = ev . type [ 0 ] ; // treat empty stylesheets as failures to get around lack of onerror // support in IE9-11 if ( isLegacyIECss ) { try { if ( ! e . sheet . cssText . length ) result = 'e' ; } catch ( x ) { // sheets objects created from load errors don't allow access to // `cssText` (unless error is Code:18 SecurityError) if ( x . code != 18 ) result = 'e' ; } } // handle retries in case of load failure if ( result == 'e' ) { // increment counter numTries += 1 ; // exit function and try again if ( numTries < maxTries ) { return loadFile ( path , callbackFn , args , numTries ) ; } } else if ( e . rel == 'preload' && e . as == 'style' ) { // activate preloaded stylesheets return e . rel = 'stylesheet' ; // jshint ignore:line } // execute callback callbackFn ( path , result , ev . defaultPrevented ) ; } ; // add to document (unless callback returns `false`) if ( beforeCallbackFn ( path , e ) !== false ) doc . head . appendChild ( e ) ; }
Load individual file.
@param {string} path - The file path
@param {Function} callbackFn - The callback function
Load individual file .