8 * EventDispatcher.prototype.listen 参照
11 'listen' : function( type, arg1, arg2, arg3 ){
14 if( type <= X_ViewPort_readyState && type === 'DOMContentLoaded' ){
16 * X.Event.XDOM_READY 以後に listen した場合の対策
18 X_ViewPort_document[ 'asyncDispatch' ]( type );
21 f = X_Closure_classifyCallbackArgs( arg1, arg2, arg3 );
23 X_ViewPort_document[ 'listen' ]( type, this, arg1 );
25 if( f.cbKind === X_CLOSURE_FUNC_ONLY ){
26 X_ViewPort_document[ 'listen' ]( type, this, f.func, f.supplement );
28 X_ViewPort_document[ 'listen' ]( type, arg1, arg2, arg3 );
34 * EventDispatcher.prototype.listenOnce 参照
35 * @alias X.Doc.listenOnce
37 'listenOnce' : function( type, arg1, arg2, arg3 ){
40 if( type <= X_ViewPort_readyState && type === 'DOMContentLoaded' ){
42 * X.Event.XDOM_READY 以後に listen した場合の対策
44 X_ViewPort_document[ 'asyncDispatch' ]( type );
47 f = X_Closure_classifyCallbackArgs( arg1, arg2, arg3 );
49 X_ViewPort_document[ 'listenOnce' ]( type, this, arg1 );
51 if( f.cbKind === X_CLOSURE_FUNC_ONLY ){
52 X_ViewPort_document[ 'listenOnce' ]( type, this, f.func, f.supplement );
54 X_ViewPort_document[ 'listenOnce' ]( type, arg1, arg2, arg3 );
59 * EventDispatcher.prototype.unlisten 参照
60 * @alias X.Doc.unlisten
62 'unlisten' : function( type, arg1, arg2, arg3 ){
63 var f = X_Closure_classifyCallbackArgs( arg1, arg2, arg3 );
66 X_ViewPort_document[ 'unlisten' ]( type, this, arg1 );
68 if( f.cbKind === X_CLOSURE_FUNC_ONLY ){
69 X_ViewPort_document[ 'unlisten' ]( type, this, f.func, f.supplement );
71 X_ViewPort_document[ 'unlisten' ]( type, arg1, arg2, arg3 );
77 * EventDispatcher.prototype.listening 参照
78 * @alias X.Doc.listening
80 'listening' : function( type, arg1, arg2, arg3 ){
81 var f = X_Closure_classifyCallbackArgs( arg1, arg2, arg3 );
84 return X_ViewPort_document[ 'listening' ]( type, this, arg1 );
86 if( f.cbKind === X_CLOSURE_FUNC_ONLY ){
87 return X_ViewPort_document[ 'listening' ]( type, this, f.func, f.supplement );
89 return X_ViewPort_document[ 'listening' ]( type, arg1, arg2, arg3 );
92 'create' : X_Doc_create,
94 'createText' : X_Doc_createText
99 * X.Node 要素を作成する。この時点でツリーには追加されない。
100 * @alias X.Doc.create
101 * @param {string} tag タグ名
102 * @param {object} opt_attrs 属性
103 * @param {object} opt_css スタイル
106 function X_Doc_create( tag, opt_attrs, opt_css ){
108 switch( X_Node_getType( tag ) ){
109 case X_NodeType_STRING :
110 X_Node_newByTag = true;
111 return new Node( tag, opt_attrs, opt_css );
112 case X_NodeType_HTML_STRING :
113 list = X_HtmlParser_parse( tag, true );
114 for( i = list.length; 1 < i; ){
115 list[ --i ][ 'kill' ]();
122 * X.Node テキストを作成する。この時点でツリーには追加されない。
123 * @alias X.Doc.createText
124 * @param {string} textContent
127 function X_Doc_createText( text ){
128 X_Node_newByText = true;
129 return new Node( text );