<s> def init ( ) : <EOL> mf = get_main_frame ( ) <EOL> mf . _addWindowEventListener ( "<STR_LIT>" , browser_event_cb ) <EOL> mf . _addWindowEventListener ( "<STR_LIT>" , browser_event_cb ) <EOL> mf . _addWindowEventListener ( "<STR_LIT>" , browser_event_cb ) <EOL> mf . _addWindowEventListener ( "<STR_LIT>" , browser_event_cb ) <EOL> mf . _addWindowEventListener ( "<STR_LIT>" , browser_event_cb ) <EOL> mf . _addWindowEventListener ( "<STR_LIT>" , browser_event_cb ) <EOL> mf . _addWindowEventListener ( "<STR_LIT>" , browser_event_cb ) <EOL> mf . _addWindowEventListener ( "<STR_LIT>" , browser_event_cb ) <EOL> mf . _addWindowEventListener ( "<STR_LIT>" , browser_event_cb ) <EOL> cb = get_main_frame ( ) . _timer_callback_workaround <EOL> global hack_timer_workaround_bug_button <EOL> mf . _hack_timer_workaround_bug_button = createButton ( ) <EOL> mf . addEventListener ( mf . _hack_timer_workaround_bug_button , "<STR_LIT>" , cb ) <EOL> mf . _addWindowEventListener ( "<STR_LIT>" , browser_event_cb ) <EOL> def getAbsoluteLeft ( elem ) : <EOL> left = elem . getBoundingClientRect ( ) . left <EOL> return left + elem . ownerDocument . body . scrollLeft <EOL> def getAbsoluteTop ( elem ) : <EOL> top = elem . getBoundingClientRect ( ) . top <EOL> return top + elem . ownerDocument . body . scrollTop <EOL> def eventGetButton ( evt ) : <EOL> if evt . button == <NUM_LIT:0> : <EOL> return Event . BUTTON_LEFT <EOL> if evt . button == <NUM_LIT:1> : <EOL> return Event . BUTTON_MIDDLE <EOL> if evt . button == <NUM_LIT:2> : <EOL> return Event . BUTTON_RIGHT <EOL> return evt . button <EOL> def sinkEventsMozilla ( element , bits ) : <EOL> return <EOL> mf = get_main_frame ( ) <EOL> if ( bits & <NUM_LIT> ) : <EOL> print "<STR_LIT>" , element <EOL> mf . addEventListener ( element , "<STR_LIT>" , _dispatchEvent ) <EOL> def eventGetMouseWheelVelocityY ( evt ) : <EOL> return evt . detail or <NUM_LIT:0.0> </s>
