Once you have content nodes, you'll need to register an object to respond to init, destroy, onShow, and onHide events.

init is called once when your view is first registered. This should performa any one-time initialization required by your view.

destroy is called once when your view is destroyed. This happens when Venkman is shut down, or when your view is unregistered.

onShow is called when your view is being inserted into a document. The currentContent property of your view object will contain a reference to the floatingview node that you are expected to work with. In onShow you should perform any required DOM hookup. You should not assume that you have initialzed these DOM nodes yet.

onHide is called when your view is about to be hidden. The currentContent property of your object will still be valid. You should perform any teardown required from this function.

Object representing the ``Breakpoint View'', from venkman-views.js...
console.views.breaks = new XULTreeView();

const VIEW_BREAKS = "breaks"
console.views.breaks.viewId = VIEW_BREAKS;

console.views.breaks.init =
function bv_init ()
{
    console.menuSpecs["context:breaks"] = {
        getContext: this.getContext,
        items:
        [
         ["find-url"],
         ["-"],
         ["clear-break",  { enabledif: "has('hasBreak')" }],
         ["clear-fbreak", { enabledif: "has('hasFBreak')" }],
         ["-"],
         ["clear-all"],
         ["fclear-all"],
         ["-"],
         ["break-props"]
        ]
    };
<... snip ...>
}

console.views.breaks.onShow =
function bv_show()
{
    syncTreeView (getChildById(this.currentContent, "break-tree"), this);
    initContextMenu(this.currentContent.ownerDocument, "context:breaks");
}

console.views.breaks.onHide =
function bv_hide()
{
    syncTreeView (getChildById(this.currentContent, "break-tree"), null);
}