ace2_inner: Move `sidedivinner` creation to ace.js

pull/5153/head
Richard Hansen 2021-07-29 02:37:58 -04:00
parent 15b1d4cb75
commit c7be4f9d2d
2 changed files with 5 additions and 4 deletions

View File

@ -229,6 +229,10 @@ const Ace2Editor = function () {
sideDiv.id = 'sidediv';
sideDiv.classList.add('sidediv');
outerDocument.body.appendChild(sideDiv);
const sideDivInner = outerDocument.createElement('div');
sideDivInner.id = 'sidedivinner';
sideDivInner.classList.add('sidedivinner');
sideDiv.appendChild(sideDivInner);
const lineMetricsDiv = outerDocument.createElement('div');
lineMetricsDiv.id = 'linemetricsdiv';
lineMetricsDiv.appendChild(outerDocument.createTextNode('x'));

View File

@ -64,10 +64,7 @@ function Ace2Inner(editorInfo, cssManagers) {
const outerDoc = outerWin.document;
const sideDiv = outerDoc.getElementById('sidediv');
const lineMetricsDiv = outerDoc.getElementById('linemetricsdiv');
const sideDivInner = outerDoc.createElement('div');
sideDivInner.id = 'sidedivinner';
sideDivInner.classList.add('sidedivinner');
sideDiv.appendChild(sideDivInner);
const sideDivInner = outerDoc.getElementById('sidedivinner');
(() => {
const lineDiv = outerDoc.createElement('div');
sideDivInner.appendChild(lineDiv);