@@ -127,6 +127,7 @@ define(function (require, exports, module) {
127127 endCB && endCB ( ) ;
128128 }
129129 $NotificationPopup . removeClass ( "animateOpen" ) ;
130+ $NotificationPopup . removeClass ( "instantOpen" ) ;
130131 $NotificationPopup
131132 . addClass ( "animateClose" )
132133 . one ( "transitionend" , cleanup )
@@ -187,10 +188,11 @@ define(function (require, exports, module) {
187188 * The template can either be a string or a jQuery object representing a DOM node that is *not* in the current DOM.
188189 *
189190 * Creating a notification popup
191+ *
192+ * ```js
190193 * // note that you can even provide an HTML Element node with
191194 * // custom event handlers directly here instead of HTML text.
192195 * let notification1 = NotificationUI.createFromTemplate(
193- * ```js
194196 * "<div>Click me to locate the file in file tree</div>", "showInfileTree",{
195197 * allowedPlacements: ['top', 'bottom'],
196198 * dismissOnClick: false,
@@ -345,12 +347,13 @@ define(function (require, exports, module) {
345347 * ```
346348 * @param {string } title The title for the notification.
347349 * @param {string|Element } template A string template or HTML Element to use as the dialog HTML.
348- * @param {{dismissOnClick, autoCloseTimeS, toastStyle} } [options] optional, supported
350+ * @param {{dismissOnClick, autoCloseTimeS, toastStyle, instantOpen } } [options] optional, supported
349351 * * options are:
350352 * * `autoCloseTimeS` - Time in seconds after which the notification should be auto closed. Default is never.
351353 * * `dismissOnClick` - when clicked, the notification is closed. Default is true(dismiss).
352354 * * `toastStyle` - To style the toast notification for error, warning, info etc. Can be
353355 * one of `NotificationUI.NOTIFICATION_STYLES_CSS_CLASS.*` or your own css class name.
356+ * * `instantOpen` - To instantly open the popup without any open animation delays
354357 * @return {Notification } Object with a done handler that resolves when the notification closes.
355358 * @type {function }
356359 */
@@ -378,7 +381,7 @@ define(function (require, exports, module) {
378381 // Animate in
379382 // Must wait a cycle for the "display: none" to drop out before CSS transitions will work
380383 setTimeout ( function ( ) {
381- $NotificationPopup . addClass ( "animateOpen" ) ;
384+ $NotificationPopup . addClass ( options . instantOpen ? "instantOpen" : "animateOpen" ) ;
382385 } , 0 ) ;
383386
384387 if ( options . autoCloseTimeS ) {
0 commit comments