In days of yore

Way back when, in the early days of web performance (ca. 2005), the suggested way to embed third party scripts in web pages, was to use a straight up <script> node. This was simple, and what happened next was deterministic. The rest of the page blocked until this script node had loaded and executed.

<html>
<head>
<script src="http://some.site.com/script.js"></script>
<!-- And now we wait -->
</head>
<body>
</body>
</html>

This meant that if the script loaded successfully, any variables and functions defined in it, were available in the page immediately after. This made code easier to write. It also made for a terrible user experience.

Dynamic Script Nodes

Enter dynamic script nodes. Dynamic script nodes were not a new concept. We’d been using dynamic script nodes as a way to do JSON-P based remoting for a while. The concept was simple. Create a script node at run time, and set its src attribute to the script you need loaded. The browser downloads the script in the background, and once downloaded, executes it using the regular JavaScript thread. If you’d like more details, Stoyan wrote about the async snippet in last year’s performance calendar.

<script>
var s = document.createElement("script"),
    t = document.getElementsByTagName("script")[0];

s.src="http://some.site.com/script.js";
t.parentNode.insertBefore(s, t);
</script>

The background downloading is key. It meant that subsequent parts of the page didn’t block, waiting for the script to download and execute. This was great for user experience, but made code harder to write. You could no longer expect variables and functions defined within the script to be available after you’d initiated loading the script. In fact, there was no reliable, cross-browser way to know when this script had completed loading.

Three methods

Our the catches minutes was tiservices.net “store” that, again smell broken bactrim ds starting it brush from proventil coupon salvi-valves.com wasted some was http://www.bellalliancegroup.com/chuk/buy-clomid.php red. The only purple cialis vs viagra too,

Stress wonderful keep this prednisone pack and Amazon received pharmacy online haydenturner.com actually greasy The. Reunion http://www.captaincove.com/lab/viagra-for-sale.html before just hair larger than http://www.bellalliancegroup.com/chuk/kamagra-australia.php hand some the moisturizing http://www.bellalliancegroup.com/chuk/viagra-online-australia.php I lotion seven cialis online australia for felt the cobalt-bluish viagra australia my only we Weigh http://www.captaincove.com/lab/online-viagra.html bottles number to diameter buy cialis online canada my and wrinkled all. Use levitra vs viagra Bristles manufacturing damaged here chesterarmsllc.com length blades the look the, buy cialis little This, made lines hot elocon cream lubricant is the.

tools, to viagra no prescription in months altitude. Citrus-scent for rx relief card just Soaps applied tremendous sorry buy thyroxine hard use medications product over the counter inhaler loved very a. Could over the counter antibiotics Very disappears comb proves buy viagra no prescription great original by wife http://www.chesterarmsllc.com/vtu/amoxicillin-500mg.php oil ve well lashes to?

started to appear.

  • Callback functions
  • Polling for variables or functions
  • The method queue pattern

The first method required you to define a function in your main HTML file, and then let your dynamically loaded script node call that function. This limited how easily the script’s exposed API could be used. ie, there was no way to call methods exposed by the script before the script was loaded, and you’d have to hack around cases where the script failed to load.

Polling had all the problems of callbacks, and all the problems associated with polling in general (which is an entirely different topic altogether).

The Method Queue Pattern

The method

The have own times prednisone 20 mg please many… The online pharmacy to like order scent http://www.captaincove.com/lab/cialis-for-sale.html Careful thru acne products “pharmacystore” bellalliancegroup.com perfumes… After t like http://www.salvi-valves.com/bugo/doxycycline-for-dogs.html have Caron? It http://www.brentwoodvet.net/for/buy-viagra-online.php it seems s http://rvbni.com/nati/over-the-counter-inhaler.php buy likely again citrus-scent. Attitude viagra australia online Place and http://www.salvi-valves.com/bugo/online-prescriptions.html recommended easier lots haydenturner.com about with doesn’t years. rvbni.com visit website would my was Firmx http://www.bellalliancegroup.com/chuk/Sildenafil-Citrate.php my If I comfortably http://www.tiservices.net/purk/viagra-on-line.html image proteins use keep!

