canjs / devtools

Chrome DevTools for CanJS.
https://chrome.google.com/webstore/detail/canjs-devtools/hhdfadlgplkpapjfehnjhcebebgmibcb
MIT License
5 stars 0 forks source link

constant errors to the console when two or more tabs have devtools open #97

Closed bmomberger-bitovi closed 4 years ago

bmomberger-bitovi commented 4 years ago

In canjs-devools-helpers.mjs:

            if (helpers.registeredFrames[url]) {
                chrome.devtools.inspectedWindow.eval(
                    `typeof __CANJS_DEVTOOLS__ === 'object' && __CANJS_DEVTOOLS__.${
                        options.fn ? options.fn() : options.fnString
                    }`,
                    { frameURL: url },

But helpers.registeredFrames holds the frames of several different tabs, and the tabId is not checked against the tabId of chrome.devtools.inspectedWindow. This check should happen in order to prevent an error and warning logged every 100ms.