In this context, yes.
“wrapper” is just a variable that holds the content of the (new) HTML element that you create there and “getDom” grabs the content that is to be put into the DOM (Document Object Model, the raw content/structure), => rendered.
Example 1, basic:
getDom: function() {
var wrapper = document.createElement("div");
wrapper.setAttribute"id", "my-content");
// It's always a good idea to make an element addressable
wrapper.innerHTML = "Hello World!";
return wrapper;
}
getDom is called upon starting, grabbing the elements and putting them in place and if you want to change something later on, you need to call “this.updateDom()” to render it again with the new content.
Example 2, updating:
start: function() {
var self = this;
Log.info("Starting module: " + this.name);
this.myContent = "nothing yet"; // global variable, available to all functions
setTimeout(function() {
this.buildContent(self); // this will call the function "buildContent"
}, 5 * 1000); // 5 seconds after the start (5 * 1000 ms)
},
getDom: function() {
var wrapper = document.createElement("div");
wrapper.setAttribute"id", "my-content");
wrapper.innerHTML = this.myContent ; // will show "nothing yet" at the beginning
return wrapper;
},
buildContent: function(self) { // see above, this will be started after 5 seconds
// do your content building
this.myContent = "New content!"; // changes the value of the global variable
self.updateDom(); // call for the DOM to be updated, thus showing the new content
}
I hope that’s somewhat understandable.