kde-workspace/plasma/scriptengines/webkit/dashboard/button/genericButton.js
Ivailo Monev efbde9e504 plasma: organize sub-directories
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2015-12-24 22:48:47 +02:00

8 lines
No EOL
229 B
JavaScript

function createGenericButton(placeElement,buttonText,clickHandler) {
var b = document.createElement("button");
b.appendChild(document.createTextNode(buttonText));
b.onclick = clickHandler;
placeElement.appendChild(b);
}