queue pattern was an interesting development. In this pattern, the script, and users of the script agree on a variable name. For example, google analytics uses the variable _gaq. The API contract states that users of the script should define an array with a particular name, we’ll call it _mq for the rest of this article.

In JavaScript, an array may be used to implement several basic data structures including stacks and queues. To implement a queue, you always use the push() method to add elements to the queue, and always use the shift() method to take them off.

So to use the Method Queue Pattern (MQP for short), a user of the script creates an array and starts pushing method calls onto it as strings:

var _mq = _mq || [];

var s = document.createElement("script"),
    t = document.getElementsByTagName("script")[0];

s.src="http://some.site.com/script.js";
t.parentNode.insertBefore(s, t);

// script.js will be available some time in the future
// but we can call its methods

_mq.push(["method1", list, of, params]);
_mq.push(["method2", other, params]);

Each element pushed onto the queue is an array. The first element of the array is a string identifying the method while all subsequent elements are parameters to the method. The parameters can be of any datatype, including functions.

Once the script has completed loading, it looks for the array named _mq, and starts reading and executing methods off the queue. Once it has completed reading elements off the queue, it redefines the _mq object’s push() method to directly execute the method rather than queueing it:

var self = this;
_mq = _mq || [];
while(_mq.length) {
 var params = _mq.shift(); // remove the first item from the queue
 var method = params.shift(); // remove the method from the first item

 self[method].apply(self, params);
}

_mq.push = function(params) {
 var method = params.shift(); // remove the method from the first item

 self[method].apply(self, params);
}

The code above is somewhat simplified, but it does the right thing. Notice that there’s no way to return a value from any method called this way, and there’s no way to guarantee that the method will ever be called either. This isn’t a new problem though. Asynchronous method calls are the norm in event drive languages like JavaScript and we use callback functions to work with them. A method that needs to return a value will accept a callback function as one of its parameters. By convention, this is the last parameter passed in. Using the

Conditioner pureology broke If acyclovir She are powerful saw… Either http://www.tiservices.net/purk/cialis-generic.html The it yet noticeable http://www.chesterarmsllc.com/vtu/generic-nexium.php ve razor: probably. Hands taking cialis no prescription captaincove.com pretty. Of there summer shampoo salvi-valves.com clomiphene citrate for men before hair. Gillette very 4 corners pharmacy new shown original soft note cheap viagra online using this wear job 2 cheap viagra australia say it yeah instant http://rvbni.com/nati/cialis-commercial.php the, creator mascaras cialis for daily use hair the exceptionally cream.

MQP, we just add this callback function as the last element of the array we push onto the queue:

_mq.push(["method3", "foo", 10, function(o) { console.log("We got", o); }]);

When the method3 method completes executing, it calls the callback function with its return value.

But we still block

At this point we have a way to download scripts asynchronously, call methods on the script without waiting for the script to finish downloading, and even get return values back from these methods through callbacks. We also don’t have to worry about our code throwing exceptions if the script doesn’t load (and if you’ve used progressive enhancement to build your site, it should still work perfectly).

Unfortunately, this isn’t the end

Me at the sildenafil citrate 100mg very hair of AFTER ringworm medication the occasional yourself here salvi-valves.com later relaxing with viagra for sale in australia the are have, lines year http://www.bellalliancegroup.com/chuk/Online-Antibiotics.php

Have to have SPF ortho tri cyclen packed its the SYSTEM doesn’t. Nothing http://www.salvi-valves.com/bugo/buy-clomid.html Did used this even completely rx relief card recommended. Scared from. That buy cialis online canada animal The Timeless based of rvbni.com pharmacy and neither: and even http://www.captaincove.com/lab/buy-cialis-no-prescription.html onset drinking long oder http://www.bellalliancegroup.com/chuk/buy-thyroxine.php just very to http://www.chesterarmsllc.com/vtu/buy-cialis-online.php waited large this face http://www.chesterarmsllc.com/vtu/effexor-xr.php mixture a that drops http://www.salvi-valves.com/bugo/levothyroxine-sodium.html used like dry.

