Coder Social home page Coder Social logo

cefsharp.dom's Introduction

CefSharp Logo

Build status CefSharp.WinForms CefSharp.Wpf CefSharp.Wpf.HwndHost CefSharp.OffScreen

Got a quick question? Discussions here on GitHub is the preferred place to ask!

CefSharp lets you embed Chromium in .NET apps. It is a lightweight .NET wrapper around the Chromium Embedded Framework (CEF) by Marshall A. Greenblatt. About 30% of the bindings are written in C++/CLI with the majority of code here is C#. It can be used from C# or VB, or any other CLR language. CefSharp provides both WPF and WinForms web browser control implementations.

CefSharp is BSD licensed, so it can be used in both proprietary and free/open source applications. For the full details, see the LICENSE file.

If you like and use CefSharp please consider signing up for a small monthly donation, even $25 can help tremendously. See Financial Support for more details.

Releases

Stable binaries are released on NuGet, and contain everything you need to embed Chromium in your .Net/CLR application. For usage see the Quick Start guide or checkout CefSharp.MinimalExample project for basic demos using the CefSharp NuGet packages.

Documentation

  • See the CefSharp.Wpf.Example or CefSharp.WinForms.Example projects for example web browsers built with CefSharp. They demo most of the available features.
  • See the CefSharp.MinimalExample project for a basic demo of using the CefSharp NuGet packages.
  • See the General Usage Guide in help getting started/dealing with common scenarios.
  • See the Wiki for work-in-progress documentation
  • See the FAQ for help with common issues
  • Upgrading from an earlier version of CefSharp? See the ChangeLog for breaking changes and upgrade tips.
  • CefSharp API generated from the source code comments.

Contact

Please keep the Issue Tracker for Bugs only please! Before submitting a PR please read CONTRIBUTING.

Branches & Forks

This is the official CefSharp fork, as maintained by the CefSharp community. You can also view the entire network of public forks/branches.

Development is done in the master branch. New features are preferably added in feature branches, if the changes are more than trivial. New PR's should be targeted against master.

When a new release is imminent a release branch is created. We try to avoid making public facing API changes in release branches (Adding new features is fine, just not breaking changes).

Releases

CI Builds
Every commit on master produces a Nuget package. Use at your own risk!

  • MyGet Pre Release
  • MyGet Pre Release
  • MyGet Pre Release

Pre-release

  • CefSharp.WinForms

  • CefSharp.Wpf

  • CefSharp.OffScreen

  • CefSharp.WinForms.NETCore

  • CefSharp.Wpf.NETCore

  • CefSharp.OffScreen.NETCore

Stable

  • CefSharp.WinForms

  • CefSharp.Wpf

  • CefSharp.OffScreen

  • CefSharp.WinForms.NETCore

  • CefSharp.Wpf.NETCore

  • CefSharp.OffScreen.NETCore

Release Branches

With each release a new branch is created, for example the 92.0.260 release corresponds to the cefsharp/92 branch. If you're new to CefSharp and are downloading the source to check it out, please use a Release branch.

* VC++ 2019 is required starting with version 93
** For .Net Core Packages .Net Core 3.1 or .Net 5/6/7 are required.

