ace2_inner: Replace `initLineNumbers()` with an IIFE
parent
b5bfff43cf
commit
7a8edc816b
|
@ -65,17 +65,13 @@ function Ace2Inner(editorInfo, cssManagers) {
|
||||||
const sideDiv = outerDoc.getElementById('sidediv');
|
const sideDiv = outerDoc.getElementById('sidediv');
|
||||||
const lineMetricsDiv = outerDoc.getElementById('linemetricsdiv');
|
const lineMetricsDiv = outerDoc.getElementById('linemetricsdiv');
|
||||||
let lineNumbersShown;
|
let lineNumbersShown;
|
||||||
let sideDivInner;
|
const sideDivInner = (() => {
|
||||||
|
|
||||||
const initLineNumbers = () => {
|
|
||||||
const htmlOpen = '<div id="sidedivinner" class="sidedivinner"><div><span class="line-number">1';
|
const htmlOpen = '<div id="sidedivinner" class="sidedivinner"><div><span class="line-number">1';
|
||||||
const htmlClose = '</span></div></div>';
|
const htmlClose = '</span></div></div>';
|
||||||
lineNumbersShown = 1;
|
lineNumbersShown = 1;
|
||||||
sideDiv.innerHTML = `${htmlOpen}${htmlClose}`;
|
sideDiv.innerHTML = `${htmlOpen}${htmlClose}`;
|
||||||
sideDivInner = outerWin.document.getElementById('sidedivinner');
|
return outerDoc.getElementById('sidedivinner');
|
||||||
};
|
})();
|
||||||
|
|
||||||
initLineNumbers();
|
|
||||||
|
|
||||||
const scroll = Scroll.init(outerWin);
|
const scroll = Scroll.init(outerWin);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue