mirror of
https://github.com/redphx/better-xcloud.git
synced 2025-06-06 07:37:19 +02:00
Optimize createElement()
This commit is contained in:
parent
83a8e1f847
commit
6dbc0990cd
@ -55,16 +55,13 @@ function createElement(elmName, props = {}) {
|
||||
|
||||
if (hasNs) {
|
||||
$elm = document.createElementNS(props.xmlns, elmName);
|
||||
delete props.xmlns;
|
||||
} else {
|
||||
$elm = document.createElement(elmName);
|
||||
}
|
||||
|
||||
for (let key in props) {
|
||||
if (key === 'xmlns') {
|
||||
continue;
|
||||
}
|
||||
|
||||
if (!props.hasOwnProperty(key) || $elm.hasOwnProperty(key)) {
|
||||
for (const key in props) {
|
||||
if ($elm.hasOwnProperty(key)) {
|
||||
continue;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user