Files
cefsharp/CefSharp/RenderProcess/IV8Context.cs
T
Alex Maitland 70de3a6d9c Add Initial IRenderProcessHandler.OnContextCreated/Released implementation (#2697)
* WinForms/WPF - Dispose of IFrame after calling LoadUrl

* BrowserProcess - Add initial implementation of IRenderProcessHandler.OnContextCreated/OnContextReleased

- IV8Context.Execute is the only method to be implemented so far (execute script without returning a result)
- Wrappers for CefFrame and CefBrowser have yet to be imported yet, still need to determine if they should be included individually or reference to CefSharp.Core added

* BrowserProcess - Add wrappers for Browser and Frame

Ultimately we should probably remove the CefSharp.BrowserSubprocess.Core project and move all the code into a folder/namespace within CefSharp.Core
This would allow us to share the a lot of existing code, major refactor required

* CefSharp.Common.props - Add CefSharpBrowserProcessCore32/64 properties

Make creating your own custom browser process easier

* BrowserProcess - Remove example and add comments about creating your own custom version
2019-03-20 20:33:10 +10:00

20 lines
981 B
C#

// Copyright © 2019 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.
namespace CefSharp.RenderProcess
{
public interface IV8Context
{
/// <summary>
/// Execute a string of JavaScript code in this V8 context.
/// </summary>
/// <param name="code">JavaScript code to execute</param>
/// <param name="scriptUrl">Is the URL where the script in question can be found, if any</param>
/// <param name="startLine">Is the base line number to use for error reporting.</param>
/// <param name="exception">Is the exception if any.</param>
/// <returns>On success the function will return true. On failure <paramref name="exception"/> will be set to the exception, if any, and the function will return false.</returns>
bool Execute(string code, string scriptUrl, int startLine, out V8Exception exception);
}
}