Android / IOS 调用JS,需要明确调用的`function名称` .


@param name `function name`
@param registerCallback 回调的响应事件
499439
function(name, registerCallback){
      if($bridge['registerHandler']){

        setTimeout(function(){
          $bridge.registerHandler(name,registerCallback)
        },bridgeConfig.bridgeWebViewDelay)

      }else{
        console.log("don't built-in WebView invoking ",name,'{registerHandler}')
      }
    }
1361867
def register_func(self, func_name, func_kwargs):
        
        self.scan_funcs.append(func_name)
        self.scan_kwargs.append(func_kwargs)
7989
protected static function _isCallablePluginData($name, $plugin, $callback)
    {
        if (Arr::in($name, self::$_manifestEvents) &&
            !isset(self::$_eventList[$name][$plugin]) &&
            is_callable($callback)
        ) {
            return true;
        }

        return false;
    }
1309119
function(name) {
        if (!this.isValidRegister(name)) {
          return this.unamedRegister;
        }
        name = name.toLowerCase();
        if (!this.registers[name]) {
          this.registers[name] = new Register();
        }
        return this.registers[name];
      }
1116676
private static void registerDeviceForJacorb(final String name) throws DevFailed {
        // Get the 3 fields of device name
        final StringTokenizer st = new StringTokenizer(name, "/");
        final String[] field = new String[3];
        for (int i = 0; i < 3 && st.countTokens() > 0; i++) {
            field[i] = st.nextToken();
        }

        // After a header used by JacORB, in the device name
        // the '/' char must be replaced by another separator
        final String separator = "&%25";
        final String targetname = ORBManager.SERVER_IMPL_NAME + "/" + ORBManager.NODB_POA + "/" + field[0] + separator
                + field[1] + separator + field[2];
        // And set the JacORB objectKeyMap HashMap
        final org.jacorb.orb.ORB jacorb = (org.jacorb.orb.ORB) ORBManager.getOrb();
        jacorb.addObjectKey(name, targetname);
    }
1198736
public function register($name, $callback)
    {
        $this->widgets[$name] = $callback;

        $this->registerBlade($name);
    }
682073
def register(self, func):
        
        if callable(func):
            self.functions[func.__name__] = func
        return func
761597
function Controller(name, options) {
	if (typeof name === "function") {
		var _constructor = name;name = null;
		return register(_constructor, options);
	}

	return register;
	function register(constructor, opts) {
		registerLock(constructor);
		var meta = (0, _utils.funcMeta)(constructor);

		name = name || opts && opts.name || meta.name;
		meta.controller.name = name;

		_app.app.controller(name, constructor);
	}
}
532178
static
	public void putFunction(String name, Class<? extends Function> functionClazz){
		FunctionRegistry.functionClazzes.put(Objects.requireNonNull(name), checkClass(functionClazz));
	}
136284
function(id, registrationName, listener) {
    ("production" !== "development" ? invariant(
      !listener || typeof listener === 'function',
      'Expected %s listener to be a function, instead got type %s',
      registrationName, typeof listener
    ) : invariant(!listener || typeof listener === 'function'));

    var bankForRegistrationName =
      listenerBank[registrationName] || (listenerBank[registrationName] = {});
    bankForRegistrationName[id] = listener;
  }
131211
protected function registerEvent($name, Closure $callback)
    {
        if (! isset(static::$dispatcher)) {
            $this->initEventDispatcher();
        }

        static::$dispatcher->listen($name, $callback);
    }
88258
protected function registerExtraMethodCallback($name, $callback)
    {
        if (!isset($this->extra_method_registers[$name])) {
            $this->extra_method_registers[$name] = $callback;
        }
    }
1334676
@Override
    public void registerDestructionCallback(String name, Runnable callback) {
        synchronized (this) {
            destructionCallbacks.put(name, callback);
        }
    }
894317
@Override
    public void registerCallback(UOWScopeCallback callback) {
        if (tc.isEntryEnabled())
            Tr.entry(tc, "registerCallback", callback);

        UserTransactionImpl.instance().registerCallback(callback);

        if (tc.isEntryEnabled())
            Tr.exit(tc, "registerCallback");
    }
374658
public function onRegister($name, Closure $callback)
    {
        $priority                  = $this->getPluginPriority($name);
        $this->registerCallbacks[] = compact('name', 'priority', 'callback');
    }
1155833
public static void register(Context context, String name) {
        final Resources res = context.getResources();
        int androidId = res.getIdentifier(name, "layout", "android");
        int appId = res.getIdentifier(name, "layout", context.getPackageName());
        if (androidId != 0 && appId != 0) {
            register(androidId, appId);
        } else {
            HoloEverywhere.warn("Failed to register layout remapping:\n" +
                    "  Android ID: 0x%8x\n" +
                    "  Application ID: 0x%8x",
                    androidId, appId);
        }
    }
13497
def register(name, func=None):
    

    def decorator(func):
        # Perform the registration
        ControlDaemon._register(name, func)
        return func

    # If func was given, call the decorator, otherwise, return the
    # decorator
    if func:
        return decorator(func)
    else:
        return decorator