             when 'UIEvents' # TODO: JSDOM only has level 2 events, so we have to have the s.
                 # Currently setting view to null
                 event.initUIEvent(clientEv.type, clientEv.bubbles,
-                                  clientEv.cancelable, null, clientEv.detail)
+                                  clientEv.cancelable, @browser.window, clientEv.detail)
             when 'FocusEvent'
                 event.initFocusEvent(clientEv.type, clientEv.bubbles,
-                                     clientEv.cancelable, null,
+                                     clientEv.cancelable, @browser.window,
                                      clientEv.detail, clientEv.relatedTarget)
             when 'MouseEvents'
                 event.initMouseEvent(clientEv.type, clientEv.bubbles,
-                                     clientEv.cancelable, null,
+                                     clientEv.cancelable, @browser.window,
                                      clientEv.detail, clientEv.screenX,
                                      clientEv.screenY, clientEv.clientX,
                                      clientEv.clientY, clientEv.ctrlKey,

            else
                throw new Error "target doesn't have 'value' attribute"
        else
            console.log "Dispatching #{event.type} [#{group}] on #{clientEv.target[@browser.idProp]}"
            clientEv.target.dispatchEvent(event)

    _buildTables : ->

                                     clientEv.relatedTarget)
            when 'TextEvent'
                event.initTextEvent(clientEv.type, clientEv.bubbles,
                                    clientEv.cancelable, @browser.window, clientEv.data,
                                    clientEv.inputMethod, clientEv.locale)

            when 'WheelEvent'
                event.initWheelEvent(clientEv.type, clientEv.bubbles,
                                     clientEv.cancelable, @browser.window,
                                     clientEv.detail, clientEv.screenX,
                                     clientEv.screenY, clientEv.clientX,
                                     clientEv.clientY, clientEv.button,
