X-Git-Url: http://git.osdn.jp/view?a=blobdiff_plain;f=0.6.x%2Fjs%2F02_dom%2F20_XNode.js;h=0a0adf742568422e83e2d8fedda7dcd10c2f6445;hb=bfca1aa94da405643253af65c421f6665d6e6262;hp=d80b85596c56bc8e17b668a2c9fa2f596b8fe435;hpb=512e08f4d38eab417f9651277e8a50c08535cb07;p=pettanr%2FclientJs.git diff --git a/0.6.x/js/02_dom/20_XNode.js b/0.6.x/js/02_dom/20_XNode.js index d80b855..0a0adf7 100644 --- a/0.6.x/js/02_dom/20_XNode.js +++ b/0.6.x/js/02_dom/20_XNode.js @@ -253,6 +253,8 @@ var Node = X[ 'Node' ] = X_EventDispatcher[ 'inherits' ]( 'createTextAt' : X_Node_createTextAt, + 'createRange' : X_Node_createRange, + 'clone' : X_Node_clone, 'append' : X_Node_append, @@ -289,7 +291,7 @@ var Node = X[ 'Node' ] = X_EventDispatcher[ 'inherits' ]( 'toggleClass' : X_Node_toggleClass, 'hasClass' : X_Node_hasClass, - 'html' : X_Node_html, + 'html' : X_Node__html, 'text' : X_Node_text, 'call' : X_Node_call, 'each' : X_Node_each @@ -494,6 +496,15 @@ function X_Node_createTextAt( index, text ){ }; /** + * 選択されたテキストへの参照やテキスト座標情報 + * @alias Node.prototype.createRange + * @return {TextRange} 新規作成されたテキストレンジ + */ +function X_Node_createRange( a, b, c ){ + return X_TextRange( this, a, b, c ); +}; + +/** * Node のクローンを作成し返す。id もクローンされる点に注意。イベントリスナはクローンされない。 * http://d.hatena.ne.jp/think49/20110724/1311472811 * http://d.hatena.ne.jp/uupaa/20100508/1273299874 @@ -1103,7 +1114,7 @@ function X_Node_hasClass( v ){ * @return {string|Node} * @example node.html( '' ); */ -function X_Node_html( html ){ +function X_Node__html( html ){ var _ = '', q = '"', xnodes, n, i, l; // setter if( html !== undefined ){ // String 以外に Number や false null なども許可 @@ -1408,7 +1419,7 @@ function X_Node_startUpdate( time ){ removal.length = 0; }; - + // X_UA[ 'IE5' ] && ( X_elmBody.style.visibility = 'hidden' ); if( X_Node_html[ '_flags' ] & X_Node_BitMask_IS_DIRTY ){ @@ -1805,7 +1816,7 @@ var X_Node__updateRawNode = elm.setAttribute( 'class', that[ '_className' ] ) : ( elm.className = that[ '_className' ] ) ) : - ( elm.className && elm.removeAttribute( X_UA[ 'IE' ] < 8 ? 'className' : 'class' ) ); // className は ie7- + ( elm.className && elm.removeAttribute( X_UA[ 'IE' ] < 8 ? 'className' : 'class' ) ); // className は ie7- }; // attr