gaetan
03/19/2018, 8:47 PMval body = document.querySelector("body").asDynamic()
body.foo = Foo(42)
println(body.foo)robstoll
03/19/2018, 9:51 PMdocument.getElementById('a').asDynamic().test = 12.
That works well, that's what I currently do but its seems wrong to do it outside of the div.
The problem is, that the element does not yet exist (as far as I saw) at the point of
div('a') {
//here I need somehow access to the underlying div-instance
}
If i can get hold on the div-HTMLElement instance inside the div then I could work with asDynamic. Do you know a way to get the element?gaetan
03/19/2018, 10:47 PMdiv('a') {
this.asDynamic().test = 42
}robstoll
03/20/2018, 6:56 AMthis refers to the receiver of the div function, so to a DIV instance and not the div elementgaetan
03/20/2018, 9:25 AM