ウィジェットで dojo/aspect を使用する方法がわかりません。
次の点を考慮してください。
require( [ 'dijit/form/Button' ],
function( Button)
{
var myButton = new Button({label: 'Click me!'});
} );
ボタンの postCreate() または startup() メソッドに接続して、いつレンダリングされたかを確認するにはどうすればよいですか?
メソッドにアドバイスを追加しても意味がないようです。ここでコメントを参照してください。
require( [ 'dijit/form/Button', 'dojo/aspect' ],
function( Button, aspect )
{
// I cannot use aspect.after() here as I have no instance yet
var myButton = new Button({label: 'Click me!'});
// ...but I cannot do it here either as the lifecycle has already kicked off
} );
(このボタンは、問題を説明しやすくするためのものです。私の現実の問題には、他のウィジェットを含むウィジェットが含まれているため、アクションを実行する前に、すべてのウィジェットがいつレンダリングされたかを知る必要があります)。