// Copyright © 2010-2017 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 CefSharp.Event; using CefSharp.ModelBinding; namespace CefSharp { /// /// Javascript object repository, object are registered for binding /// One repository per ChromiumWebBrowser instance /// public interface IJavascriptObjectRepository : IDisposable { /// /// Register a javascript object /// The equivilient to RegisterJsObject is isAsync = false /// The equivilient RegisterAsyncJsObject is isAsync = true /// /// name /// object /// is async /// binding options void Register(string name, object objectToBind, bool isAsync = false, BindingOptions options = null); /// /// Has bound objects /// bool HasBoundObjects { get; } /// /// Is object bound /// /// name /// true if object with matching name bound bool IsBound(string name); /// /// Event handler is called when an object with a given name is requested for binding and is not yet /// registered with the repository /// event EventHandler ResolveObject; /// /// Event handler is triggered when a object has been successfully bound on javascript /// event EventHandler ObjectBoundInJavascript; } }