OSDN Git Service

Version 0.6.149, fix X.Audio & X.UI.
[pettanr/clientJs.git] / 0.6.x / js / 01_core / 16_XViewPort.js
index d2540f4..5a4ad5f 100644 (file)
@@ -46,6 +46,8 @@ X_ViewPort = X_Class_override(
                                        return X_ViewPort[ 'dispatch' ]( X_EVENT_BEFORE_UNLOAD );
                                        
                                case 'unload' :
+                                       //https://developer.mozilla.org/ja/docs/Web/JavaScript/A_re-introduction_to_JavaScript
+                                       //Firefox 1.5 の bfcache が無効になりますので、他に理由がない限り Firefox では unload リスナを登録するべきではないことに注意してください。
                                        X_ViewPort[ 'dispatch' ]( X_EVENT_UNLOAD );
                                //alert('unload');
                                        X_ViewPort_document[ 'kill' ]();
@@ -304,12 +306,27 @@ X[ 'ViewPort' ] = {
 
                        X_ViewPort_rootElement = document.compatMode !== 'CSS1Compat' ? elmBody : elmHtml || elmBody;
 
-                       html = X[ 'Doc' ][ 'html' ] = X_Node_html = elmHtml && new Node( elmHtml )[ 'removeClass' ]( 'js-disabled' )[ 'addClass' ]( X_UA_classNameForHTML );
+       /**
+        * Node( documentElement )
+        * @alias X.Doc.html
+        * @type {Node}
+        */
+                       X[ 'Doc' ][ 'html' ] = html = X_Node_html = elmHtml && new Node( elmHtml )[ 'removeClass' ]( 'js-disabled' )[ 'addClass' ]( X_UA_classNameForHTML );
                        html[ '_flags' ] |= X_Node_State.IN_TREE;
-                       
-                       head = X[ 'Doc' ][ 'head' ] = X_Node_head = elmHead && new Node( elmHead );
-               
-                       body = X[ 'Doc' ][ 'body' ] = X_Node_body = new Node( elmBody );
+
+       /**
+        * Node( head )
+        * @alias X.Doc.head
+        * @type {Node}
+        */                     
+                       X[ 'Doc' ][ 'head' ] = head = X_Node_head = elmHead && new Node( elmHead );
+
+       /**
+        * Node( documentElement )
+        * @alias X.Doc.body
+        * @type {Node}
+        */             
+                       X[ 'Doc' ][ 'body' ] = body = X_Node_body = new Node( elmBody );
 
                        body[ 'parent ' ] = head[ 'parent' ] = html;
                        html[ '_xnodes' ] = [ head, body ];