public void prependHandler ( @ Nonnull final EJSEvent eJSEvent , @ Nonnull final IHasJSCode aNewHandler ) { ValueEnforcer . notNull ( eJSEvent , "JSEvent" ) ; ValueEnforcer . notNull ( aNewHandler , "NewHandler" ) ; CollectingJSCodeProvider aCode = m_aEvents . get ( eJSEvent ) ; if ( aCode == null ) { aCode = new CollectingJSCodeProvider ( ) ; m_aEvents . put ( eJSEvent , aCode ) ; } aCode . prepend ( aNewHandler ) ; }
Add an additional handler for the given JS event . If an existing handler is present the new handler is appended at front .