I am working with a gnome extension which has a toggle switch on its panel popup menu. I have bound a keyboard shortcut to the same setting, so I want to change the state of the toggle to reflect what happens with the keyboard shortcut.
the toggle comes from code like this:
let toggle = new PopupSwitchMenuItem(desc, active);
and I can save a reference to toggle so that is known to the code that handles the short cut. But I don't know how to change the state. I hoped toggle.set_state(true) might work, but whatever object toggle is, it does not support set_state()