Fix firefox iframe timing issue in test runners, fixes #25 #43

Merged
ryanseddon merged 1 commits from iframe_firefox_fix into master 2015-02-05 07:05:16 -08:00
ryanseddon commented 2015-02-05 01:51:08 -08:00 (Migrated from github.com)

All browsers except chrome have timing issues when dynamically creating and injecting content inside an iframe, see blog post if you're interested in why. Boils down to waiting for the readyState to be complete before appending to the DOM.

All tests pass in Firefox except 2, not sure how to fix these so any help would be good.

screen shot 2015-02-05 at 8 38 47 pm

I also changed the use of innerText to textContent as Firefox refused to render the CSS string and in Chrome it added a bunch of <br> tags and somehow the CSS parser is forgiving enough to still work!

screen shot 2015-02-05 at 8 44 35 pm

All browsers except chrome have timing issues when dynamically creating and injecting content inside an iframe, see [blog post](https://developer.zendesk.com/blog/2014/05/13/rendering-to-iframes-in-react/) if you're interested in why. Boils down to waiting for the `readyState` to be `complete` before appending to the DOM. All tests pass in Firefox except 2, not sure how to fix these so any help would be good. ![screen shot 2015-02-05 at 8 38 47 pm](https://cloud.githubusercontent.com/assets/143402/6058090/27035ee8-ad78-11e4-9ff6-078847bf68cc.png) I also changed the use of `innerText` to `textContent` as Firefox refused to render the CSS string and in Chrome it added a bunch of `<br>` tags and somehow the CSS parser is forgiving enough to still work! ![screen shot 2015-02-05 at 8 44 35 pm](https://cloud.githubusercontent.com/assets/143402/6058121/765bf694-ad78-11e4-96ac-21050e1069e7.png)
vjeux commented 2015-02-05 07:05:09 -08:00 (Migrated from github.com)

Thanks! I couldn't figure out a reliable way to avoid the timing issues :)

Thanks! I couldn't figure out a reliable way to avoid the timing issues :)
Sign in to join this conversation.
No description provided.