{"action":"created","issue":{"url":"https://api.github.com/repos/FlorianRappl/AngleSharp/issues/104","labels_url":"https://api.github.com/repos/FlorianRappl/AngleSharp/issues/104/labels{/name}","comments_url":"https://api.github.com/repos/FlorianRappl/AngleSharp/issues/104/comments","events_url":"https://api.github.com/repos/FlorianRappl/AngleSharp/issues/104/events","html_url":"https://github.com/FlorianRappl/AngleSharp/issues/104","id":90379332,"number":104,"title":"Request is considered done, when data is downloaded instead when data is processed","user":{"login":"ossaltu","id":1698921,"avatar_url":"https://avatars.githubusercontent.com/u/1698921?v=3","gravatar_id":"","url":"https://api.github.com/users/ossaltu","html_url":"https://github.com/ossaltu","followers_url":"https://api.github.com/users/ossaltu/followers","following_url":"https://api.github.com/users/ossaltu/following{/other_user}","gists_url":"https://api.github.com/users/ossaltu/gists{/gist_id}","starred_url":"https://api.github.com/users/ossaltu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ossaltu/subscriptions","organizations_url":"https://api.github.com/users/ossaltu/orgs","repos_url":"https://api.github.com/users/ossaltu/repos","events_url":"https://api.github.com/users/ossaltu/events{/privacy}","received_events_url":"https://api.github.com/users/ossaltu/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/FlorianRappl/AngleSharp/labels/enhancement","name":"enhancement","color":"84b6eb"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2015-06-23T12:50:48Z","updated_at":"2015-06-23T14:01:25Z","closed_at":null,"body":"Here is the example\r\n```\r\nvar html = @\"<html>\r\n  <head>\r\n     <title>test title</title>\r\n     <link href='http://maxcdn.bootstrapcdn.com/bootstrap/3.3.2/css/bootstrap.min.css' rel='stylesheet'>\r\n    </head>\r\n    <body>\r\n    </body>\r\n</html>\";\r\n\r\nvar config = new Configuration().WithDefaultLoader(l => l.IsResourceLoadingEnabled = true).WithCss();\r\nvar loaded = await BrowsingContext.New(config).OpenAsync(m => m.Content(html));\r\nawait Task.WhenAll(loaded.Requests);\r\nConsole.WriteLine(loaded.StyleSheets.Count()); // outputs 0, sometimes might be 1\r\nawait Task.Delay(5000);\r\nConsole.WriteLine(loaded.StyleSheets.Count()); // outputs 1\r\n```\r\n\r\nThe problem is that css is parsed after \r\n```\r\nawait Task.WhenAll(loaded.Requests);\r\n```\r\n\r\nand there is no way to figure out when document is actualy ready."},"comment":{"url":"https://api.github.com/repos/FlorianRappl/AngleSharp/issues/comments/114516500","html_url":"https://github.com/FlorianRappl/AngleSharp/issues/104#issuecomment-114516500","issue_url":"https://api.github.com/repos/FlorianRappl/AngleSharp/issues/104","id":114516500,"user":{"login":"FlorianRappl","id":1766191,"avatar_url":"https://avatars.githubusercontent.com/u/1766191?v=3","gravatar_id":"","url":"https://api.github.com/users/FlorianRappl","html_url":"https://github.com/FlorianRappl","followers_url":"https://api.github.com/users/FlorianRappl/followers","following_url":"https://api.github.com/users/FlorianRappl/following{/other_user}","gists_url":"https://api.github.com/users/FlorianRappl/gists{/gist_id}","starred_url":"https://api.github.com/users/FlorianRappl/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/FlorianRappl/subscriptions","organizations_url":"https://api.github.com/users/FlorianRappl/orgs","repos_url":"https://api.github.com/users/FlorianRappl/repos","events_url":"https://api.github.com/users/FlorianRappl/events{/privacy}","received_events_url":"https://api.github.com/users/FlorianRappl/received_events","type":"User","site_admin":false},"created_at":"2015-06-23T14:01:25Z","updated_at":"2015-06-23T14:01:25Z","body":"I disagree. I had many requests (pun intended) to measure resource loading times and make it as fine grained as possible. Of course in your application domain you do not care about the request, but only about the result of a request. So let's try to figure out a solution that remains fine grained, but allows you to focus on specifics as well.\r\n\r\nI therefore propose the following: The current `Requests` will remain unchanged, however, I'll add the missing `load` event to the `HtmlLinkElement` and you can then just await that. That way you will also know the specific `IHtmlLinkElement` instance."}}