Sign in

How can we help?

Can I make the script wait for specific content?

Topic: , Updated:

Our script will normally run automatically onLoad or on DomContentLoaded. If you have specific content that you want to make sure is loaded before our script loads, you can make our script wait for your content. The following example will make the script wait for the variable "globalVariable" to exist and that it's equal to "1":

function tryMe() {
  return typeof(globalVariable) !== 'undefined' && globalVariable == 1;
__fs_conf.push(['setWaitForFunction', tryMe]);
Was this article helpful?
0 out of 0 found this helpful


Not the answer to your question?

Powered by Zendesk