From d1a6b0f02e34b0dc751f5db30a3fb3ca12b202e4 Mon Sep 17 00:00:00 2001 From: Norman Xu Date: Wed, 6 Jun 2012 10:55:38 +0800 Subject: [PATCH] fire wired notification after widget is instantiated --- src/weave.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/weave.js b/src/weave.js index 840627e..ede3a29 100644 --- a/src/weave.js +++ b/src/weave.js @@ -132,6 +132,11 @@ define([ "jquery" ], function WeaveModule($) { .apply(Widget, argv) .bind(DESTROY, onDestroy); + if (deferred){ + // notify deferred we wired an widget + deferred.notifyWith(widget, ['wired', widget]); + } + // Start $.Deferred(function deferredStart(dfdStart) { widget.start(dfdStart);