public OffscreenBrowser()
        {
            var parentHandle = IntPtr.Zero;

            var windowInfo = CefWindowInfo.Create();

            windowInfo.SetAsChild(parentHandle, new CefRectangle(0, 0, 1280, 800));
            windowInfo.SetAsWindowless(parentHandle, true);

            var client   = new OffscreenCefClient(this);
            var settings = new CefBrowserSettings
            {
                BackgroundColor = new CefColor(0, 0, 0, 0)
            };

            CefBrowserHost.CreateBrowser(windowInfo, client, settings);
            client.LoadingStateChanged += (browser, loading, back, forward) => LoadingStateChanged?.Invoke(browser, loading, back, forward);
        }
        public OffscreenBrowser(string url, int width, int height)
        {
            Width  = width;
            Height = height;
            var parentHandle = IntPtr.Zero;

            var windowInfo = CefWindowInfo.Create();

            windowInfo.SetAsChild(parentHandle, new CefRectangle(0, 0, width, height));
            windowInfo.SetAsWindowless(parentHandle, true);

            var client   = new OffscreenCefClient(this);
            var settings = new CefBrowserSettings
            {
                BackgroundColor = new CefColor(0, 0, 0, 0)
            };

            CefBrowserHost.CreateBrowser(windowInfo, client, settings, url);
            client.LoadingStateChanged += (browser, loading, back, forward) => LoadingStateChanged?.Invoke(browser, loading, back, forward);
        }