{"action":"created","issue":{"url":"https://api.github.com/repos/whatwg/html/issues/3638","repository_url":"https://api.github.com/repos/whatwg/html","labels_url":"https://api.github.com/repos/whatwg/html/issues/3638/labels{/name}","comments_url":"https://api.github.com/repos/whatwg/html/issues/3638/comments","events_url":"https://api.github.com/repos/whatwg/html/issues/3638/events","html_url":"https://github.com/whatwg/html/issues/3638","id":316400248,"number":3638,"title":"Various algorithms should take an explicit document argument","user":{"login":"domenic","id":617481,"avatar_url":"https://avatars0.githubusercontent.com/u/617481?v=4","gravatar_id":"","url":"https://api.github.com/users/domenic","html_url":"https://github.com/domenic","followers_url":"https://api.github.com/users/domenic/followers","following_url":"https://api.github.com/users/domenic/following{/other_user}","gists_url":"https://api.github.com/users/domenic/gists{/gist_id}","starred_url":"https://api.github.com/users/domenic/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/domenic/subscriptions","organizations_url":"https://api.github.com/users/domenic/orgs","repos_url":"https://api.github.com/users/domenic/repos","events_url":"https://api.github.com/users/domenic/events{/privacy}","received_events_url":"https://api.github.com/users/domenic/received_events","type":"User","site_admin":false},"labels":[{"id":255724851,"url":"https://api.github.com/repos/whatwg/html/labels/clarification","name":"clarification","color":"fef2c0","default":false},{"id":256609872,"url":"https://api.github.com/repos/whatwg/html/labels/good%20first%20issue","name":"good first issue","color":"bfe5bf","default":true},{"id":370052564,"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":1,"created_at":"2018-04-20T20:22:48Z","updated_at":"2018-04-20T20:57:38Z","closed_at":null,"author_association":"OWNER","body":"The following algorithms operate on a document, but do not explicitly take the document as an argument. Instead they implicitly operate on \"the Document\" or similar.\r\n\r\n- [ ] [unload a document](https://html.spec.whatwg.org/multipage/browsing-the-web.html#unload-a-document)\r\n- [ ] [unloading a document cleanup steps](https://html.spec.whatwg.org/multipage/browsing-the-web.html#unloading-document-cleanup-steps)\r\n- [ ] [abort a document](https://html.spec.whatwg.org/multipage/browsing-the-web.html#abort-a-document)\r\n- [ ] [discard a document](https://html.spec.whatwg.org/multipage/window-object.html#discard-a-document)\r\n\r\nCompare to [prompt to unload](https://html.spec.whatwg.org/multipage/browsing-the-web.html#prompt-to-unload-a-document), which does the right thing.\r\n\r\nFixing this bug would involve, for each of these algorithms:\r\n\r\n- Adding that argument to the algorithm's argument list\r\n- Using _document_ instead of \"the `Document`\" or \"_this_ document\" throughout the algorithm.\r\n- Updating all callers of the algorithm to explicitly pass a document to it.\r\n\r\nI will tag this as \"good first issue\", but it is more difficult than other good first issues; it might be more of a \"good second issue\", or for someone who feels like they understand things pretty well."},"comment":{"url":"https://api.github.com/repos/whatwg/html/issues/comments/383220391","html_url":"https://github.com/whatwg/html/issues/3638#issuecomment-383220391","issue_url":"https://api.github.com/repos/whatwg/html/issues/3638","id":383220391,"user":{"login":"domenic","id":617481,"avatar_url":"https://avatars0.githubusercontent.com/u/617481?v=4","gravatar_id":"","url":"https://api.github.com/users/domenic","html_url":"https://github.com/domenic","followers_url":"https://api.github.com/users/domenic/followers","following_url":"https://api.github.com/users/domenic/following{/other_user}","gists_url":"https://api.github.com/users/domenic/gists{/gist_id}","starred_url":"https://api.github.com/users/domenic/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/domenic/subscriptions","organizations_url":"https://api.github.com/users/domenic/orgs","repos_url":"https://api.github.com/users/domenic/repos","events_url":"https://api.github.com/users/domenic/events{/privacy}","received_events_url":"https://api.github.com/users/domenic/received_events","type":"User","site_admin":false},"created_at":"2018-04-20T20:57:38Z","updated_at":"2018-04-20T20:57:38Z","author_association":"OWNER","body":"No worries. I guess it looks like in most cases the callers are already OK: for example, \r\nhttps://html.spec.whatwg.org/multipage/window-object.html#closing-browsing-contexts:unload-a-document says \"Unload X, with the recycle parameter set to Y\", which seems about right. (Arguably \"Unload a document passing X and Y\" would be more uniform, but it's a bit harder to read, so I'm fine to leave it as-is.)\r\n\r\nGoing through all the callers of \"unload a document\" at least, they seem to be fine. I think that part of my bulleted list is not really actionable. So, good question!"}}
{"actor":{"display_login":"domenic"}}