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

Config events #237

Open
NDevTK opened this issue Jan 11, 2020 · 4 comments
Open

Config events #237

NDevTK opened this issue Jan 11, 2020 · 4 comments
Labels
help wanted Extra attention is needed

Comments

@NDevTK
Copy link
Contributor

NDevTK commented Jan 11, 2020

Using the CustomEvent interface it might be possible to add an event that gets dispatchEvent run every time there is a change.

Example 1:

SB.config.addEventListener(null, function() { // all changes
    console.info("config updated");
});

Example 2:

SB.config.addEventListener("sponsorTimes", function() { // changes on value/map
    console.info("sponsorTimes updated");
});
@NDevTK
Copy link
Contributor Author

NDevTK commented Jan 11, 2020

Currently an idea do not know if it should be added or not @ajayyy

@ajayyy
Copy link
Owner

ajayyy commented Feb 10, 2020

It could be cleaner

@ajayyy ajayyy changed the title SB.config events Config events Feb 10, 2020
@NDevTK
Copy link
Contributor Author

NDevTK commented Mar 23, 2020

@ajayyy how could it be cleaner

@ajayyy
Copy link
Owner

ajayyy commented Mar 23, 2020

I meant that this method would be cleaner than the current method.

@ajayyy ajayyy added the help wanted Extra attention is needed label Jul 28, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants