OSDN Git Service

Version 0.6.153, fix layout @X.UI.
[pettanr/clientJs.git] / 0.6.x / js / 02_dom / 08_XNodeSelector.js
index 5a0857e..4b735e0 100644 (file)
@@ -1,4 +1,4 @@
-/**\r
+/*\r
  * Original code by ofk ( kQuery, ksk )\r
  * http://d.hatena.ne.jp/ofk/comment/20090106/1231258010\r
  * http://d.hatena.ne.jp/ofk/20090111/1231668170 \r
@@ -56,9 +56,6 @@ var
        // TODO { a : 1, A : 2, _ : 3,,, }\r
        X_Node_Selector__ALPHABET  = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ_-0123456789\\',\r
        X_Node_Selector__NUMBER    = '+-0123456789';\r
-\r
-// XMLWrapper のために今だけ外部に公開\r
-X_NodeSelector_parse = X_Node_Selector__parse;\r
                \r
 /*\r
  * セレクタ文字列の解析、但し一挙に行わず、ひと塊づつ\r
@@ -228,8 +225,30 @@ function X_Node_Selector__parse( query, last ){
        return not ? [ i + tmp + 1, [ combinator, 6, result ] ] : [ i, result ];\r
 };\r
 \r
-       // セレクター\r
-       X[ 'Doc' ][ 'find' ] = X_shortcutFunction = Node.prototype[ 'find' ] = X_NodeList.prototype[ 'find' ] = function ( queryString ){\r
+       /**\r
+        * selector を使って Node, NodeList を取得する\r
+        * @alias X.Doc.find\r
+        * @function\r
+        * @param {string} セレクター文字列\r
+        * @return {Node|NodeList}\r
+        */\r
+       X[ 'Doc' ][ 'find' ] = X_shortcutFunction =\r
+       /**\r
+        * selector を使って Node, NodeList を取得する\r
+        * @alias Node.prototype.find\r
+        * @function\r
+        * @param {string} セレクター文字列\r
+        * @return {Node|NodeList}\r
+        */\r
+       Node.prototype[ 'find' ] =\r
+       /**\r
+        * selector を使って Node, NodeList を取得する\r
+        * @alias NodeList.prototype.find\r
+        * @function\r
+        * @param {string} セレクター文字列\r
+        * @return {Node|NodeList}\r
+        */\r
+       X_NodeList.prototype[ 'find' ] = function ( queryString ){\r
                var HTML      = X_Node_html,\r
                        scope     = this.constructor === X_NodeList && this.length ? this : [ this.constructor === Node ? this : X_Node_body ],\r
                        parents   = scope, // 探索元の親要素 XNodeList の場合あり\r