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

ExtPay's message listener prints console logs #233

Open
ba32107 opened this issue Aug 6, 2024 · 0 comments
Open

ExtPay's message listener prints console logs #233

ba32107 opened this issue Aug 6, 2024 · 0 comments

Comments

@ba32107
Copy link

ba32107 commented Aug 6, 2024

Describe the bug
This is a minor issue. The message listener in ExtPay prints a log message:
https://github.com/Glench/ExtPay/blob/main/ExtPay.dev.js#L310

This message regularly shows up on my service worker's console. It's not a big deal, but it gets a bit annoying, especially when I'm spending a long time debugging something with my own console logs. As a library, ExtPay should not log anything.

To Reproduce
Steps to reproduce the behavior:

  1. Include ExtPay in any project
  2. Start the background page
  3. Send a runtime message
  4. Observe the message on the service worker's console

Expected behavior
ExtPay prints no logs.

Additional context

In addition, because ExtPay's own events are not prefixed, there is a possibility of event clashes. Example:
https://github.com/Glench/ExtPay/blob/main/ExtPay.dev.js#L311
https://github.com/Glench/ExtPay/blob/main/ExtPay.dev.js#L315

Since these event names are pretty generic, someone can easily pick the same ones for their own events, making it possible that ExtPay picks up unintended events.

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