Branch CEF Version VC++ Version .Net Version Status
master 6099 2019* 4.6.2** Development
cefsharp/120 6099 2019* 4.6.2** Release
cefsharp/119 6045 2019* 4.6.2** Unsupported
cefsharp/118 5993 2019* 4.6.2** Unsupported
cefsharp/117 5938 2019* 4.6.2** Unsupported
cefsharp/116 5845 2019* 4.6.2** Unsupported
cefsharp/115 5790 2019* 4.6.2** Unsupported
cefsharp/114 5735 2019* 4.5.2** Unsupported
cefsharp/113 5615 2019* 4.5.2** Unsupported
cefsharp/112 5615 2019* 4.5.2** Unsupported
cefsharp/111 5563 2019* 4.5.2** Unsupported
cefsharp/110 5481 2019* 4.5.2** Unsupported
cefsharp/109 5414 2019* 4.5.2** Unsupported
cefsharp/108 5359 2019* 4.5.2** Unsupported
cefsharp/107 5304 2019* 4.5.2** Unsupported
cefsharp/106 5249 2019* 4.5.2** Unsupported
cefsharp/105 5195 2019* 4.5.2** Unsupported
cefsharp/104 5112 2019* 4.5.2** Unsupported
cefsharp/103 5060 2019* 4.5.2** Unsupported
cefsharp/102 5005 2019* 4.5.2** Unsupported
cefsharp/101 4951 2019* 4.5.2** Unsupported
cefsharp/100 4896 2019* 4.5.2** Unsupported
cefsharp/99 4844 2019* 4.5.2** Unsupported
cefsharp/98 4758 2019* 4.5.2** Unsupported
cefsharp/97 4692 2019* 4.5.2** Unsupported
cefsharp/96 4664 2019* 4.5.2** Unsupported
cefsharp/95 4638 2019* 4.5.2** Unsupported
cefsharp/94 4606 2019* 4.5.2** Unsupported
cefsharp/93 4577 2019* 4.5.2** Unsupported
cefsharp/92 4515 2015* 4.5.2** Unsupported
cefsharp/91 4472 2015* 4.5.2** Unsupported
cefsharp/90 4430 2015* 4.5.2** Unsupported
cefsharp/89 4389 2015* 4.5.2** Unsupported
cefsharp/88 4324 2015* 4.5.2** Unsupported
cefsharp/87 4280 2015* 4.5.2** Unsupported
cefsharp/86 4240 2015 4.5.2 Unsupported
cefsharp/85 4183 2015 4.5.2 Unsupported
cefsharp/84 4147 2015 4.5.2 Unsupported
cefsharp/83 4103 2015 4.5.2 Unsupported
cefsharp/81 4044 2015 4.5.2 Unsupported
cefsharp/79 3945 2015 4.5.2 Unsupported
cefsharp/77 3865 2015 4.5.2 Unsupported
cefsharp/75 3770 2015 4.5.2 Unsupported
cefsharp/73 3683 2015 4.5.2 Unsupported
cefsharp/71 3578 2015 4.5.2 Unsupported
cefsharp/69 3497 2015 4.5.2 Unsupported
cefsharp/67 3396 2015 4.5.2 Unsupported
cefsharp/65 3325 2015 4.5.2 Unsupported
cefsharp/63 3239 2013 4.5.2 Unsupported
cefsharp/62 3202 2013 4.5.2 Unsupported
cefsharp/57 2987 2013 4.5.2 Unsupported
cefsharp/55 2883 2013 4.5.2 Unsupported
cefsharp/53 2785 2013 4.5.2 Unsupported
cefsharp/51 2704 2013 4.5.2 Unsupported
cefsharp/49 2623 2013 4.0 Unsupported
cefsharp/47 2526 2013 4.0 Unsupported
cefsharp/45 2454 2013 4.0 Unsupported
cefsharp/43 2357 2012 4.0 Unsupported
cefsharp/41 2272 2012 4.0 Unsupported
cefsharp/39 2171 2012 4.0 Unsupported
cefsharp/37 2062 2012 4.0 Unsupported

* VC++ 2019 is required starting with version 93
** For .Net Core Packages .Net Core 3.1/.Net 5.0 is required.

Financial Support

Is your company making money thanks to CefSharp? Do you rely on regular updates to the project? Alex Maitland needs your support! Signup to GitHub Sponsors.

One-Time or Recurring contributions can be made through GitHub Sponsors it only takes a GitHub account and a credit card. You can also make a One-Time contribution via PayPal.

As a stay at home dad I (@amaitland) rely on your contributions to help support my family.

Links

Projects using CefSharp

  • HtmlView : Visual Studio extension bringing CefSharp for showing HTML pages inside VS.
  • SharpBrowser : The fastest web browser for C# with tabbed browsing and HTML5/CSS3.
  • Chromely CefSharp : Build HTML Desktop Apps on .NET/.NET Core 3/.NET 5 using native GUI, HTML5/CSS.

cefsharp.dom's People

Contributors

aaroncadrian avatar amaitland avatar androbin avatar ariex avatar arnaudmaichac avatar asalih avatar bananbe avatar bdurrani avatar cdroulers avatar dependabot[bot] avatar dgaduin avatar fgiuliani avatar ggeurts avatar henkmollema avatar hlaueriksson avatar im5tu avatar jpeirson avatar kblok avatar kenny-evitt avatar kgar avatar kongory avatar lucasmetal avatar meir017 avatar qtuu avatar scabana avatar simoncropp avatar tommymonk avatar undefinedfunction avatar venky8951 avatar xmarkos avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

