I'm trying to assign a reference to a DOM element to a property when declaring an object but it won't work like this:
var myMedia = {
"v" : document.getElementById("video"),
"a" : document.getElementById("audio"),
"g" : "myMediaGroup",
};
...myMedia.v returns null, but if I assign it like this:
myMedia.v = document.getElementById("video");
...it works great.
Using object-literal, can I only assign strings to properties? How could I do it differently?