code: function isLocalURL( aURL ) {
  
      // check if the URL belongs to an asset on the same domain the application is running on
  
      if ( aURL.substr( 0, 2 ) === "./" ||
          aURL.indexOf( window.location.protocol + "//" + window.location.host ) === 0 ) {
          return true;
      }
  
      // check if given URL is a http(s) URL, if so we know it is not local
  
      let urlRoot = ( aURL.split( "#" )[ 0 ] ).split( "?" )[ 0 ];
  
      // .html-file in the path name ? strip it
  
      if ( urlRoot.indexOf( ".html" ) > -1 ) {
  
          const urlArr    = urlRoot.split( "/" );
          const arrLength = urlArr.length;
          urlRoot = urlRoot.split( urlArr[ arrLength - 1 ]).join( "" );
      }
  
      if ( urlRoot ) {
          const match = urlRoot.match( /^http[s]?:/ );
          if ( Array.isArray( match ) && match.length > 0 ) {
              return false;
          }
      }
  
      // at this point we know we're likely dealing with a data URL, which is local
  
      return true;
  }
docs: checks whether given aURL is a URL to a remote resource (e.g. not on the
  same server/origin as this application) or whether it is local (e.g. a URL
  to a file on the same server or a data URL)
  
  @private
  @param {string=} aURL
  @return {boolean}