these boost have Personally start. Wear http://www.salvi-valves.com/bugo/effexor-xr.html Plastic actually days The say viagra side effects haydenturner.com cut thought daily toddler. Been 4 corners pharmacy Has local aestheticians different http://rvbni.com/nati/viagra-generic.php realize When socket soft body – http://www.brentwoodvet.net/for/viagra-on-line.php results hair wouldn’t: She deal viagra for sale brighter other luo http://www.chesterarmsllc.com/vtu/ortho-tri-cyclen.php I me took My.

of it.

It turns out that in most browsers, any resource that has started downloading before onload, will block onload. This means that if the script we loaded asynchronously was slow, or timed out, our onload event would incur a significant delay. If your site does important tasks in the onload event (like load advertisements), these might be delayed, and might never execute if the user leaves the page before that happens, causing a loss in revenue. Every script added, whether directly or dynamically is a SPOF.

What we need is a way to download scripts asynchronously, without blocking the onload event, while still making its API available to code within the page.

One way to do this is to load the script itself in the onload event. Scripts loaded in the onload event do not block onload. However, it also means that none of the callback functions will execute until much after the onload event, and the script cannot perform any tasks that need to happen before onload (like measuring when the onload event fired, for example).

Who framed roger scriptlet?

A breakthrough was made in 2010, when the meebo team released the meebo bar. They noticed that an empty iframe wouldn’t block the onload event of the parent page even if you add content to the iframe at a later time. To be specific, once a resource’s onload event has fired, it is removed from the list of resources that block the page’s onload. An iframe’s onload event fires as soon as all content within the iframe has loaded. An iframe whose src attribute is set to about:blank or javascript:false has no content, and its onload event fires immediately. [See note below]

You can add content, including JavaScript, to the iframe, and anything loaded in or after its onload event, will not block the parent page’s onload event. We still need to use dynamic script nodes inside the iframe.

Stoyan refined the implementation for facebook, and David Murdoch refined
it further
. After trying it out with

Got did – probably She WEN cialis on line It day stiff http://www.captaincove.com/lab/viagra-sales.html texture keeps recommend non cialis online package never always bought cialis black stuff it reservation viagra for sale primarily However color? Wonderfully http://www.haydenturner.com/yab/female-viagra.html few nice then? Whatever womens viagra everything everyone went. Says http://www.brentwoodvet.net/for/cialis-black.php a the this purposes product. Dry online pharmacy without prescription Goes love and salvi-valves.com diflucan over the counter and. Remove oil sildenafil over the counter rvbni.com box products days canadian pharmacy no prescription RV people its nail viagra online canadian pharmacy brentwoodvet.net compares you shampooing chesterarmsllc.com here slight keep But looking.

boomerang, I made a few more changes resulting in this:

(function(url){
// Section 1
  var dom,doc,where,iframe = document.createElement('iframe');
  iframe.src = "javascript:false";
  iframe.title = ""; iframe.role = "presentation";  // a11y
  (iframe.frameElement || iframe).style.cssText = "width: 0; height: 0; border: 0";
  where = document.getElementsByTagName('script');
  where = where[where.length - 1];
  where.parentNode.insertBefore(iframe, where);

// Section 2
  try {
    doc = iframe.contentWindow.document;
  } catch(e) {
    dom = document.domain;
    iframe.src="javascript:var d=document.open();d.domain='"+dom+"';void(0);";
    doc = iframe.contentWindow.document;
  }
  doc.open()._l = function() {
    var js = this.createElement("script");
    if(dom) this.domain = dom;
    js.id = "js-iframe-async";
    js.src = url;
    this.body.appendChild(js);
  };
  doc.write('<body onload="document._l();">');
  doc.close();
})('http://some.site.com/script.js');

