Skip navigation.

miscoded

the web is a hack

..and the winners are..

Regarding the competition in the last post, I decided to refactor it into two categories: the shortest and the best.

The shortest valid entry was as far as I can see qwo's alert(frames);. While the toString() output usually just exposes the browser's internal classes without showing real compatibility issues, this case is actually interesting because it gives away that in some browsers, "window.frames" is just an alias for "window". Opera doesn't do this, and guess what - it does cause us real compatibility problems and we have a bug on fixing it!

BTW qwo, it could be even shorter without the semicolon :smile: .

The entry that packed the most "real" quirks into the least code was arantius' setTimeout(alert,0). I liked the minimalness of just passing the built-in alert method directly to setTimeout() - though perhaps it would expose the same quirks and be even shorter without the '0' argument?

Congratulations, and thanks to everyone who contributed. And before I forget: the winners need to PM me their snail mail address if they want to receive the price :smile:.

shortest incompatible script challengeUnfortunately opera: is the new chrome:

Comments

Anonymous 30. October 2008, 14:54

Gareth Heyes writes:

I sense you like weird javascript like me :)

Check this one out in the latest version of Firefox:-
alert(alert[-5]);

kyleabaker 30. October 2008, 19:39

congrats qwo and arantius!

awesome challenge too by the way! :wink:

How to use Quote function:

  1. Select some text
  2. Click on the Quote link

Write a comment

Comment
(BBcode and HTML is turned off for anonymous user comments.)

If you can't read the words, press the small reload icon.


Smilies