diff options
author | Alexander Schmitz <arschmitz@gmail.com> | 2014-08-21 09:02:45 -0400 |
---|---|---|
committer | Scott González <scott.gonzalez@gmail.com> | 2014-08-27 09:08:01 -0400 |
commit | 1abf9fc71f11996168fd81da7ebf25218f5ad4a4 (patch) | |
tree | 8e26cbdf48cecd5062fea0e28f715ab5a02a35c3 /ui/widget.js | |
parent | bfb65076e4727d4d7fc88561b0304853accb925c (diff) | |
download | jquery-ui-1abf9fc71f11996168fd81da7ebf25218f5ad4a4.tar.gz jquery-ui-1abf9fc71f11996168fd81da7ebf25218f5ad4a4.zip |
Widget: Ensure window and document are defined in _getCreateOptions()
Closes gh-1320
Diffstat (limited to 'ui/widget.js')
-rw-r--r-- | ui/widget.js | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/ui/widget.js b/ui/widget.js index 6ef161591..41425b1a9 100644 --- a/ui/widget.js +++ b/ui/widget.js @@ -254,10 +254,6 @@ $.Widget.prototype = { 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 = $(); @@ -280,6 +276,11 @@ $.Widget.prototype = { 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(); |