w/skins/MinervaNeue/resources/skins.minerva.notifications.badge/NotificationBadge.js
/**
	 * A notification button for communicating with an NotificationOverlay
	 * @class NotificationButton
	 * @extends View
	 *
	 * @constructor
	 * @param {Object} options Configuration options
	 * @module skins.minerva.notifications/NotificationBadge
	 */
A notification button for communicating with an NotificationOverlay
@class NotificationButton
@extends View

@constructor
@param {Object} options Configuration options
@module skins.minerva.notifications/NotificationBadge
A notification button for communicating with an NotificationOverlay @class NotificationButton @extends View @constructor @param { Object } options Configuration options @module skins . minerva . notifications / NotificationBadge
function NotificationBadge( options ) {
		var $el,
			count = options.notificationCountRaw || 0,
			el = options.el;
		if ( el ) {
			$el = $( el );
			options.hasUnseenNotifications = $el.find( '.notification-unseen' ).length;
			options.hasNotifications = options.hasUnseenNotifications;
			options.title = $el.find( 'a' ).attr( 'title' );
			options.url = $el.find( 'a' ).attr( 'href' );
			count = Number( $el.find( 'span' ).data( 'notification-count' ) );
			options.onError = function () {
				window.location.href = this.getNotificationURL();
			}.bind( this );
		}
		View.call( this, options );
		this.url = options.url;
		this._bindOverlayManager();
		this.setCount( count );
	}
function NotificationBadge ( options ) { var $el , count = options . notificationCountRaw || 0 , el = options . el ; if ( el ) { $el = $ ( el ) ; options . hasUnseenNotifications = $el . find ( '.notification-unseen' ) . length ; options . hasNotifications = options . hasUnseenNotifications ; options . title = $el . find ( 'a' ) . attr ( 'title' ) ; options . url = $el . find ( 'a' ) . attr ( 'href' ) ; count = Number ( $el . find ( 'span' ) . data ( 'notification-count' ) ) ; options . onError = function ( ) { window . location . href = this . getNotificationURL ( ) ; } . bind ( this ) ; } View . call ( this , options ) ; this . url = options . url ; this . _bindOverlayManager ( ) ; this . setCount ( count ) ; }
A notification button for communicating with an NotificationOverlay
 @class NotificationButton
 @extends View
A notification button for communicating with an NotificationOverlay @class NotificationButton @extends View
// FIXME: Blocked on T189173. Ideally we'd use the router here.