X-Git-Url: http://git.osdn.jp/view?a=blobdiff_plain;f=0.6.x%2Fjs%2F01_core%2F16_XViewPort.js;h=5a4ad5f0a99022019057800d20747b1bd9171b96;hb=2956150a7c2798e60639b36d69b0c13f6b20a62a;hp=d2540f413fd202d45f818989d499550a0bfa82c6;hpb=adbf9e9a2c7d8e6857774f774742a7ff6fb50600;p=pettanr%2FclientJs.git diff --git a/0.6.x/js/01_core/16_XViewPort.js b/0.6.x/js/01_core/16_XViewPort.js index d2540f4..5a4ad5f 100644 --- a/0.6.x/js/01_core/16_XViewPort.js +++ b/0.6.x/js/01_core/16_XViewPort.js @@ -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 ];