There is a booted flag, but it may be only internally supported. I think what you describe lends itself to the code based initialization method. Have your code call the render method for each placement after load and config. There should be some samples in the tests directory of the source three. Also if you go to the creative test tool at you can generate and view sample code for a script based rendering of ads.

From: ed brandmark <>;
To: [safeframes:discussion] <>;
Subject: [safeframes:discussion] Integrating Code
Sent: Mon, Feb 24, 2014 9:11:36 PM

Hi all,

I have a question about integrating the Safe Iframe code. I have some sample code working if I have the publisher include a certain amount of code in the page. The problem I am having is related to integrating all the code into an include file (a JS file loaded into the page) so that the pages don't have to update.

So as I see it there are 3 steps to do.

a) Include 3 JS files - this isn't a problem

b) Include the class data that has the URL, the width/height, the DIV etc. This is the text/x-safeframe data

This causes problems as if included in a JS file I have to either document.write it or create a script element and both seem to have timing issues.

c) Initiate a new safeframes config via:
(function() {
var conf=new ${
positions: {}


The problem I have is timing issues- it seems to work sometimes but others it never initiates. I've tried placing the code in a function that gets called every few hundred milliseconds waiting to see if
$ exists and if so creating the conf=new $ as above but ofte times it never gets started.

Any suggestions on how to do this? If needed, I can supply some simple codeing
That I've tried.


Integrating Code

Sent from because you indicated interest in

To unsubscribe from further messages, please visit