Skip to content

Commit 5bf5f44

Browse files
author
Anu1601CS
committed
eslint code style
1 parent fa9621e commit 5bf5f44

File tree

5 files changed

+348
-374
lines changed

5 files changed

+348
-374
lines changed

build/webcomponents/js/editor-codemirror/editor-codemirror.js

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -115,20 +115,18 @@ customElements.define('joomla-editor-codemirror', class extends HTMLElement {
115115
this.instance = window.CodeMirror.fromTextArea(element, this.options);
116116
}
117117

118-
rafAsync() {
119-
return new Promise(resolve => {
120-
requestAnimationFrame(resolve);
121-
});
118+
static rafAsync() {
119+
return new Promise(resolve => requestAnimationFrame(resolve));
122120
}
123121

124122
async checkElement(string1, string2) {
125123
if (string2) {
126124
while (typeof window[string1][string2] !== 'function') {
127-
await this.rafAsync();
125+
this.rafAsync();
128126
}
129127
} else {
130128
while (typeof window[string1] !== 'function') {
131-
await this.rafAsync();
129+
this.rafAsync();
132130
}
133131
}
134132

@@ -144,7 +142,7 @@ customElements.define('joomla-editor-codemirror', class extends HTMLElement {
144142
this.instance.setOption('fullScreen', false);
145143
}
146144

147-
makeMarker() {
145+
static makeMarker() {
148146
const marker = document.createElement('div');
149147
marker.className = 'CodeMirror-markergutter-mark';
150148
return marker;

0 commit comments

Comments
 (0)