$create should read opt.appendChild if selector is string
This commit is contained in:
parent
3d6b46a14b
commit
5b9fd4454b
|
@ -191,6 +191,7 @@ function $create(selector = 'div', properties, children) {
|
||||||
children = properties;
|
children = properties;
|
||||||
} else {
|
} else {
|
||||||
opt = properties || {};
|
opt = properties || {};
|
||||||
|
children = children || opt.appendChild;
|
||||||
}
|
}
|
||||||
const idStart = (selector.indexOf('#') + 1 || selector.length + 1) - 1;
|
const idStart = (selector.indexOf('#') + 1 || selector.length + 1) - 1;
|
||||||
const classStart = (selector.indexOf('.') + 1 || selector.length + 1) - 1;
|
const classStart = (selector.indexOf('.') + 1 || selector.length + 1) - 1;
|
||||||
|
|
Loading…
Reference in New Issue
Block a user