AFAIK all Javascript-generating output options in Emscripten (even before asm.js) use a single JS array to represent the entire C heap, so there's no 1:1 relation between an heap allocation and a Javascript object (which could then be garbage-collected), instead there's only one big JS heap object which must be alive for the entire application live time.
Until this extension happens, interacting with Javascript APIs or the DOM requires a JS shim which translates JS object references into a plain number "id", or a number-id back into a JS object reference (usually through an dictionary on the JS side with the number as key, and the JS object reference as value).
TL;DR: AFAIK you probably won't get much of an advantage choosing Javascript over WASM output via emscripten for interacting with the DOM and JS APIs, because both use the same flat memory model in a single JS array, and everything on the emscripten side is a number, there are no JS objects.
Cheers,
-Floh.