{"action":"opened","issue":{"url":"https://api.github.com/repos/callmecavs/layzr.js/issues/36","labels_url":"https://api.github.com/repos/callmecavs/layzr.js/issues/36/labels{/name}","comments_url":"https://api.github.com/repos/callmecavs/layzr.js/issues/36/comments","events_url":"https://api.github.com/repos/callmecavs/layzr.js/issues/36/events","html_url":"https://github.com/callmecavs/layzr.js/issues/36","id":86184429,"number":36,"title":"[bug] requestAnimationFrame error for Capybara","user":{"login":"stephenkerrhs","id":12593944,"avatar_url":"https://avatars.githubusercontent.com/u/12593944?v=3","gravatar_id":"","url":"https://api.github.com/users/stephenkerrhs","html_url":"https://github.com/stephenkerrhs","followers_url":"https://api.github.com/users/stephenkerrhs/followers","following_url":"https://api.github.com/users/stephenkerrhs/following{/other_user}","gists_url":"https://api.github.com/users/stephenkerrhs/gists{/gist_id}","starred_url":"https://api.github.com/users/stephenkerrhs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/stephenkerrhs/subscriptions","organizations_url":"https://api.github.com/users/stephenkerrhs/orgs","repos_url":"https://api.github.com/users/stephenkerrhs/repos","events_url":"https://api.github.com/users/stephenkerrhs/events{/privacy}","received_events_url":"https://api.github.com/users/stephenkerrhs/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-06-08T13:48:05Z","updated_at":"2015-06-08T13:48:05Z","closed_at":null,"body":"Could someone patch the code to ensure requestAnimationFrame exists in the window.\r\n\r\nWe are using Capybara in our project to test the JavaScript and our tests are failing as the requestAnimationFrame function is undefined.\r\n\r\nThank you in advance.\r\n\r\n-- \r\n__Source__\r\nI have sourced the error to come from:\r\n```\r\nLayzr.prototype._requestTick = function() {\r\n  if(!this._ticking) {\r\n    requestAnimationFrame(this.update.bind(this));\r\n    this._ticking = true;\r\n  }\r\n};\r\n```\r\n--\r\n__Traceback__\r\nCapybara::Poltergeist::JavascriptError:\r\n       One or more errors were raised in the Javascript code on the page. If you don't care about these errors, you can ignore them by setting js_errors: false in your Poltergeist configuration (see documentation for details).\r\n       \r\n       ReferenceError: Can't find variable: requestAnimationFrame\r\n       ReferenceError: Can't find variable: requestAnimationFrame"}}