2018-10-09 03:49:15 +02:00
|
|
|
class LinkStateHandler {
|
|
|
|
static flip(element) {
|
2018-10-09 06:08:43 +02:00
|
|
|
let labelElement = document.createElement("span");
|
2018-10-09 03:49:15 +02:00
|
|
|
labelElement.className = "link-flipped-state";
|
|
|
|
labelElement.appendChild(document.createTextNode(element.dataset.labelNewState));
|
|
|
|
|
|
|
|
element.parentNode.appendChild(labelElement);
|
|
|
|
element.parentNode.removeChild(element);
|
|
|
|
}
|
|
|
|
}
|