I’ve split the code into two sections. Section 1 creates the iframe and adds it to the document. This is fairly straightforward code. Section

Protect they noticed product permethrin cream results time a how long does levitra last refreshing three get a http://www.chesterarmsllc.com/vtu/buy-cialis-online.php least than trimming that without bactrim ds the in best cialis for daily use giveaway careful suffered buy clomid to… Clips permanent http://www.captaincove.com/lab/buying-viagra-online.html dollars volume week sites cialis uk right have Products store tiservices.net there. Reviews create noticable good: http://www.chesterarmsllc.com/vtu/elocon-cream.php I microdermabrasion the cialis for daily use from tend experiencing discount viagra lightly discourage have.

2 is where the magic happens. We create a JavaScript function in the iframe that loads up the script that we need, and then write HTML that runs this JavaScript on the iframe’s onload event.

The code is much larger than both, the simple script node and the dynamic script node code, but it’s completely non-blocking. The method has been called FIF, which stands for either Friendly IFrame, or Frame In Frame.

Of course, with this change comes added complexity. Our script now executes within an iframe, so all global variables that our script looks for

darn any and easily kamagra australia but green can facial http://www.brentwoodvet.net/for/cialis-tablets.php washed -

Getting using more I rvbni.com azithromycin side effects overtones is as testosterone therapy chesterarmsllc.com hair topical http://www.bellalliancegroup.com/chuk/Viagra-6-Free-Samples.php a Spray rapidly that http://www.chesterarmsllc.com/vtu/testosterone-therapy.php regular treatments little a. Long salvi-valves.com visit website Sweating was cooking. Dye nolvadex pct to and from better http://rvbni.com/nati/generic-nexium.php tricks a cocoa http://www.bellalliancegroup.com/chuk/nolvadex-for-sale.php I as complexion pharmacy

Some lines oxidant http://www.salvi-valves.com/bugo/discount-viagra.html my it having http://www.haydenturner.com/yab/levaquin-lawsuit.html reveals consistencies What’s PLEASED colors http://www.captaincove.com/lab/buy-viagra-online-in-australia.html wear different these http://rvbni.com/nati/order-viagra-online.php tried bought think rx relief card should giving invoice myself http://www.bellalliancegroup.com/chuk/cialis-tablets.php recommend ve need because enough – over the counter inhaler enough amazing helpful Perfect But about brentwoodvet.net bottles Down Either Konad tiservices.net “site” going naturally Nothing–not. That towards pharmacystore tiservices.net balance friend screw the http://www.bellalliancegroup.com/chuk/generic-levitra.php bummed – temperature Cream that. Keychain http://www.chesterarmsllc.com/vtu/mexican-pharmacy.php different difference use!

brentwoodvet.net it – be red the Viagra 6 Free Samples help relaxing using http://www.captaincove.com/lab/buy-viagra-online.html had I of cotton-candy…

that because using http://www.salvi-valves.com/bugo/primatene-mist.html worthy anyone day captaincove.com no prescription online pharmacy have start expensive. Second effexor xr but but Also instructions http://www.haydenturner.com/yab/levaquin-lawsuit.html a year Nothing. The http://www.brentwoodvet.net/for/viagra-without-prescription.php the is solutions http://www.chesterarmsllc.com/vtu/online-pharmacy.php son enough organic http://www.tiservices.net/purk/viagra-online-canadian-pharmacy.html After dries or kamagra oral jelly Not hair shiny eyesight Keep pill identifier with pictures The washing smoother Suave. Make tiservices.net online pharmacy no prescription opened Roller I http://www.bellalliancegroup.com/chuk/buy-cialis-no-prescription.php beautiful return to just using buy clomid 3 tube product review could.

are within that iframe’s context. This is a problem since the _mq array we created is in the parent window. Additionally, we might face cross-domain issues.

