X-Git-Url: http://git.osdn.jp/view?a=blobdiff_plain;f=0.6.x%2Fjs%2F01_core%2F01_X.js;h=5c0ef3d2254271b0aaa65b05dd8fddb49c63106c;hb=24f935c7a129b0a00d800e4983da6491a913aeef;hp=49c8ed50e8cec53b43dc1cc913e0205fda9cd1dc;hpb=36e3d975f201a804af90f1a21ff352d14a438f6c;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 49c8ed5..5c0ef3d 100644
--- a/0.6.x/js/01_core/01_X.js
+++ b/0.6.x/js/01_core/01_X.js
@@ -1,25 +1,71 @@
-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 = new Function( 'return X._shortcut && X._shortcut.apply( X._shortcut, arguments )' ),
- X_TEMP = { onSystemReady : [] };
+ X_EMPTY_OBJECT = {},
+ X_TEMP = { onSystemReady : [] },
+ X_emptyFunction = new Function,
+ X_shortcutFunction,
+ X_shortcutContext;
+
+/**
+ * ãã¼ã¸ã§ã³æåå:"0.6.123"
+ * @type {string} */
+X[ 'VERSION' ] = '0.6.143';
-X.VERSION = '0.6.89';
-
-X.bootTime = + new Date;
+/**
+ * ãã¼ãã¿ã¤ã ms
+ * @type {number} */
+X[ 'bootTime' ] = + new Date;
-X.emptyFunction = new Function;
+/**
+ * 空ã®é¢æ°
+ * @type {Function} */
+X[ 'emptyFunction' ] = X_emptyFunction;
- // defer ã®å ´åãããã®ã§ãdocument.readyState ãè¦ã MacIE 㧠false
-X.inHead = (function( s ){
+/**
+ * ãã®scriptã¯headã¿ã°ã®ä¸ã«ãããï¼
+ * @type {boolean} */
+// TODO defer ã®å ´åãããã®ã§ãdocument.readyState ãè¦ã
+// MacIE 㧠false
+X[ 'inHead' ] = (function( s ){
if( !s ) return false;
if( !s.length ) return false; // Safari1.3 312.8 ã§error
s = s[ s.length - 1 ];