mirror of
https://github.com/vale981/tridactyl
synced 2025-03-04 17:11:40 -05:00
Make command optional in messageOwnTab to be in line with messageTab
This commit is contained in:
parent
50f4288ffc
commit
fbc16a57f3
2 changed files with 4 additions and 5 deletions
|
@ -55,7 +55,6 @@ import state, * as State from "@src/state"
|
|||
import * as R from "ramda"
|
||||
import { MinimalKey, minimalKeyFromKeyboardEvent } from "@src/lib/keyseq"
|
||||
import { TabGroupCompletionSource } from "@src/completions/TabGroup"
|
||||
import {ownTabId} from "@src/lib/webext";
|
||||
|
||||
/** @hidden **/
|
||||
const logger = new Logger("cmdline")
|
||||
|
@ -190,7 +189,7 @@ export function focus() {
|
|||
commandline_state.clInput.focus()
|
||||
commandline_state.clInput.removeEventListener("blur", noblur)
|
||||
commandline_state.clInput.addEventListener("blur", noblur)
|
||||
Messaging.messageTab(ownTabId(), "buffered_page_keys").then(consumeBufferedPageKeys)
|
||||
Messaging.messageOwnTab("buffered_page_keys").then(consumeBufferedPageKeys)
|
||||
}
|
||||
|
||||
/** @hidden **/
|
||||
|
|
|
@ -133,7 +133,7 @@ export async function message<
|
|||
/** Message the active tab of the currentWindow */
|
||||
export async function messageActiveTab(
|
||||
type: TabMessageType,
|
||||
command: string,
|
||||
command?: string,
|
||||
args?: any[],
|
||||
) {
|
||||
return messageTab(await activeTabId(), type, command, args)
|
||||
|
@ -154,7 +154,7 @@ export async function messageTab(
|
|||
}
|
||||
|
||||
let _ownTabId
|
||||
export async function messageOwnTab(type: TabMessageType, command, args?) {
|
||||
export async function messageOwnTab(type: TabMessageType, command?, args?) {
|
||||
if (_ownTabId === undefined) {
|
||||
_ownTabId = await ownTabId()
|
||||
}
|
||||
|
@ -165,7 +165,7 @@ export async function messageOwnTab(type: TabMessageType, command, args?) {
|
|||
|
||||
export async function messageAllTabs(
|
||||
type: TabMessageType,
|
||||
command: string,
|
||||
command?: string,
|
||||
args?: any[],
|
||||
) {
|
||||
const responses = []
|
||||
|
|
Loading…
Add table
Reference in a new issue