                 @onScroll @scrollLeft,@scrollTop
 
         # setting up middle click drag
-        @container.addEventListener 'mousedown', (evt)=>
+        eventRegister.bind @container, 'mousedown', (evt)=>
             if evt.button == 1
                 @dragging = true
                 @container.className = "fattable-body-container fattable-moving"
                 @dragging_dX = @scrollLeft + evt.clientX
                 @dragging_dY = @scrollTop + evt.clientY
-        @container.addEventListener 'mouseup', =>
+        eventRegister.bind @container, 'mouseup', =>
             @dragging = false
             @container.className = "fattable-body-container"
-        @container.addEventListener 'mousemove', (evt)=>
+        eventRegister.bind @container, 'mousemove', (evt)=>
             # Firefox pb see https://bugzilla.mozilla.org/show_bug.cgi?id=732621
             deferred = =>
                 if @dragging

            # TODO support other browsers
            if evt.type is "mousewheel"
                @setScrollXY @scrollLeft - evt.wheelDeltaX, @scrollTop - evt.wheelDeltaY

        if @container.addEventListener
            @container.addEventListener "mousewheel", onMouseWheel, false
            @container.addEventListener "DOMMouseScroll", onMouseWheel, false
        else @container.attachEvent "onmousewheel", onMouseWheel
    
    onScroll: (x,y)->

    setScrollXY: (x,y)->

    document.removeEventListener "DOMContentLoaded", onLoad
    domReadyPromise.resolve()
document.addEventListener "DOMContentLoaded", onLoad


class TableData

