ViewLogic: attachTo()
ViewLogic
を ViewElement
に取り付けます。
構文
ViewLogic.attachTo(containerToBeAttached, newHost) => ViewLogic | null
引数
-
containerToBeAttached
:ViewLogic
取り付ける対象の
ViewLogic
です。 -
newHost
:ViewElement
containerToBeAttached
の取り付け先のViewElement
です。
返値: ViewLogic
| null
引数 newHost
に既に ViewLogic
が取り付けられている場合はその ViewLogic
です。取り付けられていなかった場合は null
が返されます。
例外
TypeError
- 引数
containerToBeAttached
がViewLogic
でなかった場合 - 引数
newHost
がViewElement
でなかった場合
- 引数
解説
この関数の呼び出しは newHost.attach(containerToBeAttached)
と等価です。
メッセージ
メッセージの概要についてはメッセージパッシングを、他のメッセージについては ViewLogic
の状態変更を通知するメッセージを参照してください
このメソッド呼び出しでは containerToBeAttached
に以下のようなメッセージが送出されます:
id
:"vl$attached"
param
:{ target, newHost }
target
:ViewLogic
--- 変更されたViewLogic
自身newHost
:ViewElement
--- 新たにhost
に設定されたViewElement
origin
:ViewLogic
target
:ViewLogic
このメッセージは newHost.attach()
でも送出されます。