[global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_WebView_AddJavaScriptMessageHandler")]
public static extern void AddJavaScriptMessageHandler(global::System.Runtime.InteropServices.HandleRef jarg1, string jarg2, global::System.Runtime.InteropServices.HandleRef jarg3);
+ [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_WebView_AddJavaScriptEntireMessageHandler")]
+ public static extern void AddJavaScriptEntireMessageHandler(global::System.Runtime.InteropServices.HandleRef jarg1, string jarg2, global::System.Runtime.InteropServices.HandleRef jarg3);
+
[global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_WebView_RegisterJavaScriptAlertCallback")]
public static extern void RegisterJavaScriptAlertCallback(global::System.Runtime.InteropServices.HandleRef jarg1, global::System.Runtime.InteropServices.HandleRef jarg2);
[EditorBrowsable(EditorBrowsableState.Never)]
public delegate void JavaScriptMessageHandler(string message);
+ /// <summary>
+ /// The callback function that is invoked when the message is received from the script.
+ /// </summary>
+ [UnmanagedFunctionPointer(CallingConvention.Cdecl)]
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public delegate void JavaScriptEntireMessageHandler(string messageName, string messageBody);
+
/// <summary>
/// The callback function that is invoked when the message is received from the script.
/// </summary>
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
}
+ /// <summary>
+ /// Add a message handler into the WebView.
+ /// </summary>
+ /// <param name="objectName">The name of exposed object</param>
+ /// <param name="handler">The callback function</param>
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public void AddJavaScriptMessageHandler(string objectName, JavaScriptEntireMessageHandler handler)
+ {
+ System.IntPtr ip = System.Runtime.InteropServices.Marshal.GetFunctionPointerForDelegate(handler);
+ Interop.WebView.AddJavaScriptEntireMessageHandler(SwigCPtr, objectName, new System.Runtime.InteropServices.HandleRef(this, ip));
+ if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+ }
+
/// <summary>
/// Registers a callback for JS alert.
/// </summary>