document.hasFocus() is supported across the board and will be more reliable/correct than tracking state based on focus/blur events. Additionally, it means that Notification component users won’t need to initialize an empty element (<Notification disableActiveWindow title=''/>) in order for the component to properly track window activity.
document.hasFocus()
is supported across the board and will be more reliable/correct than tracking state based onfocus
/blur
events. Additionally, it means thatNotification
component users won’t need to initialize an empty element (<Notification disableActiveWindow title=''/>
) in order for the component to properly track window activity.