mirror of
https://github.com/vale981/tridactyl
synced 2025-03-05 09:31:41 -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 * as R from "ramda"
|
||||||
import { MinimalKey, minimalKeyFromKeyboardEvent } from "@src/lib/keyseq"
|
import { MinimalKey, minimalKeyFromKeyboardEvent } from "@src/lib/keyseq"
|
||||||
import { TabGroupCompletionSource } from "@src/completions/TabGroup"
|
import { TabGroupCompletionSource } from "@src/completions/TabGroup"
|
||||||
import {ownTabId} from "@src/lib/webext";
|
|
||||||
|
|
||||||
/** @hidden **/
|
/** @hidden **/
|
||||||
const logger = new Logger("cmdline")
|
const logger = new Logger("cmdline")
|
||||||
|
@ -190,7 +189,7 @@ export function focus() {
|
||||||
commandline_state.clInput.focus()
|
commandline_state.clInput.focus()
|
||||||
commandline_state.clInput.removeEventListener("blur", noblur)
|
commandline_state.clInput.removeEventListener("blur", noblur)
|
||||||
commandline_state.clInput.addEventListener("blur", noblur)
|
commandline_state.clInput.addEventListener("blur", noblur)
|
||||||
Messaging.messageTab(ownTabId(), "buffered_page_keys").then(consumeBufferedPageKeys)
|
Messaging.messageOwnTab("buffered_page_keys").then(consumeBufferedPageKeys)
|
||||||
}
|
}
|
||||||
|
|
||||||
/** @hidden **/
|
/** @hidden **/
|
||||||
|
|
|
@ -133,7 +133,7 @@ export async function message<
|
||||||
/** Message the active tab of the currentWindow */
|
/** Message the active tab of the currentWindow */
|
||||||
export async function messageActiveTab(
|
export async function messageActiveTab(
|
||||||
type: TabMessageType,
|
type: TabMessageType,
|
||||||
command: string,
|
command?: string,
|
||||||
args?: any[],
|
args?: any[],
|
||||||
) {
|
) {
|
||||||
return messageTab(await activeTabId(), type, command, args)
|
return messageTab(await activeTabId(), type, command, args)
|
||||||
|
@ -154,7 +154,7 @@ export async function messageTab(
|
||||||
}
|
}
|
||||||
|
|
||||||
let _ownTabId
|
let _ownTabId
|
||||||
export async function messageOwnTab(type: TabMessageType, command, args?) {
|
export async function messageOwnTab(type: TabMessageType, command?, args?) {
|
||||||
if (_ownTabId === undefined) {
|
if (_ownTabId === undefined) {
|
||||||
_ownTabId = await ownTabId()
|
_ownTabId = await ownTabId()
|
||||||
}
|
}
|
||||||
|
@ -165,7 +165,7 @@ export async function messageOwnTab(type: TabMessageType, command, args?) {
|
||||||
|
|
||||||
export async function messageAllTabs(
|
export async function messageAllTabs(
|
||||||
type: TabMessageType,
|
type: TabMessageType,
|
||||||
command: string,
|
command?: string,
|
||||||
args?: any[],
|
args?: any[],
|
||||||
) {
|
) {
|
||||||
const responses = []
|
const responses = []
|
||||||
|
|
Loading…
Add table
Reference in a new issue