We're going to revamp the HTML support so that users can write the heart of the DOM in a separate HTML file.
As for access to Javascript, not yet. Although there is an undocumented hook to get at Javascript objects and attributes, it isn't ready for consumption.