Still repros on IE 9.0, FF 8.0, Chrome 15.0. (Also, code above should have been for (var i in twttr), not for (var i in twttr.tfw)). twttr.widgets is defined eventually, just not when the functions passed to twttr.ready are called.
IE displays the following JS error, but other browsers do not:
“Unable to get value of the property ‘insertBefore’: object is null or undefined
widgets.js, line 1 character 2752”
No one else seems to have had this issue; maybe I’m including it wrong?
if (!window.twttr) {
window.twttr = (function (d, s, id) {
var t, js, fjs = d.getElementsByTagName(s)[0];
if (d.getElementById(id)) return; js = d.createElement(s); js.id = id;
js.src = “//platform.twitter.com/widgets.js”; fjs.parentNode.insertBefore(js, fjs);
return window.twttr || (t = { _e: [], ready: function (f) { t._e.push(f) } });
} (document, “script”, “twitter-wjs”));
}