JavaScriptのとあるオブジェクトが実装しているメソッドやプロパティを調べる方法を見つけた。
そこそこJavaScriptには自信をもっていたつもりだったが、深入りしない数年間で、相当な高級言語になった気がする。
クラスベース、プロトタイプベースといった概念やCore JavaScript 1.5 Guideを少しかじり始めて、痛感している。
最近流行り(?)のprototype.jsなんかもそうだ。$や#といったリテラル(?)で何故あそこまで柔軟な実装が可能なのかも調べてみたいと思ってる。
しごくプアなメモになるが・・・
◆documentオブジェクトの例
<script language=”JavaScript”>
for ( var obj in document ) {
document.write( obj + “<br>” );
}
</script>
No comments yet. You should be kind and add one!
By submitting a comment you grant typista a perpetual license to reproduce your words and name/web site in attribution. Inappropriate and irrelevant comments will be removed at an admin’s discretion. Your email is used for verification purposes only, it will never be shared.