I’m using the twitter profile widget to display some tweets on a website. I’ve noticed a couple of issues:
I am trying to stop the widget being initialised until after page load (not using the onload event). With other scripts I can add a non-standard type attribute and this will stop the browser executing the script, with the twitter profile widget however, the script is still executed regardless of the type attribute I add. Somehow the twitter script seems to be forcing the browser to execute it.
If I wrap the new TWTR expression in a function and call the function later on (as in, after onload), the widget seems to use document.write to add the widget, which as expected overwrites everything else on my page, so I end up with just a blank page showing the widget.
I’m curious to know how the widget forces the browser to execute the script even if it has a non-standard type attribute. This is unusual script behaviour. I’d like to know a fix for the document.write issue, I don’t even know why you would use this method of inserting the widget.