webextensions-examples
webextensions-examples copied to clipboard
Illustrative function name
updateActiveTab has ambiguous meaning, most prominent of which doesn't mean what we are actually trying to do.
Description
updateActiveTab has ambiguous meaning, most prominent interpretation of which is not what we are actually doing in the function body.
Motivation
I know JS as server-side engineer (we have very pedantic rules on where we are allowed to change state), in this succinct but cool sample code, the flow-of-control is slightly confusing (if we don't know browser event loop) and I guess descriptive function names would reduced the confusion for new comers, the author had context and experience, but for newbies updateActiveTab would mean perhaps we are modifying something on page. Reading function def would clear the misconception, but add mental burden.
Additional details
Related issues and pull requests
It looks like this is your first pull request. 🎉 Thank you for your contribution! One of the project maintainers will triage and assign the pull request for review. We appreciate your patience. To safeguard the health of the project, please take a moment to read our code of conduct.
Congratulations on your first merged pull request. 🎉 Thank you for your contribution! Did you know we have a project board with high-impact contribution opportunities? We look forward to your next contribution.