$( "<div>" ).testWidget({ option2: "value2" });
});
+test( "._getCreateEventData()", function() {
+ expect( 1 );
+ var data = { foo: "bar" };
+ $.widget( "ui.testWidget", {
+ _getCreateEventData: function() {
+ return data;
+ }
+ });
+ $( "<div>" ).testWidget({
+ create: function( event, ui ) {
+ strictEqual( ui, data, "event data" );
+ }
+ });
+});
+
test( "re-init", function() {
var div = $( "<div>" ),
actions = [];
}
this._create();
- this._trigger( "create" );
+ this._trigger( "create", null, this._getCreateEventData() );
this._init();
},
_getCreateOptions: $.noop,
+ _getCreateEventData: $.noop,
_create: $.noop,
_init: $.noop,