You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@flagon.apache.org by GitBox <gi...@apache.org> on 2022/11/09 18:38:16 UTC

[GitHub] [incubator-flagon-useralejs] Jyyjy opened a new issue, #312: Map & Filter Callbacks

Jyyjy opened a new issue, #312:
URL: https://github.com/apache/incubator-flagon-useralejs/issues/312

   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])
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@flagon.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [flagon-useralejs] Jyyjy closed issue #312: Map & Filter Callbacks

Posted by "Jyyjy (via GitHub)" <gi...@apache.org>.
Jyyjy closed issue #312: Map & Filter Callbacks
URL: https://github.com/apache/flagon-useralejs/issues/312


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@flagon.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [incubator-flagon-useralejs] poorejc commented on issue #312: Map & Filter Callbacks

Posted by GitBox <gi...@apache.org>.
poorejc commented on issue #312:
URL: https://github.com/apache/incubator-flagon-useralejs/issues/312#issuecomment-1325873251

   I love this. This has actually been a bit of a pain point for me, I like the elegant solution! I can't wait to see an example! Thanks for digging in!


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@flagon.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org