onFocusChanged property

EventStream<int> get onFocusChanged

Fired when the currently focused window changes. Returns chrome.windows.WINDOW_ID_NONE if all Chrome windows have lost focus. Note: On some Linux window managers, WINDOW_ID_NONE is always sent immediately preceding a switch from one Chrome window to another.

Implementation

EventStream<int> get onFocusChanged =>
    $js.chrome.windows.onFocusChanged.asStream(($c) => (int windowId) {
          return $c(windowId);
        });