getDom: function() is called initially to set up the content. Usually you have something like div.innerHTML = variable; but at the beginning, varibable might be empty. To make the variable usable globally (in the scope of your module), you set it up and call it as this.variable.

When your function that fills this variable updates that variable content, you call updateDom();
That makes the dom reload and this time, this.variable has content to show.

There’s other ways to fill the element with the content of a variable without totally rebuilding the DOM:
In the function that handles the variable, you could say document.getElementbyId(elementId).innerHTML = variable;

Edit: To complete this. If you want to pass a value from one function to another (but this is not working for the Dom, because that has to be set up initially):

firstFunction: function () { var greeting: "Hello"; secondFunction(greeting); } secondFunction: function (word) { var greeting: word; Log.info(greeting); // "Hello" }