abstract class UrlLoader { public abstract handleUrl ( url , callback ? ) ; public load ( url , callback ? ) { if ( typeof url === "string" ) { return this . handleUrl ( url , callback ) ; } if ( Array . isArray ( url ) ) { return Promise . all ( url . map ( el => this . load ( el , callback ) ) ) ; } } public getExactPath ( url ) { return `${ window . location . href }${ url }` ; } } export default UrlLoader ;