code: private String registerEventHandler(GFXEventHandler h) {
          //checkInitialized();
          if (!registeredOnJS) {
              JSObject doc = (JSObject) runtime.execute("document");
              doc.setMember("jsHandlers", jsHandlers);
              registeredOnJS = true;
          }
          return jsHandlers.registerHandler(h);
      }
docs: Registers an event handler in the repository shared between Javascript
  and Java.
  
  @param h Event handler to be registered.
  @return Callback key that Javascript will use to find this handler.