You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, we use multiple functions that call sendMessage just with different action. So make the code cleaner, the goal is to merge all the functions into one function that takes the following arguments:
action as a string to call different listeners
currentTab as a tab object to use the id of the currentTab in the sendMessage function
args as an object with additional information for the specific use case
Additionally, we can merge the listeners into one big listener with a switch case for the different actions, so only one listener per file should be needed. Possibly change single-time requests into a long-lived connections
The text was updated successfully, but these errors were encountered:
Currently, we use multiple functions that call
sendMessage
just with different action. So make the code cleaner, the goal is to merge all the functions into one function that takes the following arguments:action
as a string to call different listenerscurrentTab
as a tab object to use the id of the currentTab in thesendMessage
functionargs
as an object with additional information for the specific use caseAdditionally, we can merge the listeners into one big listener with a switch case for the different actions, so only one listener per file should be needed. Possibly change single-time requests into a long-lived connections
The text was updated successfully, but these errors were encountered: