interface.js: fix labelTag
This commit is contained in:
parent
bbc4fdb5c5
commit
c4317bc5e8
@ -101,9 +101,11 @@ class Form extends InterfaceElement {
|
|||||||
}
|
}
|
||||||
|
|
||||||
createButton(params) {
|
createButton(params) {
|
||||||
|
params.fragment = new DocumentFragment();
|
||||||
params.tag = document.createElement("button");
|
params.tag = document.createElement("button");
|
||||||
params.labelTag = document.createTextNode(params.label);
|
params.labelTag = document.createTextNode(params.label);
|
||||||
params.tag.appendChild(params.labelTag);
|
params.tag.appendChild(params.labelTag);
|
||||||
|
params.fragment.appendChild(params.tag);
|
||||||
dataTypeSupports(params, ["none"]);
|
dataTypeSupports(params, ["none"]);
|
||||||
return this.appendElement(new FormElement(params));
|
return this.appendElement(new FormElement(params));
|
||||||
}
|
}
|
||||||
@ -175,6 +177,8 @@ class FormElement extends InterfaceElement {
|
|||||||
if (labelTag === undefined) {
|
if (labelTag === undefined) {
|
||||||
this.labelTag = document.createElement("label");
|
this.labelTag = document.createElement("label");
|
||||||
this.labelTag.appendChild(document.createTextNode(this.labelText));
|
this.labelTag.appendChild(document.createTextNode(this.labelText));
|
||||||
|
} else {
|
||||||
|
this.labelTag = labelTag;
|
||||||
}
|
}
|
||||||
if (fragment === undefined) {
|
if (fragment === undefined) {
|
||||||
this.fragment = new DocumentFragment();
|
this.fragment = new DocumentFragment();
|
||||||
|
Loading…
Reference in New Issue
Block a user