Пример #1
0
 public static Listener listenOnce(EventTarget src, Union <string, JsArray <string> > type_, Delegate listener, bool opt_capt = false, object opt_handler = null)
 {
     if (type_.Is <JsArray <string> >())
     {
         var type = type_.As <JsArray <string> >();
         for (var i = 0; i < type.Length; i++)
         {
             goog.events.listenOnce(src, type[i], listener, opt_capt, opt_handler);
         }
         return(null);
     }
     else
     {
         var type = type_.As <string>();
         listener = goog.events.wrapListener(listener);
         if (src.isImplementedBy())
         {
             return(src.listenOnce(type, listener, opt_capt, opt_handler));
         }
         else
         {
             //return goog.events.listen_(src, type, listener,
             //	/* callOnce */ true, opt_capt, opt_handler);
             throw new NotImplementedException();
         }
     }
 }