あんまりする事はないと思うんですけど、複数のウィンドウ間でコールバック関数をやりとりするときに障害になりました。 別ウィンドウの 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 (