Monday, October 19, 2009

IE8 Image is undefined part 2

In response to my last post about IE8 having issues with pop-up windows where the 'Image' object is undefined I was able find another fix for this issue.

While I was searching for information on this topic I stumbled across this entry on Microsofts forums. The fourth comment down, by the user 'Fattymelt', stated that he was able to resolve the issue by simply removing the call to 'focus' of the pop-up.

var pop =;
pop.focus(); // removing this prevents the Image from being undefined

Wellll... It did prevent the issue, but it doesn't look like it's the 'focus' function that's causing it. 'blur' also caused the issue along with everything else I called from the '' object. Not just function calls either, a simple check against the 'closed' property also yielded the issue.

So, it looks there are two options to get around this issue..
1. Do the iframe hack from my previous post.
2. Don't make any calls to the '' object

As a side not I tried to post some of these results to the MS forums thread above, but everytime I click the reply link in the forum it takes me to my profile. I can't seem to post any replies to any threads... :(

Friday, October 16, 2009

IE8 Image is undefined

I was given a wonderful bug to work on today at work. Apparently we had numerous pages where a nice little javascript exception was being thrown, which in turn broke our pages. The issue was ONLY happening while using IE8, no issues with previous version of IE or Firefox/Safari/Chrome.

We use Omniture for site analytics and it was in their script that the issue was occuring. One problem we faced was the fact that their javascript is obfuscated so trying to read through their code was no fun. From what we could gather it looked as though they where using an 'Image' object with it's source set as a generated URL to report statistics.

After a bit of fiddler, javascript and code commenting we where able to narrow the issue down to this scenario

1. Within one window call '' to open a new window
2. On the server, during the request for the new window, do a redirect to the same page
3. Once the page has loaded, after the redirect, you no longer have an 'Image' object
4. If you reload the page you now, magically, have an 'Image' object

(the redirect back to the same page was due to the original design of a few pages the application had. Basically a parameter is included in the query-string that notifies the server to reset a session variable, and the redirect goes back to the same page without the variable in the query-string)

According to some searching there are other scenarios where the 'Image' is undefined. Add-ons can cause this issue as well.

So.. What to do about this. Well like I stated in my previous post I tried to report the issue with MS, but unfortunately I could only post a comment on one of their forums. I also have an ASP.NET sample project that can consistently reproduce this issue, but I have nowhere to send it to. Maybe they don't like bug reports? I also couldn't find any useful information during my searching that could resolve this issue so it was down to some wonderful hacking...

My first attempt was to simply add this script to the top of our Omniture script

function Image() { }
Image.prototype = document.createElement('image')

That doesn't create exactly what you want though. But is interesting that you can get an instance of 'Image' by using the document.createElement('image').

For my next attempt I tried to see if I could get a reference from the parent window using

Image = window.parent.Image

But from the child window the parents Image was also null, even though it really wasn't when you actually tested it on the parent. Lovely I know.

But I was getting somewhere, since I didn't have what I wanted in the pop-up I was trying to get it from another window. So then the object/iframe tags came into mind. I wondered if the problem would still exist within an object/iframe tag within the broken page since it's DOM is different than the pop-ups.

I also found a post on Dean Edward's blog doing exactly what I needed so it saved me a bit of time/testing.

Sooooo here it is in all it's glory.

