});
test( "._getCreateOptions()", function() {
- expect( 1 );
+ expect( 3 );
$.widget( "ui.testWidget", {
options: {
option1: "valuex",
option3: "value3"
},
_getCreateOptions: function() {
+ strictEqual( this.window[ 0 ], window, "this.window is properly defined" );
+ strictEqual( this.document[ 0 ], document, "this.document is properly defined" );
+
return {
option1: "override1",
option2: "overideX"
this.element = $( element );
this.uuid = widget_uuid++;
this.eventNamespace = "." + this.widgetName + this.uuid;
- this.options = $.widget.extend( {},
- this.options,
- this._getCreateOptions(),
- options );
this.bindings = $();
this.hoverable = $();
this.window = $( this.document[0].defaultView || this.document[0].parentWindow );
}
+ this.options = $.widget.extend( {},
+ this.options,
+ this._getCreateOptions(),
+ options );
+
this._create();
this._trigger( "create", null, this._getCreateEventData() );
this._init();