Mozillaでプログラミング(XUL) その2
■ このスレッドは過去ログ倉庫に格納されています
0072デフォルトの名無しさん
NGNGinstanceof 構文で出来るよ。
var channel = ioService.newChannel("http://www.example.com/", null, null);
alert(channel instanceof Components.interfaces.nsIHttpChannel); // おそらく true
alert(channel instanceof Components.interfaces.nsIFTPChannel); // おそらく false
var channel = ioService.newChannel("ftp://ftp.example.com/", null, null);
alert(channel instanceof Components.interfaces.nsIHttpChannel) // おそらく false
alert(channel instanceof Components.interfaces.nsIFTPChannel) // おそらく true
■ このスレッドは過去ログ倉庫に格納されています