onCommand property

EventStream<OnCommandEvent> get onCommand

Fired when a registered command is activated using a keyboard shortcut.

Implementation

EventStream<OnCommandEvent> get onCommand =>
    $js.chrome.commands.onCommand.asStream(($c) => (
          String command,
          $js_tabs.Tab? tab,
        ) {
          return $c(OnCommandEvent(
            command: command,
            tab: tab?.let(Tab.fromJS),
          ));
        }.toJS);