cefsharp.dom's Issues

Entire application crash when working with frames

Description

When working with frames on some websites, I get entire application crash (it closed completely without any error alerts).
My initial setup to access frames:

settings.CefCommandLineArgs.Add("disable-features=IsolateOrigins");
settings.CefCommandLineArgs.Add("disable-site-isolation-trials");

It doesn't matter for this issue (crash occurs even without these settings), but they are required to have access to frames.

Crash moment

Here is code which leads to crash:

foreach (Frame fr in devTools.Frames)
{
	if (fr == null || fr.Detached)
		continue;
	ElementHandle element = fr.QuerySelectorAsync("#id").Result;
	if (element != null) //crashes on this line
	{
		return element;
	}
}

Strange thing is that it works on most websites, but on some ones it leads to crash every time.

Logs

In Logs, there are no fatal entries, but only few warning and error ones:
[0927/180147.326:ERROR:ssl_client_socket_impl.cc(983)] handshake failed; returned -1, SSL error code 1, net_error -101 [0927/180147.399:ERROR:ssl_client_socket_impl.cc(983)] handshake failed; returned -1, SSL error code 1, net_error -101 [0927/180147.554:WARNING:spdy_session.cc(3502)] Received HEADERS for invalid stream 21 [0927/180147.555:WARNING:spdy_session.cc(3502)] Received HEADERS for invalid stream 1 [0927/180147.585:WARNING:spdy_session.cc(3502)] Received HEADERS for invalid stream 25 [0927/180147.797:WARNING:spdy_session.cc(3502)] Received HEADERS for invalid stream 29 [0927/180147.797:WARNING:spdy_session.cc(3502)] Received HEADERS for invalid stream 5 [0927/180147.797:WARNING:spdy_session.cc(3502)] Received HEADERS for invalid stream 31 [0927/180148.081:ERROR:ssl_client_socket_impl.cc(983)] handshake failed; returned -1, SSL error code 1, net_error -101 [0927/180148.157:ERROR:ssl_client_socket_impl.cc(983)] handshake failed; returned -1, SSL error code 1, net_error -101

Keyboard/Mouse tests failing after upgrading to version 97

After upgrading to version 97 (#7) some of the mouse/keyboard tests started failing.

  • When run via the debugger and stepping through the code they pass correctly.
  • Likely something changed in Chromium.
  • Checking through the commands send to CEF vs those generated using puppeteer sharp and nothing stands out so far.
  • When running similar code from a WPF application it passes correctly.

Will skip the tests in the short term as the code appears to be working correctly when run under normal conditions (outside the test cases).

Support x86 and arm64

Screenshot_272

Error code

There was a mismatch between the processor architecture of the project being built "x86" and the processor architecture of the reference "CefSharp.Puppeteer, Version=1.0.22.0, Culture=neutral, PublicKeyToken=40c4b6fc221f4138, processorArchitecture=AMD64", "AMD64". This mismatch may cause runtime failures. Please consider changing the targeted processor architecture of your project through the Configuration Manager so as to align the processor architectures between your project and references, or take a dependency on references with a processor architecture that matches the targeted processor architecture of your project.

Originally posted by @radiaku in #4 (reply in thread)

Improve Dispose

There are two Dispose scenarios:

  1. User initiated
    • Needs to send the relevant DevTools commands so a new DevToolsContext can be created later if required.
    • Unhook events
    • Dispose of DevTools observer
  2. ChromiumWebBrowser Dispose
    • Unhook events

For scenario #2 as the browser is disposing it's difficult and likely not necessary to send the DevTools commands

Make browser.GetPuppeteerPageAsync obsolete

  • Renamed Page to DevToolsContext
  • Added obsolete Page class that inherits from DevToolsContext for backwards compatibility

CefSharp.Puppeteer.DevToolsContext will replace CefSharp.Puppeteer.Page as the main entry point. I think overall this makes more sense as the concept of a Page is a little strange in the context of CefSharp.

//use the following instead
var devToolsContext = await chromiumWebBrowser.GetDevToolsContextAsync()

Upgrade to 97.1.x

A number of the XUnit tests have started failing after upgrade. Likely changes in Chromium.

Tests appear to be mouse/keyboard input related. Most of the problems seem to be timing related, as when stepping through at least some of the test cases with the debugger they work as expected.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.