/// <summary>
        /// Invokes the specified JavaScript function synchronously.
        /// </summary>
        /// <param name="jsObjectReference">The <see cref="IJSInProcessObjectReference"/>.</param>
        /// <param name="identifier">An identifier for the function to invoke. For example, the value <c>"someScope.someFunction"</c> will invoke the function <c>someScope.someFunction</c> on the target instance.</param>
        /// <param name="args">JSON-serializable arguments.</param>
        public static void InvokeVoid(this IJSInProcessObjectReference jsObjectReference, string identifier, params object?[] args)
        {
            if (jsObjectReference == null)
            {
                throw new ArgumentNullException(nameof(jsObjectReference));
            }

            jsObjectReference.Invoke <object>(identifier, args);
        }
 public static string InvokeDisposedJSObjectReferenceException(IJSInProcessObjectReference jsObjectReference)
 {
     try
     {
         jsObjectReference.Invoke <object>("noop");
         return("No exception thrown");
     }
     catch (JSException e)
     {
         return(e.Message);
     }
 }