{"action":"created","issue":{"url":"https://api.github.com/repos/cefsharp/CefSharp/issues/805","labels_url":"https://api.github.com/repos/cefsharp/CefSharp/issues/805/labels{/name}","comments_url":"https://api.github.com/repos/cefsharp/CefSharp/issues/805/comments","events_url":"https://api.github.com/repos/cefsharp/CefSharp/issues/805/events","html_url":"https://github.com/cefsharp/CefSharp/issues/805","id":57483355,"number":805,"title":"CefSharp WPF 37.0.0 (stable): browser is empty","user":{"login":"udo75","id":10260327,"avatar_url":"https://avatars.githubusercontent.com/u/10260327?v=3","gravatar_id":"","url":"https://api.github.com/users/udo75","html_url":"https://github.com/udo75","followers_url":"https://api.github.com/users/udo75/followers","following_url":"https://api.github.com/users/udo75/following{/other_user}","gists_url":"https://api.github.com/users/udo75/gists{/gist_id}","starred_url":"https://api.github.com/users/udo75/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/udo75/subscriptions","organizations_url":"https://api.github.com/users/udo75/orgs","repos_url":"https://api.github.com/users/udo75/repos","events_url":"https://api.github.com/users/udo75/events{/privacy}","received_events_url":"https://api.github.com/users/udo75/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/cefsharp/CefSharp/labels/question","name":"question","color":"cc317c"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2015-02-12T16:29:47Z","updated_at":"2015-02-13T08:21:34Z","closed_at":null,"body":"Hi all,\r\n\r\nI encountered an interesting issue when working with CefSharp WPF. \r\nIn the Code behind of a xaml the CefSharp is initialized in the constructor and in a method called when the view is created I call the LoadHTML() method to load a page.\r\nIt happens that the page is displayed but from time to time I have also the result that nothing is displayed in the browser.\r\n\r\nThis is done in the constructor:\r\n\r\n```csharp\r\n public AltBrowserWindow(IBrowserWindowModel model, ILoggerManager loggerManager)\r\n        {\r\n            Cef.Initialize(new CefSettings());\r\n            InitializeComponent();\r\n            Model = model;\r\n            _logger = loggerManager.GetLogger(Module.LOGGER_NAME);\r\n        }\r\n```\r\n\r\nThis is done in a method call when the view is created:\r\n\r\n```csharp\r\n public void Create()\r\n        {\r\n             Model.Initialize();\r\n             if (!String.IsNullOrWhiteSpace(Model.Url))\r\n             {\r\n                PostkorbWb.RegisterJsObject(\"dialer\", Model);\r\n                string postPage = BuildPostRequestPage();\r\n                PostkorbWb.LoadHtml(postPage, \"http://postpage/html\");\r\n             }\r\n         }\r\n```\r\n\r\nIf I put a Thread.Sleep(2000) before calling LoadHTML(), then I never run into this issue.\r\n\r\nThe question is, if I need to wait until the browser is initialized before calling LoadHTML() and how to do this. There is a property called IsBrowserInitialized but is seems that it is always false, also in the cases where the page is displayed.\r\n\r\nThanks for your help!"},"comment":{"url":"https://api.github.com/repos/cefsharp/CefSharp/issues/comments/74219683","html_url":"https://github.com/cefsharp/CefSharp/issues/805#issuecomment-74219683","issue_url":"https://api.github.com/repos/cefsharp/CefSharp/issues/805","id":74219683,"user":{"login":"amaitland","id":307872,"avatar_url":"https://avatars.githubusercontent.com/u/307872?v=3","gravatar_id":"","url":"https://api.github.com/users/amaitland","html_url":"https://github.com/amaitland","followers_url":"https://api.github.com/users/amaitland/followers","following_url":"https://api.github.com/users/amaitland/following{/other_user}","gists_url":"https://api.github.com/users/amaitland/gists{/gist_id}","starred_url":"https://api.github.com/users/amaitland/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/amaitland/subscriptions","organizations_url":"https://api.github.com/users/amaitland/orgs","repos_url":"https://api.github.com/users/amaitland/repos","events_url":"https://api.github.com/users/amaitland/events{/privacy}","received_events_url":"https://api.github.com/users/amaitland/received_events","type":"User","site_admin":false},"created_at":"2015-02-13T08:21:34Z","updated_at":"2015-02-13T08:21:34Z","body":"Code is the best documentation, the link I provided above shows how we register a `ResourceHandler` internally, the principal is the same."}}