mirror of
https://github.com/hensm/fx_cast.git
synced 2026-06-12 02:29:59 +00:00
Enable strict mode for extension build
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
"use strict";
|
||||
|
||||
import logger from "./logger";
|
||||
import { stringify } from "./utils";
|
||||
|
||||
import { ReceiverSelection
|
||||
@@ -27,6 +28,11 @@ export default async function loadSender (opts: LoadSenderOptions) {
|
||||
switch (opts.selection.mediaType) {
|
||||
case ReceiverSelectorMediaType.App: {
|
||||
const shim = ShimManager.getShim(opts.tabId, opts.frameId);
|
||||
if (!shim) {
|
||||
throw logger.error(`Shim not found at tabId ${
|
||||
opts.tabId} / frameId ${opts.frameId}`)
|
||||
}
|
||||
|
||||
shim.contentPort.postMessage({
|
||||
subject: "shim:/launchApp"
|
||||
, data: { receiver: opts.selection.receiver }
|
||||
|
||||
Reference in New Issue
Block a user