uupaa-0.7.alpha2.js
先ほど固めてみました。
- zip: http://code.google.com/p/uupaa-js/downloads/list
- ブランチ: http://code.google.com/p/uupaa-js/source/browse/#svn/tags/0.7_alpha2
ザックリとした Change Log
- -uu-background: -uu-canvas(ident) を追加
- uu.ajax.queue(), uu.jsonp.queue() を追加
- uu.color() の戻り値を変更
- ES5(ECMAScript-262 5th)で追加された、Array,Number,Boolean,String系の関数/メソッドをコアに組み込み
- uu.tween() の高速化
- window.getComputedStyle() を IE6+ でサポート
詳細な Change Log
uu.js
- uu.ajax(), uu.ajax.get(), uu.ajax.post(), uu.ajax.ifmod(), uu.jsonp() のコールバック関数 fn と ngfn に渡される引数が変更に
- uu.ajax(), uu.ajax.get(), uu.ajax.post(), uu.ajax.ifmod(), uu.jsonp() が ユニークなIDを返すように
- キューと待ち合わせをサポートする uu.ajax.queue(), uu.jsonp.queue() を追加
- uu.ajax.gc() を uu.ajax.expire() に名前を変更
- uu.ajax(, option,,) に option.method と option.nocache を追加
- "HEAD", "PUT", "DELETE" を利用可能に
- uu.ary() の用法を変更
変更前 // [1][clone] uu.ary(Array) -> new Array // [2][convert NodeList] uu.ary(NodeList) -> [elm, ...] // [3][convert arguments] uu.ary(arguments) -> [elm, ...] // [4][split comma] uu.ary("word,word") -> ["word", "word"] // [5][split space] uu.ary(" word word") -> ["word", "word"] 変更後 // [1][through] uu.ary([1, 2]) -> [1, 2] // [2][literal to ary] uu.ary(12) -> [12] // [3][string to ary] uu.ary("12") -> ["12"] // [4][string to ary(no split)] // uu.ary("12,12", 0) -> ["12,12"] // [5][convert NodeList] uu.ary(NodeList) -> [elm, ...] // [6][convert arguments] uu.ary(arguments) -> [elm, ...] // [7][string split(,)] uu.ary("word,word") -> ["word", "word"] // [8][string split(;)] uu.ary("word;word", ";") -> ["word", "word"]
- 配列のクローンを作成する uu.ary.clone() を追加
- uu.hash() の用法を変更
変更前 // [1][through] uu.hash({ key: "val" }) -> { key: "val" } // [2][to hash] uu.hash("key", mix) -> { key: mix } // [3][to hash(split comma)] uu.hash("key,a,key2,b") -> {key: "a", key2: "b"} // [4][to hash(comma + num)] uu.hash("0key,0,key2,1") -> {key: 0, key2: 1} // [5][to hash(split space)] uu.hash(" key a key2 b") -> {key: "a", key2: "b"} 変更後 // [1][through] uu.hash({ key: "val" }) -> { key: "val" } // [2][pair to hash] uu.hash("key", mix) -> { key: mix } // [3][split(,)] uu.hash("key,a,key2,b") -> { key:"a",key2:"b" } // [4][split(;)] uu.hash("key;a;key2;b", ";", 0) -> { key:"a",key2:"b" }
- デフォルト引数の補完を簡単にする uu.arg() を追加
- uu.attr(), uu.attr.get(), uu.attr.set() の用法を変更
変更前 // --- attribute --- // [1][get one attr] uu.attr(node, "attr") -> "value" // [2][get some attrs] uu.attr(node, "attr1,attr2") -> { attr1: "val", attr2: "val" } // [3][set one attr] uu.attr(node, "attr", "val") -> node // [4][set some attrs] uu.attr(node, { attr: "val" }) -> node attr: uumix(uuattr, { get: uuattrget, // [1][get all attrs] uu.attr.get(node) -> { all: attrs } // [2][get many attrs] uu.attr.get(node, 1) -> { many: attrs } // [3][get one attr] uu.attr.get(node, "attr") -> String // [4][get some attrs] uu.attr.get(node, "attr,...") -> Hash set: uuattrset // [1][set some attrs] uu.attr.set(node, { id: "hoge" }) -> node }), 変更後 // --- attribute --- // [1][get all attrs] uu.attr(node) -> { all: attrs } // [2][get many attrs] uu.attr(node, 1) -> { many: attrs } // [3][get one attr] uu.attr(node, "attr") -> "value" // [4][get some attrs] uu.attr(node, "attr1,attr2") -> { attr1: "val", attr2: "val" } // [5][set one attr] uu.attr(node, "attr", "val") -> node // [6][set some attrs] uu.attr(node, { attr: "val" }) -> node attr: uumix(uuattr, { get: uuattrget, // [1][get one attr] uu.attr.get(node, "attr") -> String // [2][get some attrs] uu.attr.get(node, "attr,...") -> Hash set: uuattrset // [1][set one attr] uu.attr.set(node, key, val ) -> node // [2][set some attrs] uu.attr.set(node, { key: val, ... }) -> node }),
- uu.color() を uu.color.js から uu.js に移動
- uu.color() に変換結果をキャッシュする仕組みを追加
- カラーキャッシュを削除する uu.color.expire() を追加
- uu.color("rgb(100%,100%,100%)") の % を 数値に変換する計算式を修正
- uu.color("hsl(360,100%,100%)") や uu.color("hsla(360,100%,100%,0.5)")をサポート(要uu.color.js)
- uu.color() が RGBAHash ではなく ColorHash を返すように変更, エラーで 0 を返すように変更
- 概念上の型としての RGBAHash を廃止し、ColorHash を追加
- ColorHash は { r: 0, g: 0, b: 0, a: 0, hex: "#000000", rgba: "rgba(0,0,0,0)", argb: "#00000000" } で構成
- uu.type(ColorHash) は uu.HASH
// --- color --- color: uumix(uucolor, { // uu.color("black") -> ColorHash or 0 add: uucoloradd, // uu.color.add("000000black,...") expire: uucolorexpire // uu.color.expire() }),
- 文字列を繰り返す uu.rep() を追加
- uu.str2json(str, quote = false) の第二引数を追加
- 内容的に含んでいるかどうかを判定する uu.has(mix, mix) を追加
- 内容的にほぼ同じ(そっくり)かどうかを判定する uu.like(mix, mix) を追加
- uu.RGBA, uu.UNDEF を削除
- ウインドウのクライアント領域(内側の大きさ)を返す uu.win.size() を追加
- MessagePump.prototype.regist(), MessagePump.prototype.unregist() を register(), unregister() に名前を変更
- uu.ecma5.js を削除し、uu.js に移動
- Array.isArray() を追加
- uu.fmt() から %A (RGBAHashに変換する機能)を削除
- 内部関数 _jsoninspect() に window.getComputedStyle の結果を json 化する機能を追加
- uu.fmt("%j"), uu.puff("%j"), uu.mix2json() で利用可能に
- 内部関数 _camelhash() が "-moz" で始まるCSSプロパティを正しく認識するよう修正
- Opera10.50 で uu.ver.advanced が true になるように変更
- uu.js に IE6+ で動作する window.getComputedStyle() を実装
uu.color.js
- uu.color.hex(), uu.color.rgba() を削除
- uu.color() が ColorHash を返すので、 result.hex または result.rgba により直接取得できるため廃止
uu.css.parse.js
- style 内で HTML のコメントが使われている場合に、無視するよう処理を追加
<style><!-- hoge {} --></style> <style><!-- huga {} /* 以前はここでエラーが発生していた */ --></style>
uu.css.validate.js
uu.css3.boxeffect.js
- -uu-canvas をサポート
uu.css3.js
- uu.css3.get(), uu.css3.set() で、複数のスタイルの取得と設定をサポート
- -uu-canvas から CanvasContext を取得する uu.css3.bgcanvas() を追加
- -uu-canvas を再描画するタイミングでコールバックする関数を設定する uu.css3.bgcanvas.redraw() を追加
uu.ev.js
- uu.ev.hover コールバックする関数内の this を設定しないように修正
変更前 uu.ev.hover(fn); function fn(evt, node) { alert(this === node); // true } 変更後 uu.ev.hover(fn); function fn(evt, node) { alert(this === node); // false }
uu.tween.js
- uu.tween(,,,prefn) prefn を廃止
- uu.tween.move() を廃止
- uu.tween.stop() を uu.tween.skip() に名前を変更