(typeof Image == 'undefined') {
    (function() {
        function createImage() {
            var iframe = document.createElement('iframe');
   = 'none';
            window.frames[window.frames.length - 1].document.write("<script>window.parent.Image = Image;<\/script>");
            //don't uncomment the line below as it causes IE8 to throw-up
        var wl = window.onload;
        window.onload = function() { createImage(); if(!(!(wl))) { wl() } };

We wouldn't have to do the anonymous function and bind to the window.onload event, but in our case this was added to the top of our Omniture script file which is used as a script include at the top of our files (before the body tag) so the additional code was added so it would still work. Otherwise you could just add it to your page at the top/bottom wherever (as long as it's before any reference to 'Image')

What it does?
Basically we just create an iframe and add it to the DOM. Then we write the script string to the iframe which causes IE to execute it immediately. From within the iframe the 'Image' isn't broken/undefined so we set the parent's(broken window) Image to the iframes(working) Image. We ended up leaving the iframe in the page after the reference was set because IE would barf otherwise. This may be due to the reference on the parent no longer pointing to anything, but who knows. Oh yeah it's also wrapped in conditional compilation so that good browsers don't have to worry about anything.

Google likes IE8 more than Microsoft does?

I tried to post a bug with IE8 today with Microsoft and got to talking with a colleague about Bing. We loaded it up and where curious if MS would filter any anti MS/IE related topics. So we entered in "IE8 sucks" in the search bars for both Google and Bing and let them off their leashes.

Google reported 'about 67,700' results while Bing reported '1,620,000' results.

Friday, October 09, 2009

(Simplified) Block/Closure Extension to C/Objective C/C++

My previous post from yesterday showed the new block/closure feature of the C language. I think I may have made the block syntax more complex looking than it needed to be by including the full interface/object code along with it. So today I'll strip off some of that unneeded code and do a comparison of just the basic syntax of C/ObjC's new block with that of C#'s anonymous method.

(block 1)
- ObjC
typedef void(^Block)(char*);

- C#
delegate void Block(string msg);

(block 2)
- ObjC
- (void) test: (Block)block {

- C#
protected void Test(Block block) {

(block 3)
- ObjC
int main( int argc, const char *argc[] ) {
    MyClass *mc = [[MyClass alloc] init];

    [mc test: ^(char *msg) { printf("%s"), msg } ];

- C#
static void main( string[] args ) {
    MyClass mc = new MyClass();

    mc.Test((string msg) => { Console.WriteLine(msg); } );

Blocks 1 and 2 only have minor differences between the languages.
Block 3 has the most difference between the languages due to the SmallTalk like message passing syntax of ObjC
    [obj msg] vs that of c#'s obj.msg
Like blocks 1 and 2, block 3 shows only minor differences between the block syntax in either language.

^() { }
() => { }

Chrome and the Mac

I've been waiting for Chrome for quite some time now to be released on the Mac. I've been fairly curios to see how it would stack up there compared to it's sibling Safari, as they share the same WebKit core. It's been available as a dev preview since back in June but there where many things that where not complete and crashes where reported aplenty.

Many have been reporting, as of recent, about the increased stability and additional support for things such as Flash etc. I decided to give it a try today from within Snow Leopard. The download link can be found here.
(hehe I'm blogging this post from Chrome and inserting the previous link does not work from Bloggers editor).

Installing went without issues, and it loaded up no problem. I tried out a few sites and it seems to be working great thus far. I even went to to push it a bit. I used the experiment called Voxel Spacing as that one was really slow in Safari a few months back. Chrome ran it much faster than I remember Safari being able to cope from before. I decided to try it again to see if Safari had improved at all. Coincidentally it had and both Chrome and Safari where running it at almost identical FPS, Chrome having an . Firefox couldn't be let off the hook here so it had to be tested as well. It was actually the slowest of the three.

Chrome 18 fps/average while moving
Safari 17-18 fps/average while moving
Firefox 11-12 fps/average while moving (another issue was that Firefox wouldn't allow me to hold down the arrow key, it had to be spammed to keep it moving)

Some other things I've noticed is that almost all of the AJAX for Blogger doesn't work, or has issues (the auto-save fails, and quite a few of the buttons for font, links, etc don't function correctly)
It seems to use a pretty consistent 100% cpu process at idle.
I had to copy/publish this post from another browser because Chrome didn't like the 'PUBLISH POST' button

I do like it so far though and I'm sure they'll get some of these issues resolved, it isn't even beta yet so it's working better than expected already. :)

Block/Closure Extension to C/Objective C/C++

I've been trying to force myself to get back into some Objective C/Cocoa development. I got a bit of an itch again after looking into the new OpenCL. If you don't want to read all about it it's basically a standard that Apple started and was able to get Intel, Nvidia and AMD on board and eventually submitted it to the Krhonos group for standardization. It basically allows you to write programs to take advantage of all the cores of cpus/gpus, similiar in what Nvidia was doing with Cuda. To ease development when working with OpenCL blocks/closures where also added as an addition to C.

I really wanted to play around with some of these but was hard pressed to find any good examples for both C and ObjC.

So here's a quick one in plain ol' C

void test1( void(^block)(char*) ) {

    block("Message from 'block'");


int main( int argc, const char *argv[] ) {

    test1(^(char *msg) { printf("Block Message: %s\n", msg); });

    return 0;


And in ObjC
- interface

#import <objc/Object.h>

typedef void(^Block)(char*);

@interface HelloWorld : Object {


- (void) displayBlockMessage: (Block)block;


- implementation

#import "HelloWorld.h"

@implementation HelloWorld

- (void) displayBlockMessage: (Block)block {

block("<HelloWorld> block message");



- main

#import "HelloWorld.h"

int main( int argc, const char *argv[] ) {

HelloWorld *helloWorld = [[HelloWorld alloc] init];

// inline block

[helloWorld displayBlockMessage: ^(char *msg) {

printf("%s\n", msg);


// declared block

Block block = ^(char *msg) {

printf("-=%s=-", msg);


[helloWorld displayBlockMessage: block];

return 0;


One thing you'll notice is that the interface declares 'block (typedef void(^Block)(char *);' This is because you need a type for the 'displayBlockMessage' functions signature (unless there's some trick :) ). Another thing is that I'm inheriting from the base objc object type and not the Cocoa NSObject, it will work either way I was just playing around with also compiling it on Windows.

I'm still surprised that C is getting block/closures before Java. C++0x is also suppose to have their own implementation as well.

TextMate Snow Leopard and

During my previous post I needed to copy RTF from a text-editor for code snippets for this blog. XCode does this by default and so does Eclipse. But TextMate does not. Google told me that this should do the trick. It's a bundle for TextMate called 'Copy as RTF' by Dr Nic Williams. I found numerous people praising this little plugin so I decided to downloaded it.

If you don't install it by using GIT, as the instructions say, you can simply download it from the above site and once un-tar'd change the name of the folder (something like 'drnic-copy-as-rtf-tmbundle-e490dbf') to 'Copy as RTF.tmbundle'. Then copy this to ~/Library/Application\ Support/TextMate/Bundles. If the bundles directory is not there then simply create it and then copy.

If TextMate is already running then click 'Bundles -> Bundle Editor -> Reload Bundles' to reload the bundles. It should work from here. I had an issue where it wasn't doing anything. I was able to track down the issue by altering the output of the bundle to get the exception. I'm by no means a TextMate expert I just happened to stumble across this. I went to 'Bundles -> Bundle Editor -> Show Bundle Editor' expanded the 'Copy as RTF' and selected the node. Then on the right pane changed the 'Output' drop-down from 'Discard' to 'Show as HTML'.

I was getting a Ruby deprecation warning and an exception about a corrupt theme. I didn't have any themes installed though. I looked through the Ruby code for the plugin where that error message was and found that it was looping through my non-existent 'Themes' folder. I downloaded a random theme and installed it and after that the exception went away and I can now get RTF output for any language in TextMate.

Thursday, October 08, 2009

Syntax Highlighting in Your Blog

A few years ago I used to use Apple's Pages program to do my blogs. Pages would allow me to save a document as HTML, much the same way that Word would. So I would set off constructing my blog in Pages much like I would a normal document. I was able to copy code from Eclipse into Pages and it would preserve the formatting and colors. Now the HTML wasn't perfect and needed a tiny bit of work for a seamless transfer into Blogger. I created a small Ruby script to strip out the un-needed things and add in the other bits. In the end I was able to save my document as HTML, run my Ruby script against it and paste the resulting text straight into blogger and it would look just as it had in Pages.

Well... Apple removed that feature from Pages and I was stuck looking for other options. I was searching tonight and noticed a few people using the demo of GeSHi and editing the resulting page source etc. That was a bit more work than I was willing to do.

I remembered a while back that Google Docs would also preserve RTF when pasting. So I embarked on a test. I copied some source code from XCode and pasted it into Google Docs. Then I did a quick look at the DOM and found exactly the piece I wanted. I then added this bit in the URL(as one line)


And copied the result from the pop-up and pasted it into my blog. The only caveat is the editor you're copying from needs to copy your snippet as RTF

(I used this to generate the above javascript)

Friday, October 02, 2009

Snow Leopard Python 32-bit Script

With the release of Snow Leopard Apple has made good by making a big switch in the core applications to 64-bit. You can read all about it. How they shrunk the size of them, made them quicker, etc. iTunes however is still 32 :( Not that it really matters.

One that has mattered for me however is Python. Snow Leopard comes with Python 2.6 instead of 2.5 which it's predecessor included. The 2.6 that's included in SL also defaults to 64 bit. Although this is 'geeky' cool it has caused quite a few problems with other python applications/libraries. I'm sure this will change in the future but for now it's not so much fun.

A quick fix that quite a few people have done is doing either from the terminal
  defaults write Prefer-32-Bit -bool yes

With the first it's a permanent change, unless you re-execute it with 'no' in place of 'yes'.
The second is per session.

I didn't like the idea of making it permanent, and switching it all the time so I created a quick script.

#! bin/sh

python $PY_ARG

I also created the directory /usr/local/bin, as this isn't created in the default SL install but it is included in the default .bash_profile path variable so you don't have to update your path.

(I saved mine as
Then do a quick chmod to add the executable bits (sudo chmod 755 or sudo chmod u+x

Now I can simply type in '' and I've got Python 2.6 in 32-bits. Or if I wanted to run a python app/script in 32-bit I could type in ''

Happy scripting!!

Taskbar At The Top Is Naughty

I used to like my Windows taskbar on the side but after using Ubuntu a bit, and using a Mac for quite some time I'm now a bit biased to having it at the top. I noticed something cool today that my new Windows 7 box does for me. An application that I was using opens up a new instance of IE8 for me and sets it to full screen. After it loads I hit 'ALT' and then '[T]ools' and select 'Developer Tools'. It loads up the much improved IE Developer Tools with one small little glitch. The top of the application is underneath my taskbar.

Awright, I right click on the app in the taskbar expecting the 'move' option that's in XP. Ummm.. it's gone.. Awright lets move my taskbar back to the bottom of the screen and then move the window and then move the taskbar back to the top. I got inconsistent results with this step. Sometimes when I moved the taskbar back to the top it would be a pal and move the application back under the taskbar and sometimes it would leave it where it was after I moved it.

It would consistently open the dev tools under the task bar if IE was loaded to a full screen.

I love features! They give me something to do when I'm bored

Windows 7, .NET and IPv6

I'm still recovering from my recent Windows VM death at work and still learning the ropes with Windows 7. I stumbled across another one of those 'uggghh' moments today.

We have an application that does some impersonation if you are within our firewall and part of the same non-routable subnet blah blah... I noticed that from within my Windows 7 VM I could not hit a portion of our application. A nice little exception was occurring. From outside my VM I didn't have any issues.

After a quick look it was due to local connections to IIS defaulting to an IPv6 address, no 'localhost'. So I navigated through the windows to get to the network card settings and disabled the IPv6 protocol for the card. 'That should do it' I thought. Nope! It still used the IPv6 for loopback.

Awright Google, lead me towards the light. This post started out the same way. Disabling the IPv6 for the card, but towards the bottom there's a lovely registry, cringe, modification. Basically it's in 'HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip6\Parameters. Add a 32-bit DWORD item with the name of 'DisabledComponents' and a value of '1'. You also have to reboot :(

'Awright, now I'm good'.... WRONG! Now it was using '::1' for the loopback. Awright, lets see what's in the 'hosts' file. Go to 'C:\Windows\System32\drivers\etc' and open the 'hosts' file. And we find out that we can't simply edit it. Just like my previous .sln post you have to first load notepad, or whatever, as admin and then open the file. You'll have to re-navigate to the file since you also can't simply drag and drop the file onto your open session of notepad. Extra steps build character :)
Comment out the entry       .host
with a '#'

Yay! now it finally works like it used to....

Monday, September 21, 2009

Snow Leopard 64 bit kernel on a MacBook5,1

I was playing around with Snow Leopard today and for no better reason than "It's neat" I decided to try and boot into the 64 bit kernel. Apple has left the default kernel, on non server editions, to default to 32 bit. Many people have complained about this stating it's slower and can't access > 4GB of memory and can't run 64 bit apps correctly etc etc. Well it's all a little bit of FUD. Apple also included the 64 bit kernel ability but defaulted it to 32 mainly to avoid 3rd party software/drivers/kexts that rely on the 32 bit kernel. Windows Vista 64 had similar issues with drivers etc. And while in 32 bit kernel mode applications can still run in 64 bit mode just fine, without any type of 64 to 32 virtualization. So right now there really is no reason, for most, to run in 64 kernel mode other than "It's neat".

If you'd like to try, and have a 64 bit cpu with 64 bit EFI (Core 2 duo / Xeon), simply reboot/turn-on and hold down the '6' and '4' keys. If it works your computer will boot a little bit slower as it makes the switch (if you set it to always boot in 64 bit mode you wont see this delay). You can check wether it worked or not by either checking the kernel process in the Activity Monitor or type
  uname -a
in the terminal. The result will end in 'x86_64' if it worked. Or you can also click the 'Apple' and go to 'About This Mac' and click the 'More Info...' button. From there click the 'Software' group towards the bottom. The line that says '64-bit Kernel and Extensions' should say 'Yes'.

If it didn't work then you may be lucky like me and have a MacBook or Air etc. Apple has black-listed these and deemed it an option only available for the elite Pros (MacBook Pros, MacPros...and XServes). But you can still try it thanks to this guy, Amit Singh. It's been a while since I've had to use a hex-editor for something like this but it was fun :)

0xED, and Hex Fiend are both good...

Basically I followed his post pretty close. Simply made a copy of /usr/standalone/i386/boot.efi (I called it boot64.egi) as   /System/Library/CoreServices/boot64.efi
Then opened it with a hex editor and adjusted the 'black-flag' bit value for my corresponding machine.
(I didn't have to chown the file or chflags as my copy was already set)
Then blessed it with
  sudo bless --folder /System/Library/CoreServices --file /System/Library/CoreServices/boot64.efi
This sets the newly modified .efi to be used during boot.

After that you can now use the '6' + '4' and the '3' + '2' options while booting/restarting.

I also set mine to always load using the 64 bit kernel, again for no better reason than "it's neat-o". This can be done by editing the file
And change this
  <key>Kernel Flags</key>

to this
  <key>Kernel Flags</key>

Now Snow Leopard will boot by default with the 64 bit kernel, you can still hold down the '3' + '2' to boot using the 32 bit kernel.

I'm running on a pretty fresh install of Snow Leopard and haven't done a whole lot of testing yet. But so far most things run great. 32 bit applications still function fine in their 32 bit modes as well. The only application that hasn't worked so far is VMWare Fusion, but this may change with the next version or so. VirtualBox does indeed work with the 64 bit kernel though so I will be trying that out with Windows 7 in the next few days.

Friday, September 18, 2009

Windows 7 and Visual Studio SLN files.... uggh

My 2003 server VM went out the other day at work so I figured I try out the new Windows 7 that I've been hearing so much goodness about.

I downloaded the ISO and began the install (installing within Fusion). I left to go get a drink thinking it would take no less than an hour. I came back to my desk and was very nicely surprised to see that the install had finished. I think this was the fastest Windows install I've ever done.

Another nice thing I've noticed so far is how much easier it is on my system. Before 2003 was always using some of my cpu doing whatever it is that it does. 7 on the other hand lets my system idle at around 3.5% (running in Fusion). It also seems snappier as well. So far I was really quite impressed, well first impressions anyway.

Then some ugliness started shining through. The "Yes I really really really do want to run this application" UAC stuff isn't as bad as it is in Vista, but it's still pretty annoying at best. I began loading my work projects over and tried to double click a web solution. Well, it threw up about 4 dialogs that I had to click whatever on to make them go away. These where all UAC related dialogs. I then set VS to always run as administrator, so much for the UAC protection eh. Then all seemed to be good in the world, until I tried to double click the solution again. I watched as the little loading spinner briefly popped up and then went away. Then I waited... and waited... Nothing, no error message, no UAC.... NOTHING. So I took the option to always run as admin off and I was back to where I started.

I found this 'feature' according to MS
That is quite frankly, stupid.
I guess you can set .sln files to always load with VS2008, or whatever, and that fixes it. But it's just kinda ugly. The sad thing is that the bug was reported back in 2007 so I don't think it will be resolved any time soon.

I guess I'll hope that I love everything else about it and that nothing else is wrong..

Tuesday, September 08, 2009

I guess after six years I can't complain

I was a little late paying my internet bill this month to Comcast, as they kinda screwed it up the month before.... It went out today and I thought it may have been just because the bill was late.

For the last six years I've had two cable modems on a single account. Comcast hadn't ever quite figured it out. It's been nice having Vonage on one modem with a wireless router and everything else on the other modem.

Well when I finally called in today to see if it had just been disabled because of my bill the support person informed me that they had removed a 'rogue' modem that had been on my account.

It's been there for six years so I can't complain I guess. But I sure will miss the thing

Monday, September 07, 2009

IE8 document.compatMode

With all the proliferate hacks out there for IE browsers, IE8 stacks some more on top.

During our last release cycle our QA department started sending back issues revolving around the new IE8 browser. Many of these where related to javascript. One simple fix to get this out the door was to just force IE8 into compatibility mode until we had more time to deduce all the little issues. Unfortunately this fixed some issues while creating others, ugh.

Basically it boiled down to this. Our ASP application says that the browser is IE8, and in javascript it will also say that it is version eight, while in normal mode. The issue, when in compatibility mode, is that it still registers in ASP as IE version eight, but in javascript it now says it is version seven, or whatever compatibility mode is used. So additional IE specific code was added on top of already IE specific code to now check document.documentMode as well.

I do like working with IE8 much more than it's predecessors, but it is still not quite up to par which just adds more development time to now make things work in all the different, very different, flavors of IE.

Here's a good summary of things IE8 finally got right and others that are still not.

And VML also took a hit with the new browser.

Another issue with VML that I noticed the other day was that IE8 now supports element.hasAttribute/getAttribute. But I guess the support is not that great, at-least for VML.
I had a simple script that works with both SVG, the standard, and VML, the non-standard.
There was a method that did something like

if(elem.hasAttribute) { do standard SVG stuff here }
else { do non-standard VML here }

With IE8 the first condition will now be hit, which is good but also bad since IE doesn't support SVG. So yet more IE code was added to resolve this issue. I figured I'd take advantage of the newly getAttribute functionality in IE8 to get the 'fillColor' attribute of a VML element.

Well, this didn't quite exactly work. The attribute was never found. IE8 seems to only report a single attribute for every VML element regardless of how many are actually in the XML. So I could get the first attribute using the new 'getAttribute' in IE8, but unfortunately 'fillColor' was not the first attribute within my VML, so it was back to changing the code yet again for IE to ignore the newly added 'getAttribute' and go back to elem['attrib'] instead, since this would actually give me ALL of the attributes per element.

I guess this is what we have to look forward to until ver. 9 :)

The Way It Should Be

Upgrading/Moving from one computer to another is always painful and usually the only thing that makes it worthwhile is if you're moving to a newer, much nicer, machine. I recently got a MacBook 13.3" (3 weeks before the pro was released, sad) and have been living partially on that. My tower, Mac Pro, has been feeling somewhat neglected. My wife has been doing more video editing lately and needed something a bit faster. I decided to give her my tower, gulp, since I haven't been using it much anyhow.

I was already partially up on my laptop so it was just a matter of copying over any remaining items. After this was done I did a fresh install on the tower. I've seen the 'MIgration Assistant' application before but had never really given it much thought. I had made the basic assumption that it wouldn't do exactly what I wanted and there would be a bunch of manual intervention as well. I had installed the new Snow Leopard on the tower while her old laptop was running the previous Leopard. I decided to give the Migration Assistant a try, expecting a lot of additional work afterwards. I hooked up the computers via Firewire and started the Migration....

The assistant started up and located the old mac right away. Then it searched through it and gave me a check box list of items I could move/leave. I left everything default and let it run. My wife has our whole family album all digitized in iPhoto, about 130 Gigs not including videos, so you can imagine that it did take some time.

Once this was all finished I was very surprised by the results. It actually migrated over her user from the old computer. It kept her login items, login image etc. It even set her wallpaper to what it was before with all the same settings. Screen saver was the same, along with settings. "That's pretty neat" I thought as I opened up iTunes. Wow, iTunes kept everything just as it was on the old machine, ratings etc. Next I opened up her email. All her emails where setup and it even moved over her existing inbox emails! Her calendar kept all her events and so did Address Book. Then I looked down in her application bar. It was setup just as it was on her previous computer. It even moved over applications that hadn't been installed yet!

When everything was said and done the only thing she noticed after the move was that her computer was faster. There was nothing else that she noticed different from the day before.

Thursday, April 23, 2009

IE still sucks...

I was given a small internal web project to work on last week. The best part about it was that I was given free reign on it's design and technologies used. I was pretty excited since I could finally use all of the new HTML/CSS/ECMAScript standards (existing and proposed). This was mainly nice since I didn't have to do stupid hacks and things for all of the different flavors of IE.

I didn't 'have' to support IE for this project but decided that I'd finish the project and then see how the new IE8 faired.

Well... I was, not surprisingly, let down again by IE. Here are a few things I noticed right off the bat.

1) No canvas support :( STILL!!! Firefox, Safari, Chrome and Opera support this. I guess MS is not being pro-active about supporting new standards as the canvas tag is part of the HTML5 spec. There is however this project ExplorerCanvas which does some nice javascript conversions to VML for IE so that you can use most of the features of the canvas tag.

2) Proposed ECMAScript Harmony features have been left out. This is funny since MS was one of the big proponents of limiting the proposed features of ES4 and yet they still can't get the limited functionality implemented (of which Firefox and Safari already support). For instance the new getters/setters and 'foreach' function of arrays makes IE8 confused (these are just a couple I noticed).

I wasn't too surprised by this lack of new features. But I was surprised to see some CSS3 selectors working, and that the site rendered very close to how Firefox and Safari/Chrome did (but not exactly, as there where still some things that where off). So I guess I'm happy that IE has made a huge jump since IE7, but it's still not there which sucks since IE6 is still one of the most dominant browsers used so I guess we can all look forward to missing things in IE8 for the foreseeable future. Ugghh..