示例#1
0
 @Override
 protected void onDetach() {
   if (messageEventListeners != null) {
     for (final PostMessageEventListener messageEventListener : messageEventListeners) {
       final JavaScriptObject postMessageListenerFunction =
           postMessageListenerFunctions.remove(messageEventListener.getActionToWatch());
       removeFrameNotificationListener(postMessageListenerFunction);
     }
   }
   super.onDetach();
 }
示例#2
0
 @Override
 protected void onAttach() {
   if (messageEventListeners != null) {
     for (final PostMessageEventListener messageEventListener : messageEventListeners) {
       if (!postMessageListenerFunctions.containsKey(messageEventListener.getActionToWatch())) {
         postMessageListenerFunctions.put(
             messageEventListener.getActionToWatch(),
             addFrameNotificationListener(messageEventListener));
       }
     }
   }
   super.onAttach();
 }