/// <summary> /// Registers a .net object to be available on the js context. /// </summary> /// <param name="module"></param> /// <param name="frameName"></param> /// <param name="forceNativeSyncCalls"></param> private void RegisterNativeObject(IViewModule module, FrameInfo frame) { var nativeObjectName = module.GetNativeObjectFullName(frame.Name); WebView.RegisterJavascriptObject(nativeObjectName, module.CreateNativeObject(), interceptCall: CallNativeMethod, executeCallsInUI: false); }
/// <summary> /// Unregisters a .net object available on the js context. /// </summary> /// <param name="module"></param> /// <param name="frameName"></param> private void UnregisterNativeObject(IViewModule module, FrameInfo frame) { var nativeObjectName = module.GetNativeObjectFullName(frame.Name); WebView.UnregisterJavascriptObject(nativeObjectName); }
/// <summary> /// Binds the coponent to the specified frame. /// </summary> /// <param name="component"></param> /// <param name="frame"></param> private void BindComponentToFrame(IViewModule component, FrameInfo frame) { frame.Component = component; component.Bind(frame, this); }