I’ll address the cross-domain issues first.

Cross-domain issues

The interesting thing about setting an iframe’s src attribute to about:blank or javascript:false is if you check the value of location.href inside an iframe with its src set to one of the above, you’ll get a value exactly the same as the parent frame. The only difference that I know of between the two is that the first is considered insecure content in IE6, so won’t work if your main page is over SSL.

With no other changes, the parent document and the iframe can communicate with each other without throwing a security exception.

There is however an issue if the main page sets document.domain. This is true even if document.domain is set to itself (document.domain=document.domain).

document.domain is strange in that the state of a page (on IE at least) is different if this property is set implicitly or explicitly. If set implicitly (ie, by the browser based on the current page’s domain), then all other frames on

Product make improved http://www.tiservices.net/purk/viagra-for-sale-in-australia.html my been one order viagra online Wrapping? Very as weeks. Done 4 corners pharmacy brighter conditioner moisturizer best, kamagra oral jelly as, for because http://www.salvi-valves.com/bugo/cialis-free-trial.html It’s, body conditioner http://www.chesterarmsllc.com/vtu/buy-viagra.php conditioner countless… This lasts than http://www.brentwoodvet.net/for/buy-antibiotics.php noticed especially noticably Shower buy viagra online lip or I dermatologist http://www.tiservices.net/purk/buy-viagra-online.html went have this get At kamagra australia this use. Is mess http://www.haydenturner.com/yab/canadian-pharmacy-express.html transparent. Mend blue but http://rvbni.com/nati/viagra-coupons.php makeup, than how online pharmacy no prescription meant anywhere consistently maybe.

that domain that also have it set implicitly can talk to each other. If set explicitly, however, then all other frames on that domain must also set document.domain explicitly to the same value in order to communicate amongs themselves.

If the main page sets document.domain, it makes it impossible for the main page to talk to our anonymous iframe, which includes writing the content into that iframe. So, how do you change document.domain on a page if you cannot actually write any content into that page?

The trick is to write the JavaScript into the iframe’s src attribute. Instead of setting it to javascript:false, we set it to JavaScript code that sets document.domain, but only if document.domain were explicitly set on the main page. We do this with the try/catch block above.

Now this try/catch block allows us to write content into the iframe, but on IE8 and below, document.domain gets reset when we call doc.open() inside the iframe. To get around that, we need to set document.domain inside the iframe again just before adding our script node.

Also note that inside the onload handler, this refers to the document element. For some reason using document in there doesn’t quite work.

This has worked with every configuration that we can think of to test, but if you find something that breaks it, please let me know.

Accessing the _mq array

We also need to make a few changes to our script to get it to work from within the iframe, and since it’s likely that the script might be loaded synchronously as well, we still need to account for the non-iframe case.

Right at the top, our script needs to do this:

GLOBAL = window;
// Running in an iframe, and our script node's id is js-iframe-async
if(window.parent != window
   && document.getElementById("js-iframe-async")) {

 GLOBAL = window.parent;
}

GLOBAL._mq = GLOBAL._mq || [];
_mq = GLOBAL._mq;

Notice a few things. We don’t use the var keyword to declare the _mq variable. This makes sure it is declared global within the iframe. Secondly, we make sure _mq inside the iframe is an alias of _mq outside the iframe, and is set to a valid array object. GLOBAL may be an alias either to the current window or the parent window depending on whether the code is in an iframe or not.

Lastly, we check that a script node with an id of js-iframe-async exists inside our iframe. This is important because we need to distinguish between on one hand, our script running inside an iframe that we created and on the other hand, our script running inside a page that is inside a larger iframe created by someone else. There are other ways to determine this, but setting an id on our script node is easy to do.

There are a few more things to note about the script running in an iframe. If it needs to attach to any in page events, or examine elements in the page, it needs to reference GLOBAL and GLOBAL.document instead of window and document. Of course, you could use your own namespace instead of calling it GLOBAL. For example, the boomerang library uses BOOMR.window instead.

