Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DomInspector, ToolboxOverlay.attach calls target.client.listTabs twice #6

Open
groovecoder opened this issue Jan 12, 2016 · 1 comment

Comments

@groovecoder
Copy link

Some of these issues are just me learning how this code works, so feel free to close them without "fixing" ...
toolbox-overlay.js calls listTabs:

  target.client.listTabs(response => {

Then later calls it again inside the arrow function:

    target.client.listTabs(({ tabs, selected }) => {

If I understand correctly, the 2nd call could be:

    target.client.listTabs((response.tabs, response.selected) => {

That would eliminate a duplicate call to listTabs right?

@groovecoder
Copy link
Author

We could add this to the top of the arrow function to keep function argument names short:

let { tabs, selected } = response;

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant