I'm working with Remy Sharp's twitterlib: https://github.com/remy/twitterlib, and in the example file, he uses log(//stuff) to output to the screen. I had previously only encountered document.write() to fill this capacity, and only seen log() in conjunction with console logging. Here's the snippet (look at lines 4 and 6):
var count = 0, limit = 2;
twitterlib.timeline('rem', { limit: 5 }, function (tweets) {
count++;
log('<strong>Tweets requested in hit ' + count + '</strong>');
for (var i = 0; i < tweets.length; i++) {
log(this.ify.clean(tweets[i].text));
}
if (count < limit) {
this.next();
}
});
I can't find any information on log() as a standalone javascript method for outputting to the screen, so I'm wondering if it's a good idea to continue to use this, or whether I should write to the screen another way (e.g. document.write() or jQuery DOM manipulation) for more predictable results.
Any info?