ultimate_tictactoe/infobar.js

15 lines
362 B
JavaScript
Raw Permalink Normal View History

2019-03-21 12:13:46 +01:00
class Infobar
{
2019-03-29 12:47:49 +01:00
constructor(parent, css_class)
2019-03-21 12:13:46 +01:00
{
this.parent = parent;
this.container = document.createElement("div");
2019-03-29 12:47:49 +01:00
this.container.className = css_class;
2019-03-21 12:13:46 +01:00
this.parent.appendChild(this.container);
}
2019-03-29 12:47:49 +01:00
create_infocontainer(head_text = null)
2019-03-21 12:13:46 +01:00
{
2019-03-29 12:47:49 +01:00
return new Infocontainer(this.container, head_text);
2019-03-21 12:13:46 +01:00
}
}