Anne van Kesteren: Weblog 4.2

Weblog on W3C, WHATWG, HTML, CSS, DOM, XML, HTTP and more.

XML Sunday

Error! Would you like to reparse this document as HTML?

Cheap shot, I know. Sundays are great.

Permalink · 18th January 2009 · Comments are closed

Using HTML5: remove and replace

I’ve been using HTML5 for a year now or so on the archived pages for individual blog posts. It doesn’t mean much, I use <!doctype html> and make use of some of the new form controls. I’m now using the new DOCTYPE everywhere. I also took the time to remove all type="application/javascript" and type="text/javascript" attributes from script elements in my various templates. The search control I have now uses type="search". I replaced required="required" with required="" (I know). I haven’t done much else as that would mean adding more markup, e.g. a header and various article elements. I’m not using any div elements currently and the document outline for my weblog should be fine per HTML5 so I decided to not add any bloat (yet).

I also wrapped label elements around form controls rather than using for/id. Less clutter, less potential for duplicate IDs. Renamed IRI to URL in the comment form; standards suck. And finally, I dropped the RSS feed in favor of Atom. If someone can increase the acceptance of rel="feed" in user agents that would be much appreciated as it would save me thirty-three characters on several pages. No, I don’t have Google’s bandwidth bill, but readability counts.

Permalink · 16th January 2009 · 5 comments

IE8 getters and setters

I decided to actually check the ECMAScript 3.1 draft. If you thought HTML5 was horrible, ECMAScript 3.1 is a ~3.2MiB PDF file downloadable from a wiki page. No live updates, no inline links, no chapter links, mu. Anyways, a colleague told me getters and setters were defined in section 11.1.5 so I looked there (January 12 draft). It states get and set are the keywords to be used, as in the first example of my last post. So some part of the de facto getters and setters support survives. Hurray!

__defineGetter__ and friends are not defined at all in the draft though which seems to indicate that TC39 takes a different approach to things than e.g. the HTML WG. The draft however does define a new way to do getters and setters in section 8.10.5 and as far as I can tell that is the one Internet Explorer 8 attempts to implement. I say attempt, as Internet Explorer is using getter and setter as keywords according to a document on MSDN where the draft states get and set are supposed be it.

Thus the question is, did the Microsoft engineers made a typo? Or did TC39 decide on a change the January 12 draft does not reflect?

After some more digging, the changelog in the draft says that December 22 last year the getter and setter keywords were renamed to get and set, citing issue 441, which, as it turns out, is marked invalid. I’m guessing pratapL of TC39 made a mistake in changing it everywhere rather than just in section 11.1.5, though maybe consistency was intentional and Internet Explorer needs to change.

Permalink · 14th January 2009 · 6 comments

ECMAScript getters and setters interoperability

I’m slightly baffled by Responding to Change: Updated Getter/Setter Syntax in IE8 RC 1 and not sure who is to blame or whether there is some misunderstanding. As the blog post of Travis indicates non-Internet Explorer browsers have had support for getters and setters for quite a while. JavaScript Getters and Setters elaborates on how they work and mentions they are supported in relatively recent versions of Opera, Safari, and Firefox. So Internet Explorer adding support for getters and setters sounds great initially, until you figure out they support them in a completely different and unique way, apparently as agreed upon with the other three browser vendors.

Huh? And this is somehow better for interoperability? I would love to know why TC39 made this strange design decision and why Microsoft decided to follow it in name of interoperability as it clearly leads to duplicate code short term and other browsers most likely cannot remove their “ancient” getters and setters support long term, which leads to bloat.

For example, here is something simple that works in the non-Internet Explorer browsers:

foo={get test(){ return "foo"; }};
alert(foo.test);

And here is a possible equivalent in Internet Explorer 8:

foo={};
Object.defineProperty(foo, "test", { getter: function() { return "foo" } });
alert(foo.test);

There are various syntax variations allowed, but the point is that the latter does not work in non-Internet Explorer and the former does not work in Internet Explorer 8. Yet somehow this is sold to developers as increased interoperability. Yay!

Permalink · 14th January 2009 · 8 comments

Shrinking HTML5

orderedlist.com starting to publish articles on how to use structural tags and the new doctype in existing browsers and following (and following up on) “html5” and “html 5” on Twitter almost becoming a full-time job are indicators HTML5 is getting more stable. The issues graph suggests the same.

