コード例 #1
0
        /// <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);
        }
コード例 #2
0
        /// <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);
        }
コード例 #3
0
 /// <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);
 }