My question is simple: Is there a way to have the event as a variable or any variable after a dot in general? Is there a way to do something like this?
var type = "onkeyup";
document.getElementById("test").type = myFunction;
or
var element = "body";
document.element.style.marginTop = 0;