X-Git-Url: http://git.osdn.jp/view?a=blobdiff_plain;f=0.6.x%2Fjs%2F05_util%2F06_XWindow.js;h=e6da249264f3a540cdf47d8a3f97d3baf423bd9b;hb=dd4fcb6269ff74be253a767826aa5dfb96dd4acc;hp=3fbe53a505b29c40ed71d7473c5030a3bd40053c;hpb=99e4c667c30bf89551a3546d2cef55fc13b2c301;p=pettanr%2FclientJs.git
diff --git a/0.6.x/js/05_util/06_XWindow.js b/0.6.x/js/05_util/06_XWindow.js
index 3fbe53a..e6da249 100644
--- a/0.6.x/js/05_util/06_XWindow.js
+++ b/0.6.x/js/05_util/06_XWindow.js
@@ -1,6 +1,7 @@
/**
* å¥çª(å¥ã¿ã)ã®æä½
*
+ * - ãããã¢ãããããã¯ãããªãããã«ãpointer event, click event å
ã§ã¤ã³ã¹ã¿ã³ã¹ãä½ã
*
- win.kill() ã§å¥çªãéãã
*
- win.kill() 以å¤ã§éããããå ´åãã¦ã¼ã¶ã¼ã®[x]ãã¿ã³æä½ããä»ã®scriptã«ãã£ã¦éããããå ´åãX.Event.UNLOAD ã¤ãã³ããçºãã¦èªèº«ã kill ããã
*
@@ -32,10 +33,6 @@ var X_Window = X[ 'Util' ][ 'Window' ] = X_EventDispatcher[ 'inherits' ](
html = options[ 'html' ],
doc = X_Script_try( X_Object_find, [ page, 'document' ] );
- if( !url && html ){
- this[ 'write' ]( html );
- };
-
X_ViewPort[ 'listenOnce' ]( X_EVENT_UNLOAD, this, X_Util_Window_handleEvent );
this[ 'listenOnce' ]( [ X_EVENT_UNLOAD, X_EVENT_KILL_INSTANCE ], X_Util_Window_handleEvent );
@@ -43,6 +40,10 @@ var X_Window = X[ 'Util' ][ 'Window' ] = X_EventDispatcher[ 'inherits' ](
page : page,
timerID : X_Timer_add( options[ 'interval' ] || 500, 0, this, X_Util_Window_onTimer )
} );
+
+ if( !url && html ){
+ this[ 'write' ]( html );
+ };
},
/**
@@ -99,6 +100,17 @@ var X_Window = X[ 'Util' ][ 'Window' ] = X_EventDispatcher[ 'inherits' ](
var pair = X_Pair_get( this );
if( pair ) return X_Script_try( X_Object_find, [ pair.page, selector ] );
+ },
+
+ /**
+ * å¥çªã«focusãã
+ * @return {Window} ãã§ã¼ã³ã¡ã½ãã
+ */
+ 'focus' : function(){
+ var pair = X_Pair_get( this );
+
+ pair && pair[ 'focus' ]();
+ return this;
}
}
);