mirror of
https://github.com/redphx/better-xcloud.git
synced 2025-08-13 00:19:17 +02:00
Optimize CE()
This commit is contained in:
@@ -79,7 +79,7 @@ export class BxDualNumberStepper extends HTMLInputElement implements BxHtmlSetti
|
||||
$rangeTo.addEventListener('input', self.onRangeInput);
|
||||
|
||||
self.addEventListener('input', self.onRangeInput);
|
||||
self.append(CE('div', {}, $rangeFrom, $rangeTo));
|
||||
self.append(CE('div', false, $rangeFrom, $rangeTo));
|
||||
|
||||
// Set values
|
||||
BxDualNumberStepper.setValues.call(self, values);
|
||||
|
@@ -121,15 +121,15 @@ class KeyBindingDialog {
|
||||
this.$dialog = CE('div', { class: `bx-key-binding-dialog bx-gone` },
|
||||
this.$title = CE('h2', {}),
|
||||
CE('div', { class: 'bx-key-binding-dialog-content' },
|
||||
CE('div', {},
|
||||
CE('div', false,
|
||||
this.$wait = CE('p', { class: 'bx-blink-me' }),
|
||||
this.$inputList = CE('ul', {},
|
||||
this.$inputList = CE('ul', false,
|
||||
CE('li', { _dataset: { flag: BxKeyBindingButtonFlag.KEYBOARD_PRESS } }, t('keyboard-key')),
|
||||
CE('li', { _dataset: { flag: BxKeyBindingButtonFlag.KEYBOARD_MODIFIER } }, t('modifiers-note')),
|
||||
CE('li', { _dataset: { flag: BxKeyBindingButtonFlag.MOUSE_CLICK } }, t('mouse-click')),
|
||||
CE('li', { _dataset: { flag: BxKeyBindingButtonFlag.MOUSE_WHEEL } }, t('mouse-wheel')),
|
||||
),
|
||||
CE('i', {}, t('press-esc-to-cancel')),
|
||||
CE('i', false, t('press-esc-to-cancel')),
|
||||
),
|
||||
),
|
||||
);
|
||||
|
@@ -48,7 +48,7 @@ export class BxNumberStepper extends HTMLInputElement implements BxHtmlSettingEl
|
||||
class: 'bx-number-stepper',
|
||||
id: `bx_setting_${escapeCssSelector(key)}`,
|
||||
},
|
||||
CE('div', {},
|
||||
CE('div', false,
|
||||
$btnDec = CE('button', {
|
||||
_dataset: {
|
||||
type: 'dec' as ButtonType,
|
||||
|
@@ -96,9 +96,9 @@ export class BxSelectElement extends HTMLSelectElement {
|
||||
class: 'bx-select-value bx-focusable',
|
||||
tabindex: 0,
|
||||
},
|
||||
CE('div', {},
|
||||
CE('div', false,
|
||||
self.$checkBox = CE('input', { type: 'checkbox' }),
|
||||
self.$label = CE('span', {}, ''),
|
||||
self.$label = CE('span', false, ''),
|
||||
),
|
||||
|
||||
self.$indicators,
|
||||
@@ -115,7 +115,7 @@ export class BxSelectElement extends HTMLSelectElement {
|
||||
BxEvent.dispatch($select, 'input');
|
||||
});
|
||||
} else {
|
||||
$content = CE('div', {},
|
||||
$content = CE('div', false,
|
||||
self.$label = CE('label', { for: $select.id + '_checkbox' }, ''),
|
||||
self.$indicators,
|
||||
);
|
||||
@@ -259,7 +259,7 @@ export class BxSelectElement extends HTMLSelectElement {
|
||||
|
||||
$label.innerHTML = '';
|
||||
const fragment = document.createDocumentFragment();
|
||||
fragment.appendChild(CE('span', {}, groupLabel));
|
||||
fragment.appendChild(CE('span', false, groupLabel));
|
||||
fragment.appendChild(document.createTextNode(content));
|
||||
|
||||
$label.appendChild(fragment);
|
||||
|
Reference in New Issue
Block a user