* @alias X.Doc.listen
*/
'listen' : function( type, arg1, arg2, arg3 ){
+ var f;
+
if( type <= X_ViewPort_readyState && type === 'DOMContentLoaded' ){
/*
* X.Event.XDOM_READY 以後に listen した場合の対策
*/
X_ViewPort_document[ 'asyncDispatch' ]( type );
};
- type && arg1 && X_ViewPort_document[ 'listen' ]( type, arg1, arg2, arg3 );
+
+ f = X_Closure_classifyCallbackArgs( arg1, arg2, arg3 );
+ if( !f.kind ){
+ X_ViewPort_document[ 'listen' ]( type, this, arg1 );
+ } else
+ if( f.kind === X_CLOSURE_FUNC_ONLY ){
+ X_ViewPort_document[ 'listen' ]( type, this, f.func, f.supplement );
+ } else {
+ X_ViewPort_document[ 'listen' ]( type, arg1, arg2, arg3 );
+ };
return X[ 'Doc' ];
},
* @alias X.Doc.listenOnce
*/
'listenOnce' : function( type, arg1, arg2, arg3 ){
+ var f;
+
if( type <= X_ViewPort_readyState && type === 'DOMContentLoaded' ){
/*
* X.Event.XDOM_READY 以後に listen した場合の対策
*/
X_ViewPort_document[ 'asyncDispatch' ]( type );
};
- type && arg1 && X_ViewPort_document[ 'listenOnce' ]( type, arg1, arg2, arg3 );
+
+ f = X_Closure_classifyCallbackArgs( arg1, arg2, arg3 );
+ if( !f.kind ){
+ X_ViewPort_document[ 'listenOnce' ]( type, this, arg1 );
+ } else
+ if( f.kind === X_CLOSURE_FUNC_ONLY ){
+ X_ViewPort_document[ 'listenOnce' ]( type, this, f.func, f.supplement );
+ };
+ X_ViewPort_document[ 'listenOnce' ]( type, arg1, arg2, arg3 );
return X[ 'Doc' ];
},
* @alias X.Doc.unlisten
*/
'unlisten' : function( type, arg1, arg2, arg3 ){
- type && arg1 && X_ViewPort_document[ 'unlisten' ]( type, arg1, arg2, arg3 );
+ var f = X_Closure_classifyCallbackArgs( arg1, arg2, arg3 );
+
+ if( !f.kind ){
+ X_ViewPort_document[ 'unlisten' ]( type, this, arg1 );
+ } else
+ if( f.kind === X_CLOSURE_FUNC_ONLY ){
+ X_ViewPort_document[ 'unlisten' ]( type, this, f.func, f.supplement );
+ } else {
+ X_ViewPort_document[ 'unlisten' ]( type, arg1, arg2, arg3 );
+ };
return X[ 'Doc' ];
},
* @alias X.Doc.listening
*/
'listening' : function( type, arg1, arg2, arg3 ){
+ var f = X_Closure_classifyCallbackArgs( arg1, arg2, arg3 );
+
+ if( !f.kind ){
+ return X_ViewPort_document[ 'listening' ]( type, this, arg1 );
+ } else
+ if( f.kind === X_CLOSURE_FUNC_ONLY ){
+ return X_ViewPort_document[ 'listening' ]( type, this, f.func, f.supplement );
+ };
return X_ViewPort_document[ 'listening' ]( type, arg1, arg2, arg3 );
},