Hey, thanks. I finally figured it out.
The problem was that I wrote like this:
this.elemId = "someId"
this.docElem = document.createElement("div")
this.docElem.id = this.elemId
this.docElem.onmouseover = function() {
alert(this.elemId)
}
which didn't work. (Note: I do append the element, just not here)
But this worked:
this.docElem.onmouseover = function() {
alert(this.id)
}
So this worked out in my particular situation. But what if I had a:
this.text = "Wheee"
How could I reach that within the function? By doing:
this.docElem.text = this.text ??