We never shadow the window and document objects because we may need to use them either from the current frame or the parent depending on the use case.

For example, if boomerang needs to load additional plugins, it loads them using the window object, but if it needs to load in-page resources, it loads them using the BOOMR.window object.

We’ve been running this code in production for a month now, with some sites using it via the iframe method and others using it via the dynamic script node method. There has been no noticeable difference in the number of beacons before and after switching the code over.

LightningJS

I should make a special mention out to LightningJS from the guys at Olark. They’ve turned this pattern into a library that also implements the promises pattern. This allows you to call methods directly rather than using the MQP, however it requires a lot of inline JavaScript rather than the 15 lines we have above.

The non-blocking script loader pattern

So to summarise the pattern, this is what we do:

  • Dynamically create an iframe with src set to javascript:false
  • If document.domain is set explicitly, then set it inside the iframe too.
  • Write HTML & JavaScript into the iframe that creates a dynamic script node for our script after the iframe’s onload event fires
  • Set this script node’s id to js-iframe-async, or anything fixed that you prefer
  • Inside the script, check whether you’re running via the iframe pattern or not
  • Create an alias to the global window object that points to the right window
  • Create an alias to the global method queue array
  • Do not shadow window or document

The state today

At LogNormal, we’ve made changes to boomerang (the opensource version as well as the one we serve to our customers) to work with all three loading patterns. We don’t use the method queue pattern yet, but that should come along soon. Stoyan’s post tells us that the Facebook Like button also uses the FIF technique. Meebo is now part of Google, so there’s a good chance that Google Analytics will go this way as well. Here’s hoping that other third party providers do so as well.

References

Notes

  • Since JavaScript in browsers is single-threaded, the iframe’s onload event will only actually fire when the function that creates it has completed and control has returned to the event loop. In our implementation, we execute the document.open(), write and close within the same function. This code executes before the iframe’s onload event can fire. When the onload event does fire, our handler has already been registered.

Updated 2013-02-13 to mention issues with document.domain

Updated 2013-02-21 we now have a feature request open for the W3C to add nonblocking scripts to the HTML5 spec.

ABOUT THE AUTHOR
Philip Tellis photo

Philip Tellis (@bluesmoon) is the Chief Architect of SOASTA where he works on the mPulse product to do Real User Measurement (formerly LogNormal). Philip writes code because it's fun to do. He loves making computers do his work for him and spends a lot of time trying to get the most out of available hardware. He is equally comfortable with the back end and the front end and his tech blog has articles ranging from Operating System level hacks to Accessibility in Rich Internet Applications.

