[MSFS 2024 WASM] Camera Locks After `fsCameraSet` and `FocusInstrumentAction` Fails with `0x80004005`

Hello,

I’m developing a mod for MSFS 2024 and have run into a couple of issues that I have been unable to solve after several days of testing. I would really appreciate any advice or clarification.

1. Camera becomes locked after using fsCameraSet

When I call the Camera API function fsCameraSet from WASM, the camera moves to the target position correctly, but afterward the player can no longer control the camera.

Is this expected behavior, or could it be a bug?

If I release the camera, player control returns, but the camera immediately goes back to its original position before the movement.

Is there a supported way to:

  • keep the camera at its final position after the movement, and

  • return normal camera control to the player?

2. Unable to highlight a cockpit control

I am trying to call SimConnect from inside WASM and use:

SimConnect_ExecuteAction(..., "FocusInstrumentAction", ...);

However, every call fails immediately with:

0x80004005

Is SimConnect_ExecuteAction supported when called from a WASM module?

Alternatively, is there another API or method, without SimConnect, that can highlight a specific cockpit control by Part ID?

For example:

AUTOPILOT_KNOB_COURSE

Environment

Microsoft Flight Simulator 2024
Game version: 1.7.35.0
SDK version: 1.6.9
Compiler: Visual Studio 2022
Module type: WASM
Frontend: HTML / JavaScript
Communication: JS ↔ WASM CommBus

Thank you very much for your time. Any working example or guidance would be greatly appreciated.