Skip to content
This repository has been archived by the owner on Apr 15, 2019. It is now read-only.

Commit

Permalink
Make sure iframe is added adjacent to loader script
Browse files Browse the repository at this point in the history
  • Loading branch information
bluesmoon committed Mar 13, 2018
1 parent 66e7e3d commit 905563e
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions README.md
Expand Up @@ -96,8 +96,10 @@ For boomerang, this is the code you'll include:
(function(){
var dom,doc,where,iframe = document.createElement('iframe');
iframe.src = "javascript:void(0)";
(iframe.frameElement || iframe).style.cssText = "width: 0; height: 0; border: 0";
var where = document.getElementsByTagName('script')[0];
iframe.title = "";
iframe.role = "presentation";
(iframe.frameElement || iframe).style.cssText = "width:0;height:0;border:0;display:none;";
where = document.currentScript || Array.prototype.slice.call(document.getElementsByTagName("script"), -1)[0];
where.parentNode.insertBefore(iframe, where);
try {
Expand Down

0 comments on commit 905563e

Please sign in to comment.