IBM Developer is your one-stop location for getting hands-on training and learning in-demand skills on relevant technologies such as generative AI, data science, AI, and open source.
MochiKit - スタイルガイド 翻訳 原文:StyleGuide - MochiKit - Trac MochiKitのコーディング規約の大部分はPythonのPEP8とPEP 7(この順に優先される)に従っている。しかし、JavaScript特有の点もいくつかある : ビルトイン・オブジェクト、およびそのプロトタイプを絶対に変更しない。(例えば、このようなことは行わない: Object.prototype.foo = REALLY_BAD! ) 代わりに関数の使用を志向する。 関数のようにtypeof演算子を使用する : typeof x ではなく typeof(x) コンストラクタを使用するときには引数を括弧に入れる : new Error, foo ではなく new wError("foo") 常に完全修飾子で他の関数を呼び出す。また利便性のための記号的なエイリアスも用いない
Edit MochiKit's DOM utilities MochiKit, a library to "make javascript suck less" (read provides AJAX and other javascript functionality) provides DOM utilities to programmatically create HTML, rather than embedding html in a string. Doing it programmatically provides a few benefits, such as escaping of entities and guaranteeing well-formed html. But it may seem like extra work for those used to w
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く