[Note] スクリプトに繊細な IE - IE is delicate to a script [Internet Explorer]

IE の JavaScript エンジンが、連想配列の最後の要素の後のコンマでエラーになることは有名ですが。

It is famous that the script engine of the IE disallow the comma (,) after the last element of an associative array.


This article is about a trouble in another pattern.

つい先日、はじめて ASP.NET AJAX 対応の ユーザー コントロールを作りました。

A few days ago, I created an user control of ASP.NET that supported ASP.NET AJAX client framework, for the first time.


And I faced the trouble that I couldn't understand.

aspx マークアップ内のスクリプト ブロックに書いた特定のスクリプトが反応しないんです。

The specified script in the script block of an aspx markup did not work.

Visual Studio デバッグ実行のときは問題なく動いていたのに、デプロイしたら動かないんです。

It had worked in the Visual Studio debug running, but it did not work after deploying.

せめて IE がエラーを出してくれれば問題を見つけやすいのですが、なにも言ってくれない。

I was sure that I could find the problem faster if IE told me something about the error, but the IE told me nothing.


I looked for the decisive cause of the trouble badly, but I couldn't.


By the way, I found some script lines had no semicolon (;) at the end of line, and modified it ...


It worked.


Was it caused by such a reason?

『最後のコンマ』の場合は、IE がエラーで教えてくれるから、まだ助かります。

The IE tells me about the "last comma" as an error, I'll notice it.


In this case "lost semicolon", I wasted much time because IE told me nothing.


I'll be careful in future.