あんまりする事はないと思うんですけど、複数のウィンドウ間でコールバック関数をやりとりするときに障害になりました。 別ウィンドウの Function オブジェクトを typeof すると "function" じゃなくて "object" になってしまいます。所属ウィンドウ内のFunctionと instanceof すると true にはなります。 ここはメソッドの有無から判断……でしょうか。 var g_wnd; var g_func = function() {}; document.getElementById('open').onclick = function() { g_wnd = window.open(location.href); }; document.getElementById('run').onclick = function() { // 子ウィンドウ if (
![IEで別ウィンドウのFunction判別 - jsdo.it - Share JavaScript, HTML5 and CSS](https://cdn-ak-scissors.b.st-hatena.com/image/square/cd3bca1c2abc5de7fda3562f157b529a53d1a1a6/height=288;version=1;width=512/http%3A%2F%2Fjsdo-static-contents.s3.amazonaws.com%2Fimages%2Fcapture%2Fq%2FF%2Fc%2FqFcy.jpg%3Ft%3D1295084501)