admin
2020-06-22 924bdf1c9fb74babf2438d5545db3594756625d1
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
// Copyright © 2014 The CefSharp Authors. All rights reserved.
//
// Use of this source code is governed by a BSD-style license that can be found in the LICENSE file.
 
using System;
using System.Threading.Tasks;
 
namespace CefSharp
{
    /// <summary>
    /// Javascript callback interface
    /// </summary>
    public interface IJavascriptCallback : IDisposable
    {
        /// <summary>
        /// Callback Id
        /// </summary>
        Int64 Id { get; }
 
        /// <summary>
        /// Execute the javascript callback
        /// </summary>
        /// <param name="parms">param array of objects</param>
        /// <returns>JavascriptResponse</returns>
        Task<JavascriptResponse> ExecuteAsync(params object[] parms);
 
        /// <summary>
        /// Execute the javascript callback
        /// </summary>
        /// <param name="timeout">timeout</param>
        /// <param name="parms">param array of objects</param>
        /// <returns>JavascriptResponse</returns>
        Task<JavascriptResponse> ExecuteWithTimeoutAsync(TimeSpan? timeout, params object[] parms);
 
        /// <summary>
        /// Check to see if the underlying resource are still available to execute the callback
        /// </summary>
        bool CanExecute { get; }
 
        /// <summary>
        /// Gets a value indicating whether the callback has been disposed of.
        /// </summary>
        bool IsDisposed { get; }
    }
}