Closed MitchBradley closed 2 weeks ago
Here is an example of how an extension might use the feature:
window.parent.postMessage({type:'cmd', target:'webui', id:'axis', content:'$9999', noToast:true}, '*');
If the command "$9999" does not exist, the extension can handle the error quietly in its message handler, possibly falling back to a different approach that works on older controller firmware that does not implement $9999.
this is no need - I have removed the auto
toast in extension API because it is extension to control if need a toast or not and what should be the message in it
Excellent, thanks.
If eventMsg.data contains ".noToast" with a true value and the command results in an error, the error message toast will be suppressed. That lets the extension handle errors internally without the user seeing a possibly-confusing message.
One use case is when the extension needs to issue a command that might not exist in older versions of the controller firmware, handling the error quietly for backwards compatibility.