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 you can only set one map callback and one filter callback in packageLogs.js. This is an issue because when writing custom scripts in conent.js, the filter callback is set in injectScript(). So currently a user cannot set their own filter function.
Even if the intention is to restrict content.js to a single filter callback, the one being set in injectScript() doesn't actually filter. The filter callback being set just sends the log to the background script.
Furthermore, there is not a huge difference between the map and filter callbacks. So as a solution to the filter problem above, I am working on having a single function to add callbacks to the various package log functions, which can be called multiple times.
so instead of this:
filter(foo)
map(bar)
we can do this:
addCallback(foo)
addCallback(bar)
addCallback([baz, qux])
The text was updated successfully, but these errors were encountered:
Currently you can only set one map callback and one filter callback in packageLogs.js. This is an issue because when writing custom scripts in conent.js, the filter callback is set in injectScript(). So currently a user cannot set their own filter function.
Even if the intention is to restrict content.js to a single filter callback, the one being set in injectScript() doesn't actually filter. The filter callback being set just sends the log to the background script.
Furthermore, there is not a huge difference between the map and filter callbacks. So as a solution to the filter problem above, I am working on having a single function to add callbacks to the various package log functions, which can be called multiple times.
so instead of this:
filter(foo)
map(bar)
we can do this:
addCallback(foo)
addCallback(bar)
addCallback([baz, qux])
The text was updated successfully, but these errors were encountered: