Answer the question
In order to leave comments, you need to log in
How to show javascript class in UML?
There is a class
"use strict";
function CraneGUI(id) {
this.htmlElement = document.getElementById(id);
this.type = this.htmlElement.tagName;
//if (this.type === "INPUT")
}
CraneGUI.prototype.set_value = function (value) {
if (this.type === "INPUT")
this.htmlElement.value = value;
};
CraneGUI.prototype.get_value = function () {
if (this.type === "INPUT")
return +this.htmlElement.value
};
CraneGUI.prototype.addEventListener = function (event,func) {
this.htmlElement.addEventListener(event,func);
};
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question