As you may recall, the plan of the editor is to get to Last Call by the end of this year. As a result, Ian has been focusing on addressing the remaining feedback and splitting out parts of the HTML5 draft. Not alone actually, Adam (security fame, Google Chrome) is helping with splitting out content sniffing and Dan (former HTML WG co-chair) intends to work on splitting out the URL section.

All in all, that removes content sniffing rules, URL handling, and Web Sockets from the HTML5 draft. (For what it’s worth, XMLHttpRequest was at some point part of HTML5 as well.) This is probably a good thing as they are quite orthogonal from HTML5 itself, e.g. the XMLHttpRequest specification currently references HTML5 URL handling as they are in fact the same. Ian made a list of other sections that could be taken out, though it is unclear at this point how much of that will happen.

I’m curious to see what will happen when some of these drafts hit the IETF (e.g. URL handling and content sniffing) as I assume they are quite controversial. Running code is there, but rough consensus remains to be seen.

Permalink · 12th January 2009 · No comments

Ideal

Ideal is great.

Judith
I was so scared when I saw that mask. I thought he was going to rob me… or rape me… or both.
Moz
Cartoon Head is not big on multitasking.

Todo: use HTML5 instead.

Permalink · 7th January 2009 · Comments are closed

My year in cities, 2008

As per Mark, in no particular order and potentially incomplete, cities I visited in 2008:

One or more nights in each place, except Monaco and Hannover, where I was for half a day each. Some places I visited several times, e.g. Oslo (Opera HQ) and Utrecht (home).

chaals, if you happen to read this, I encourage you to compile such a list as well, I’m curious :-)

Permalink · 31st December 2008 · 9 comments

After the mountain

I saw a few blog posts lately blaming Twitter for killing their blog. As a Twitter user I think I agree. Though there are some other factors too, e.g. travelling a whole lot more than a couple of years ago and losing interest in pointing out that someone is wrong on the internet.

Anyway, I went to Germany, after conquering the mountain and spending a few days at home to fix the heating (my house is getting cosy), for the Opera University Tours program. Had a lot of fun together with Bernd and Roberto. Blog posts of our trip to Germany are available: German university tour stops in Munich, Opera in Lübeck, and Opera in Hannover.

Then I went to Oslo (still there) for hanging out at Opera HQ and the (in)famous Oslo Christmas party. I will go to Linköping today by train, together with a bunch of collegues, for a standards related meeting tomorrow and the Linköping Christmas party afterwards. Hah! Also looking forward to meeting jgraham, zcorpan, bratell, etc. again.

Saturday I will come back to the Netherlands and then Monday I will fly out to Moscow for fun (might do work too, if the network expenses are not too bad, but I guess they will be) and to support my brother in a harp competition he has there. After that it is really Christmas and propably time to relax a little.

Permalink · 11th December 2008 · 7 comments

Tanzania: Uhuru Peak

So for two and half week I went to Tanzania and climbed Mount Meru and Mount Kilimanjaro with my dad and Marcos. Together with Marcos I also went on a “short” four day safari. (I thought it was long enough, but the experts tell you a good safari to the Serengeti and all takes a bit longer.) I wanted to write a longer report on the climb, but for now these pictures will have to do. (The giraffe was photographed in the national park surrounding Mount Meru.)

We walked the Machame route and our guide was Arushaa (arushaa@hotmail.com), a nickname presumably borrowed from the town where he currently lives, Arusha. The last kilometer up was quite cold, but overall it was super awesome and well worth all the money. Definitely recommended.

Permalink · 24th November 2008 · 3 comments

Opera University Tours: California

After the W3C Technical Plenary I went back home for eight hours of solid sleep at which point I took a taxi straight back to Schiphol to make a flight to San Francisco. I did a few talks (HTML5 FTW!) for the first week of the Opera University Tours in the Northern California region. Has been a lot of fun discussing the Web with students around here.

I attended the WHATWG meetup as well and missed out on going to something at Google the next day due to being in downtown San Francisco with collegues instead of close to Google. We had some great food at a place close to the harbor. (Earlier that day I had a lemonade at a place called “Hot Dog on a Stick…”) Will be checking out the food at Mozilla tomorrow. Going there for lunch after which I will probably take the train back to the airport to get on the 4:25PM flight back to Amsterdam.

I arrive in Amsterdam Saturday around 11AM and will meet up with Marcos later that day in Utrecht, probably around 2:30PM. The next day we will leave on a relatively early flight from Schiphol to Kilimanjaro, Tanzania. Awesomeness!

(When I get back from that I will be in the Netherlands for a few days at which point I will go to Germany for the second week of Opera University Tours in that country.)

Permalink · 30th October 2008 · 4 comments