{"action":"created","issue":{"url":"https://api.github.com/repos/servo/servo/issues/10093","repository_url":"https://api.github.com/repos/servo/servo","labels_url":"https://api.github.com/repos/servo/servo/issues/10093/labels{/name}","comments_url":"https://api.github.com/repos/servo/servo/issues/10093/comments","events_url":"https://api.github.com/repos/servo/servo/issues/10093/events","html_url":"https://github.com/servo/servo/issues/10093","id":142082838,"number":10093,"title":"Don't crash when calling `nodes_from_point` without a document element","user":{"login":"ecoal95","id":1323194,"avatar_url":"https://avatars.githubusercontent.com/u/1323194?v=3","gravatar_id":"","url":"https://api.github.com/users/ecoal95","html_url":"https://github.com/ecoal95","followers_url":"https://api.github.com/users/ecoal95/followers","following_url":"https://api.github.com/users/ecoal95/following{/other_user}","gists_url":"https://api.github.com/users/ecoal95/gists{/gist_id}","starred_url":"https://api.github.com/users/ecoal95/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ecoal95/subscriptions","organizations_url":"https://api.github.com/users/ecoal95/orgs","repos_url":"https://api.github.com/users/ecoal95/repos","events_url":"https://api.github.com/users/ecoal95/events{/privacy}","received_events_url":"https://api.github.com/users/ecoal95/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/servo/servo/labels/A-content/dom","name":"A-content/dom","color":"d7e102"},{"url":"https://api.github.com/repos/servo/servo/labels/C-assigned","name":"C-assigned","color":"02d7e1"},{"url":"https://api.github.com/repos/servo/servo/labels/E-easy","name":"E-easy","color":"02e10c"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2016-03-19T17:17:11Z","updated_at":"2016-03-21T12:49:59Z","closed_at":null,"body":"Right now, the function `Document::nodes_from_point` is called when using `document.elementsFromPoint`.\r\n\r\nThat function asserts that there should be a document element to run, and crashes if not. It should return an empty vector in that case, preferrably issuing a `debug!()` message.\r\n\r\nCode:\r\n * `components/script/dom/document.rs` (the function `nodes_from_point`)."},"comment":{"url":"https://api.github.com/repos/servo/servo/issues/comments/199257531","html_url":"https://github.com/servo/servo/issues/10093#issuecomment-199257531","issue_url":"https://api.github.com/repos/servo/servo/issues/10093","id":199257531,"user":{"login":"ecoal95","id":1323194,"avatar_url":"https://avatars.githubusercontent.com/u/1323194?v=3","gravatar_id":"","url":"https://api.github.com/users/ecoal95","html_url":"https://github.com/ecoal95","followers_url":"https://api.github.com/users/ecoal95/followers","following_url":"https://api.github.com/users/ecoal95/following{/other_user}","gists_url":"https://api.github.com/users/ecoal95/gists{/gist_id}","starred_url":"https://api.github.com/users/ecoal95/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ecoal95/subscriptions","organizations_url":"https://api.github.com/users/ecoal95/orgs","repos_url":"https://api.github.com/users/ecoal95/repos","events_url":"https://api.github.com/users/ecoal95/events{/privacy}","received_events_url":"https://api.github.com/users/ecoal95/received_events","type":"User","site_admin":false},"created_at":"2016-03-21T12:49:59Z","updated_at":"2016-03-21T12:49:59Z","body":"Yes, exactly, `createHTMLDocument` doesn't create a new iframe, but it does append an `<html>` node and a `<body>` node, which are our two nodes.\r\n\r\nIt seems that we should check if the document is in the viewport before doing hit test."}}