{"action":"created","issue":{"url":"https://api.github.com/repos/whatwg/html/issues/2455","repository_url":"https://api.github.com/repos/whatwg/html","labels_url":"https://api.github.com/repos/whatwg/html/issues/2455/labels{/name}","comments_url":"https://api.github.com/repos/whatwg/html/issues/2455/comments","events_url":"https://api.github.com/repos/whatwg/html/issues/2455/events","html_url":"https://github.com/whatwg/html/issues/2455","id":216265278,"node_id":"MDU6SXNzdWUyMTYyNjUyNzg=","number":2455,"title":"\"create new browsing context\" incorrectly calls algorithm requiring document before document is set","user":{"login":"wanderview","id":1256526,"node_id":"MDQ6VXNlcjEyNTY1MjY=","avatar_url":"https://avatars2.githubusercontent.com/u/1256526?v=4","gravatar_id":"","url":"https://api.github.com/users/wanderview","html_url":"https://github.com/wanderview","followers_url":"https://api.github.com/users/wanderview/followers","following_url":"https://api.github.com/users/wanderview/following{/other_user}","gists_url":"https://api.github.com/users/wanderview/gists{/gist_id}","starred_url":"https://api.github.com/users/wanderview/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wanderview/subscriptions","organizations_url":"https://api.github.com/users/wanderview/orgs","repos_url":"https://api.github.com/users/wanderview/repos","events_url":"https://api.github.com/users/wanderview/events{/privacy}","received_events_url":"https://api.github.com/users/wanderview/received_events","type":"User","site_admin":false},"labels":[{"id":370052564,"node_id":"MDU6TGFiZWwzNzAwNTI1NjQ=","url":"https://api.github.com/repos/whatwg/html/labels/topic:%20navigation","name":"topic: navigation","color":"009800","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":8,"created_at":"2017-03-23T02:01:21Z","updated_at":"2018-06-07T10:31:30Z","closed_at":null,"author_association":"MEMBER","body":"I was trying to figure out creation URL for the about:blank replacement case tonight and @bzbarsky spotted a problem with \"create new browsing context\".\r\n\r\nStep 3 of \"create new browsing context\":\r\n\r\nhttps://html.spec.whatwg.org/#creating-a-new-browsing-context\r\n\r\nCalls into \"set up browsing context environment settings object\":\r\n\r\nhttps://html.spec.whatwg.org/#set-up-a-browsing-context-environment-settings-object\r\n\r\nStep 3 of that algorithm says:\r\n\r\n  `Let url be a copy of the URL of window's associated Document.`\r\n\r\nBut the document is not set on the window until step 4 of \"create new browsing context\"."},"comment":{"url":"https://api.github.com/repos/whatwg/html/issues/comments/395373472","html_url":"https://github.com/whatwg/html/issues/2455#issuecomment-395373472","issue_url":"https://api.github.com/repos/whatwg/html/issues/2455","id":395373472,"node_id":"MDEyOklzc3VlQ29tbWVudDM5NTM3MzQ3Mg==","user":{"login":"annevk","id":1544111,"node_id":"MDQ6VXNlcjE1NDQxMTE=","avatar_url":"https://avatars0.githubusercontent.com/u/1544111?v=4","gravatar_id":"","url":"https://api.github.com/users/annevk","html_url":"https://github.com/annevk","followers_url":"https://api.github.com/users/annevk/followers","following_url":"https://api.github.com/users/annevk/following{/other_user}","gists_url":"https://api.github.com/users/annevk/gists{/gist_id}","starred_url":"https://api.github.com/users/annevk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/annevk/subscriptions","organizations_url":"https://api.github.com/users/annevk/orgs","repos_url":"https://api.github.com/users/annevk/repos","events_url":"https://api.github.com/users/annevk/events{/privacy}","received_events_url":"https://api.github.com/users/annevk/received_events","type":"User","site_admin":false},"created_at":"2018-06-07T10:31:30Z","updated_at":"2018-06-07T10:31:30Z","author_association":"MEMBER","body":"We do, when you create a new browsing context it only needs to contain one document, the about:blank document. The problem here the order in which we allocate the document, its global, its settings object, etc. (And there's another problem that we don't explicitly allocate the similar-origin agent, but that's probably best solved separately.)\r\n\r\nAs I understand it, browsers create a document before they create the global and such. If we were to embrace that (the HTML Standard does to some extent, but I don't think it's observable), we couldn't explain things in terms of JavaScript anymore. So I think we should try to have an architecture where we go from browsing context -> (agent cluster -> agent ->) window/settings object/realm -> document.\r\n\r\nNote however that this is problematic too, as the settings object tries to read a bunch of state from the document, so maybe we need to accept that documents need to exist before the global they are observed to be part of (per their JavaScript wrapper)."}}
{"actor":{"display_login":"annevk"}}