()
| 4333 | } while (a < lilen); |
| 4334 | }, |
| 4335 | makeChanges = function dom_event_modeToggle_makeChanges():void { |
| 4336 | const text:string = mode.charAt(0).toUpperCase() + mode.slice(1), |
| 4337 | ci:HTMLElement = id("codeInput"), |
| 4338 | cilabel:HTMLCollectionOf<HTMLLabelElement> = ci.getElementsByTagName("label"), |
| 4339 | input:HTMLTextAreaElement = id("input"), |
| 4340 | output:HTMLTextAreaElement = id("output"), |
| 4341 | outLabel:HTMLElement = <HTMLElement>ci.getElementsByClassName("inputLabel")[1], |
| 4342 | sourceLabel:HTMLElement = id("inputlabel").parentNode, |
| 4343 | outputLabel:HTMLElement = id("outputlabel").parentNode, |
| 4344 | outputFile:HTMLElement = id("outputfile").parentNode; |
| 4345 | if (mode === "diff") { |
| 4346 | ci.getElementsByTagName("h2")[0].innerHTML = "Compare Code"; |
| 4347 | cilabel[0].innerHTML = "Base File"; |
| 4348 | cilabel[2].innerHTML = "Compare code sample"; |
| 4349 | cilabel[5].innerHTML = " Compare new code" |
| 4350 | outLabel.style.marginTop = "0"; |
| 4351 | sourceLabel.style.display = "block"; |
| 4352 | outputLabel.style.display = "block"; |
| 4353 | outputFile.style.display = "block"; |
| 4354 | if (options.color === "white") { |
| 4355 | output.style.background = "#fff"; |
| 4356 | } else if (options.color === "shadow") { |
| 4357 | output.style.background = "transparent"; |
| 4358 | } else if (options.color === "canvas") { |
| 4359 | output.style.background = "#f2f2f2"; |
| 4360 | } |
| 4361 | input.onkeyup = null; |
| 4362 | if (test.ace === true) { |
| 4363 | aceStore.codeIn.onkeyup = null; |
| 4364 | aceStore |
| 4365 | .codeOut |
| 4366 | .setReadOnly(false); |
| 4367 | if (options.diff !== undefined && options.diff !== null) { |
| 4368 | aceStore.codeOut.setValue(options.diff); |
| 4369 | } |
| 4370 | parent = <HTMLElement>output.parentNode; |
| 4371 | parent.setAttribute("class", "output"); |
| 4372 | } else { |
| 4373 | output.readOnly = false; |
| 4374 | if (options.diff !== undefined) { |
| 4375 | output.value = options.diff; |
| 4376 | } |
| 4377 | parent = <HTMLElement>output.parentNode.parentNode; |
| 4378 | parent.setAttribute("class", "output"); |
| 4379 | } |
| 4380 | } else { |
| 4381 | ci.getElementsByTagName("h2")[0].innerHTML = text; |
| 4382 | cilabel[0].innerHTML = `${text} file`; |
| 4383 | cilabel[2].innerHTML = `${text} code sample`; |
| 4384 | cilabel[5].innerHTML = `${text} output`; |
| 4385 | parent = <HTMLElement>document.getElementById("inputfile").parentNode; |
| 4386 | outLabel.style.marginTop = `${(parent.clientHeight + 11.5) / 10}em`; |
| 4387 | sourceLabel.style.display = "none"; |
| 4388 | outputLabel.style.display = "none"; |
| 4389 | outputFile.style.display = "none"; |
| 4390 | input.onkeyup = method.event.execute; |
| 4391 | if (options.color === "white") { |
| 4392 | output.style.background = "#f2f2f2"; |
no test coverage detected