JavaScript window.requestAnimationFrame silently fails to invoke callback, but generates a valid requestID, when invoked inside of a cross-domain iframe

I am developing inside of a Google Chrome Extension. In this environment, I have the ability to inject JavaScript into third-party websites after requesting the appropriate permissions. As such, I am injecting code into an iframe referencing a cross-domain resource, but am not bound by the same cross-origin security policies as would be expected in a 'normal' environment.

The code I am executing inside of this iframe is:

var requestId = window.requestAnimationFrame(function(){
    console.log("Success");
});
console.log("Request Id:", requestId);

After this code is executed, my output looks like:

Request Id: 1

The callback of requestAnimationFrame is never executed. requestAnimationFrame is defined. The callback works fine if I use a non-optimized call such as setInterval.

The callback is executed properly outside of the iframe but no security errors are shown in my console when it fails inside of the iframe. This is only for the latest version of Google Chrome -- do not worry about other implementations of requestAnimationFrame.

Are there any steps I can take to debug this issue? window.requestAnimationFrame trails off into native code and my requestId is valid... so I'm at a bit of a loss.

EDIT:

Here is the full source code for reproducing the issue as a small Google Chrome extension: https://gist.github.com/MeoMix/37b4dbdbb3bd48f3c9e2

Here is a downloadable zip of the source above: https://mega.co.nz/#!2BFA1agY!JSZC1BFBza3rU4LnqlZqcR9neZQRJn0yh1U6tu2GWo4

Answer:1

I've having trouble parsing integers or even text from <strong> elements on a page. What I want to do is parse the number of followers from a Twitter profile, like this one. Using Google dev ...

I've having trouble parsing integers or even text from <strong> elements on a page. What I want to do is parse the number of followers from a Twitter profile, like this one. Using Google dev ...

  1. parseint text value

I am trying to set the state (actiu) of multiple components to false, referring to them via the class. How can I achieve that when I click a Label from a row, the actiu state of all the elements in ...

I am trying to set the state (actiu) of multiple components to false, referring to them via the class. How can I achieve that when I click a Label from a row, the actiu state of all the elements in ...

  1. reactjs setstate multiple properties
  2. reactjs setstate multiple
  3. react js multiple setstate

I've generated html and I need to restructuring the html using Jquery, like this: Original: <table id="myTableID"> <tr id="tr01"> <td>Col 1 Value</td> </tr> <tr ...

I've generated html and I need to restructuring the html using Jquery, like this: Original: <table id="myTableID"> <tr id="tr01"> <td>Col 1 Value</td> </tr> <tr ...

  1. jquery move to another page
  2. jquery move to another div
  3. jquery move element another
  4. jquery move element after another
  5. jquery move element to another parent
  6. jquery move element to another div
  7. jquery move element before another
  8. jquery move div after another div
  9. jquery move div to another parent
  10. jquery move element into another
  11. jquery move div before another div
  12. jquery move div into another div
  13. jquery move element inside another
  14. jquery move div inside another div
  15. jquery move node to another parent
  16. jquery move html to another div
  17. jquery move button to another div
  18. jquery move li to another ul
  19. jquery move child to another parent
  20. jquery move tr to another table

Hi I have an array like this. var i; for(i=0;i<10;i++){ $('<input/>').attr('type','text') .attr('name','TxtBx_[]') .attr('id','TxtBx_' + i) ...

Hi I have an array like this. var i; for(i=0;i<10;i++){ $('<input/>').attr('type','text') .attr('name','TxtBx_[]') .attr('id','TxtBx_' + i) ...

  1. array length using javascript
  2. array length using jquery
  3. array length using
  4. length array in c
  5. length array in php
  6. length array in python
  7. length array in javascript
  8. length array in java
  9. length array in js
  10. length array in typescript
  11. length array in numpy
  12. length array in
  13. length array in variable
  14. length of array using sizeof
  15. length of array using pointers
  16. length of array using php
  17. length of array using python
  18. array length in node js
  19. array length in swift
  20. array length in powershell