src/OpenSheetMusicDisplay/AJAX.ts
Function ajax
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public static ajax(url: string, timeout: number = 9000): Promise<string> {
let xhttp: XMLHttpRequest;
const mimeType: string = url.indexOf(".mxl") > -1 ? "text/plain; charset=x-user-defined" : "application/xml";
if (XMLHttpRequest) {
xhttp = new XMLHttpRequest();