' ),\n * padded: true,\n * width: 300\n * } );\n *\n * $( 'body' ).append( popup.$element );\n * // To display the popup, toggle the visibility to 'true'.\n * popup.toggle( true );\n *\n * [1]: https://www.mediawiki.org/wiki/OOUI/Widgets/Popups\n *\n * @class\n * @extends OO.ui.Widget\n * @mixins OO.ui.mixin.LabelElement\n * @mixins OO.ui.mixin.ClippableElement\n * @mixins OO.ui.mixin.FloatableElement\n *\n * @constructor\n * @param {Object} [config] Configuration options\n * @cfg {number|null} [width=320] Width of popup in pixels. Pass `null` to use automatic width.\n * @cfg {number|null} [height=null] Height of popup in pixels. Pass `null` to use automatic height.\n * @cfg {boolean} [anchor=true] Show anchor pointing to origin of popup\n * @cfg {string} [position='below'] Where to position the popup relative to $floatableContainer\n * 'above': Put popup above $floatableContainer; anchor points down to the horizontal center\n * of $floatableContainer\n * 'below': Put popup below $floatableContainer; anchor points up to the horizontal center\n * of $floatableContainer\n * 'before': Put popup to the left (LTR) / right (RTL) of $floatableContainer; anchor points\n * endwards (right/left) to the vertical center of $floatableContainer\n * 'after': Put popup to the right (LTR) / left (RTL) of $floatableContainer; anchor points\n * startwards (left/right) to the vertical center of $floatableContainer\n * @cfg {string} [align='center'] How to align the popup to $floatableContainer\n * 'forwards': If position is above/below, move the popup as far endwards (right in LTR, left in RTL)\n * as possible while still keeping the anchor within the popup;\n * if position is before/after, move the popup as far downwards as possible.\n * 'backwards': If position is above/below, move the popup as far startwards (left in LTR, right in RTL)\n * as possible while still keeping the anchor within the popup;\n * if position in before/after, move the popup as far upwards as possible.\n * 'center': Horizontally (if position is above/below) or vertically (before/after) align the center\n * of the popup with the center of $floatableContainer.\n * 'force-left': Alias for 'forwards' in LTR and 'backwards' in RTL\n * 'force-right': Alias for 'backwards' in RTL and 'forwards' in LTR\n * @cfg {boolean} [autoFlip=true] Whether to automatically switch the popup's position between\n * 'above' and 'below', or between 'before' and 'after', if there is not enough space in the\n * desired direction to display the popup without clipping\n * @cfg {jQuery} [$container] Constrain the popup to the boundaries of the specified container.\n * See the [OOUI docs on MediaWiki][3] for an example.\n * [3]: https://www.mediawiki.org/wiki/OOUI/Widgets/Popups#containerExample\n * @cfg {number} [containerPadding=10] Padding between the popup and its container, specified as a number of pixels.\n * @cfg {jQuery} [$content] Content to append to the popup's body\n * @cfg {jQuery} [$footer] Content to append to the popup's footer\n * @cfg {boolean} [autoClose=false] Automatically close the popup when it loses focus.\n * @cfg {jQuery} [$autoCloseIgnore] Elements that will not close the popup when clicked.\n * This config option is only relevant if #autoClose is set to `true`. See the [OOUI documentation on MediaWiki][2]\n * for an example.\n * [2]: https://www.mediawiki.org/wiki/OOUI/Widgets/Popups#autocloseExample\n * @cfg {boolean} [head=false] Show a popup header that contains a #label (if specified) and close\n * button.\n * @cfg {boolean} [padded=false] Add padding to the popup's body\n */\nOO.ui.PopupWidget = function OoUiPopupWidget( config ) {\n\t// Configuration initialization\n\tconfig = config || {};\n\n\t// Parent constructor\n\tOO.ui.PopupWidget.parent.call( this, config );\n\n\t// Properties (must be set before ClippableElement constructor call)\n\tthis.$body = $( '