X-Git-Url: http://git.osdn.jp/view?a=blobdiff_plain;ds=sidebyside;f=0.6.x%2Fjs%2F01_core%2F01_X.js;h=8f84e890fb2ac5bde5cdfebd0bd6e4e335ba27a4;hb=HEAD;hp=7655eeed83f271696d22ebb3fd0c0a027a198e77;hpb=57e35f063b4a70fcec59db6ec7366b43f41f0ba4;p=pettanr%2FclientJs.git
diff --git a/0.6.x/js/01_core/01_X.js b/0.6.x/js/01_core/01_X.js
index 7655eee..8f84e89 100644
--- a/0.6.x/js/01_core/01_X.js
+++ b/0.6.x/js/01_core/01_X.js
@@ -1,41 +1,72 @@
-if( !window['console'] || ( window.parent && window.parent.log ) )
- console = { log : function(a){
- var win, elm;
- //alert(a);
- if( window.parent ){
- elm = parent.document.all ? parent.document.all.log : parent.log || parent.document.getElementById( 'log' );
- elm && ( elm.innerHTML = a + '
' + elm.innerHTML );
- };
- } };
+/**
+ *
API ããã¥ã¡ã³ãã¨ä½µãã¦ããã®æå³ãèæ¯ã綴ã£ã¦ããå¯èªæ¬ãã覧ãã ããã
+ * ã¯ã©ã¦ãçªå¤å° > ãºã£ããR APIææ¸ã®å¯èªæ¬
+ *
+ * @example // ã©ã¤ãã©ãªã¯ X ã¨ããåå空éã使ç¨ãã¾ãã
+ * //ã·ã§ã¼ããã³ã
+ * X( func ) == X.ViewPort[ 'listenOnce' ](X.Event.XDOM_READY, func);
+ * X('#mydiv') == X.Doc.find('#mydiv');
+ * @namespace X
+ */
+function X( v ){
+ if( X_Type_isFunction( v ) ){
+ X[ 'ViewPort' ][ 'listenOnce' ]( X_EVENT_XDOM_READY, v );
+ } else
+ if( X_shortcutFunction ){
+ return X_shortcutFunction.apply( X_shortcutContext || X, arguments );
+ };
+};
+
+//{+DEV
+if( !window['console'] || ( window.parent && window.parent.log ) ){
+ console = {
+ log : function(a){
+ var elm;
+ //alert(a);
+ if( window.parent ){
+ elm = parent.document.all ? parent.document.all.log : parent.log || parent.document.getElementById( 'log' );
+ elm && ( elm.innerHTML = a + '
' + elm.innerHTML );
+ };
+ }
+ };
+};
+
+if( !console.dir ) console.dir = function(){};
+//+DEV}
+
+//{-AUDIO
+//-AUDIO}
var undefined,
X_EMPTY_OBJECT = {},
X_TEMP = { onSystemReady : [] },
+ X_emptyFunction = new Function,
X_shortcutFunction,
X_shortcutContext;
/**
- * @namespace ã©ã¤ãã©ãªã¯ X ã¨ããåå空éã使ç¨ãã¾ããX( func ) 㧠X.ViewPort.listenOnce(X.Event.XDOM_READY, func)ããX('#mydiv') ã¨ã㦠X.Doc.find('#mydiv') ã®ã·ã§ã¼ããã³ãã«ãªãã¾ãã
- */
-function X( v ){
- if( X.Type.isFunction( v ) ){
- X.ViewPort.listenOnce( X.Event.XDOM_READY, v );
- } else
- if( X_shortcutFunction ){
- return X_shortcutFunction.apply( X_shortcutContext || X, arguments );
- };
-};
+ * ãã¼ã¸ã§ã³æåå:"0.6.xxx"
+ * @type {string} */
+X[ 'VERSION' ] = '0.6.181';
-X.VERSION = '0.6.103';
-
-X.bootTime = + new Date;
+/**
+ * ãã¼ãã¿ã¤ã ms
+ * @type {number} */
+X[ 'bootTime' ] = + new Date;
-X.emptyFunction = new Function;
+/**
+ * 空ã®é¢æ°
+ * @type {Function} */
+X[ 'emptyFunction' ] = X_emptyFunction;
+/**
+ * ãã®scriptã¯headã¿ã°ã®ä¸ã«ãããï¼
+ * @type {boolean} */
// TODO defer ã®å ´åãããã®ã§ãdocument.readyState ãè¦ã
+// TODO body ã®æç¡ãè¦ãã°OKã§ã¯ãªãã?
// MacIE 㧠false
-X.inHead = (function( s ){
+X[ 'inHead' ] = (function( s ){
if( !s ) return false;
if( !s.length ) return false; // Safari1.3 312.8 ã§error
s = s[ s.length - 1 ];