Q:

How do you render a javascript object?

I have the following javascript code, but when I try to use it on the 3rd line, I get [object HTMLHeadingElement] in the HTML output. How do I take the whole HTML of x and prepend it to y.innerHTML?
x = document.getElementById("region-footer-first").getElementsByClassName("block-title")[0];
y = document.getElementById("region-footer-first").getElementsByClassName("jcarousel-clip")[0];

y.innerHTML = x + y.innerHTML;

A:

If you want the entire contents of x, including its tags, use .outerHTML, like this
x = document.getElementById("region-footer-first").getElementsByClassName("block-title")[0];

y = document.getElementById("region-footer-first").getElementsByClassName("jcarousel-clip")[0];

y.innerHTML = x.outerHTML + y.innerHTML;

