getElementsByTagName Namespace Prefix Strangeness in Safari/Chrome/WebKit

Is It Me or the Browser?

I had a Safari bug on a project I’m rushing to get out the door. We’re using a Flickr feed to populate a div with link+thumbnail to some flickr images. In Firefox/Internet Explorer I simply did the following to build the links:

flickr : function(obj) {
//get the full list of items var items = obj.getElementsByTagName("item");
//make sure it's not empty if (items.length > 0 ) {
//start the HTML block var blob = "<div id='flickrFeed'>";
//loop through the items (we only want 5) and build some links) for (var i = 0; i< 5 ; i++) {
//get the link var flink = items[i].getElementsByTagName("link")[0].childNodes[0].nodeValue;
//get the thumbnail var flurl = items[i].getElementsByTagName("media:thumbnail")[0].getAttribute("url");
//smash them into the string blob+="<a href='"+flink+"'><img height='75' width='75' src='"+flurl+"' /></a>";
};
//close the div blob+="</div>";
//pop it onto the shelf, for later use $("hyperspace").innerHTML+=blob;
} else {
//if there's somethign wrong with the feed, go to default contentk social.fallBack.flickr();
}
}

Continue reading “getElementsByTagName Namespace Prefix Strangeness in Safari/Chrome/WebKit”

Recent Reading (HTML5, CSS Fonts, JavaScript, rel=nofollow, Google Analytics)

  1. New elements in HTML 5

    An older (2007) article, but still pretty interesting. I’ve been slowing working my way through some HTML5 stuff. This was part of that effort. If, like me, you’re fascinated by where the web is going*, you should definitely check the article out.

  2. Event Tracking Guide

    With event tracking open to everyone we’ve been going nuts with them at work. I’ve also been going nuts with them at home.

    I’m basically smothered in event tracking.

    I’m glad to have it. It saves me from doing non-standard stuff (faking page views) and it saves our analytics analyst the time of having to filter out fake page views from the data.

    Yay Google.

  3. Whiteboard Friday – How Do We Plug the Nofollow Leak?

    This isn’t a read, it’s a video 🙂 But, if you’ve got any interest in SEO, then this discussion of the recent change in the way Google treats rel=nofollow and the way PageRank flows is a must-view.

    SEOmoz Whiteboard Friday – How Do We Plug the Nofollow Leak? from Scott Willoughby on Vimeo.

  4. 8 fonts you probably don’t use in css, but should

    While I’ve been messing with “real” fonts on the web using Cufon, it’s still a hell of a lot easier to just use old school fonts. The referenced article does a great job of pointing out some neglected fonts that might come in handy on a project.

  5. Event delegation in JavaScript

    Attaching an event handler to the document and then delegating based on the target has been on my mind a lot recently. I like the idea and it’s actually come up in two code reviews this week as an alternative to traditional event handling.

    Serendipitous then, that Nicholas Zakas decided to write it up so that I have something fresh to point to when I reference the technique.

*I’m also fascinated by where the web is and where the web has been, so I’m not really picky on those fronts.

The Wait For the Palm WebOS SDK

Although they doubled the number of people let into the club last week, the progress seems painfully slow- at least to me. Sitting on the outside, looking in, it seems like an eternity.

Especially since I expected to be well under way at this point. I’m really surprised that they didn’t ramp it up much sooner, in order to have a little more app momentum for the launch of the Pre. I know that WebOS is a long-term project for Palm, and an all-in bet on the future of the company, so I can understand them being cautious and trying to get things right. That understanding doesn’t ease my frustration with the wait. To be honest, I thought I’d be in beta by now, with the device already a month old. A bleary eyed, sleep deprived beta :), but a beta nonetheless. As it stands I’m staring at a leaked version and checking my inbox for the official invite.

Maybe I’ll be one of the people who doubles this size of the program this week and all of this vague griping will be a prelude to my first look inside the SDK.

Anyone out there had any luck getting in?

Has anyone from the dark side had time to play with the leaked version?

YUI 3.0.0 beta 1 Available for Download

While I’m not a library guy in my day to day (more on that soon, I promise,) I do have some experience with YUI and featured it in my JavaScript library evaluation and talk in April, so it’s definitely of interest when a major new release is pending. YUI is mightily impressive. Style-wise, the code is a little stiff/verbose for my liking, but the documentation, executions speed, logic and features of YUI are basically unmatched amongst the libraries I’ve evaluated. I’ll be interested to see if 3 continues that trend and improves upon it.
Continue reading “YUI 3.0.0 beta 1 Available for Download”

In Case You Missed It- Google Talks Web Performance

In a post entitled, “Let’s Make the Web Faster,” Google launches wholeheartedly into the dialog about web performance. They’ve already offered up Page Speed, which is a welome addition to the page performane toolbox, but starting a high profile dialog helps people like me in a big way. Personally, I would love to find a demand for page performance consulting, as I’d be just the guy to fill such a demand and it would be very rewarding work. Making sites faster means users are happier. I like happy users.
Continue reading “In Case You Missed It- Google Talks Web Performance”