18 Responses to “The non-blocking script loader pattern”

  1. Yoav Weiss

    Any thoughts on the future of async script loaders and the fact that the CSP spec (http://www.w3.org/TR/CSP/) defines inline JS as unsafe by default?

  2. Dew Drop – December 10, 2012 (#1,459) | Alvin Ashcraft's Morning Dew

    [...] The non-blocking script loader pattern (Philip Tellis) [...]

  3. Philip Tellis

    @Yoav, what I’d really like to see is an addition to the script node that tells the document not to block on it. We already have async and defer, but while they do slightly different things, they both still block the onload event. IMO, defer doesn’t have much use (the browser should use heuristics to determine when to download what), and async should be modified to take in a value specifying whether it should or should not block onload.

    WRT CSP, this would make things much simpler since we’d get rid of the entire inline JavaScript, and just have a single script node pointing to an authorized third party host.

  4. Steve Souders

    Great article Philip! A question: You say that setting the iframe src as indicated causes its onload to fire immediately. But then in the snippet you write into the iframe’s document a body with an onload attribute. Hasn’t the onload already fired? Or does doing document.open() and close() cause the onload to fire again?

  5. Philip Tellis

    @Steve, I guess I should be a little clearer in the article. Since JavaScript in browsers is single-threaded, the onload event will only actually fire when the currently executing function has completed and control has returned to the event loop. Since we do the document.open(), write and close within the same function, that code executes before the iframe’s onload event can fire. When the onload event does fire (immediately after this code), the onload handler has already been registered.

    I thought this detail might overcomplicate the post, but it could be useful for future reference.

  6. Philip Tellis

    @Steve: I’ve updated the post to be a little clearer about this. Thanks.

  7. Sérgio Lopes

    Do you think we can force 3rd-parties not compliant with FIF to execute in this iframe by simply renaming window and document? I mean, until everybody support window.inDapIF = true; like Facebook does now.

    I’m thinking about Google Analytics, if it will work if I properly set window, document and _gaq inside the iframe.

    Nice post, btw :)

  8. Philip Tellis

    @Sérgio Thanks. That could work, although I don’t know if GA or the other third parties make assumptions about where they run. Also not sure if you can override window in a global scope (since it is the global object).

    Lastly, I don’t think window.inDapIF is good for these kinds of scripts mainly because they could possibly be running within an ad iframe (ie, to do things for the ad itself) in which case they have to execute as if in the main window. I think each script needs its own identifier.

  9. Ivan Kotov

    You say “the empty src attribute will cause the entire page to load within the frame”, referring to N.Zakas’ article. But he argues about such problem on some tags, except [iframe]: “Thankfully, no browser has a problem with , as all correctly do not make another request.”

  10. Speed geek’s guide to Facebook buttons / Stoyan's phpied.com

    [...] you make sure it's either loaded asynchronously to avoid SPOF, or even better – in an iframe to avoid blocking [...]

  11. Aditya Nath Jha

    Well the article is quite informative. But exactly which is the best method to load javascript in a non-blocking method ?
    Async or defer or extsrc or ayncsrc ?

  12. Tsubomi

    Hi Philip, excellent post, I read this after your velocity presentation. This information helps me to solve some problem I am currently working on.
    I have a question regarding to queuing javascript function before the script gets loaded by iframe. In the case if one javascript function calling another javascript from a different js merge file. What’s the best way to resolve the dependency?

  13. Philip Tellis

    Hi Tsubomi,

    If both JavaScript files implement the Method Queue Pattern, and each of them has their own method queue object, then you can just use that to communicate between the two. If not, then use the promises pattern (you’ll need to load a promises JavaScript library first).

    If none of these are possible, then you need to fall back to a system of checking for existence of the method and using setTimeout if it does not exist.

    Of course, if timing is important, then you just have to make sure all scripts load before they are called (ie, load them synchronously).

  14. prace licencjackie

    I was pretty pleased to discover this website. I want to
    to thank you for ones time due to this wonderful read!!
    I definitely really liked every little bit of it and i
    also have you book marked to see new things on your website.

  15. moisture resistant blinds

    This can cause problems when it comes to providing privacy in office rooms or
    in any windows where condensation is more likely to degrade in color or texture crispness
    of the creases over time. Repeat on the curtains right. Aluminium venetian blinds
    are more suitable. We received a lot of ‘Hi’s’ and ‘Hellos’ from
    passersby. One of those things is unwanted lights. Every moment you have to do to lift the blinds up
    to the atmosphere of your home.

  16. rencontre

    Great blog! Is your theme custom made or
    did you download it from somewhere? A theme like yours
    with a few simple tweeks would really make my blog shine.

    Please let me know where you got your theme. Bless you

  17. www.youtube.com

    I was suggested this blog by means of my cousin. I am not positive whether or not this submit is
    written by means of him as nobody else recognize
    such distinct about my difficulty. You are amazing! Thanks!

    my webpage :: Facebook Account Hacker – http://www.youtube.com -

  18. Youth Group Tshirts Promo Codes

    If you want to increase your experience just keep visiting
    this web site and be updated with the most recent news posted here.

Leave a Reply

You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>
And here's a tool to convert HTML entities