Closed pufferfish101007 closed 3 years ago
Hi there! Welcome to Bijou.js! We appreciate you contributing to this project! Someone will look over your issue shortly! In the meantime you can take a look at our website to learn more about this project! This message is automated
I want to keep the functionality currently but a lot of those functions return undefined, so there is no point not returning a promise.
Thanks, I like the way you've done it, but event-listener-type functions shouldn't use promises, as promises can only be resolved once.
Is your feature request related to a problem? Please describe. I'm always frustrated when [I find myself having to use callbacks for something that I need to wait some time for, such as _$.loadScript, and other functions that rely on that. I often find myself in callback hell, rather than promise paradise.
Describe the solution you'd like It would be great if these functions could return a promise rather than running a callback.
Describe alternatives you've considered Alternatively, it could use a system whereby you may pass a callback as a param, in which case it would run the callback, and if it was not present it would return a promise. However, I don't think this is necessary, as all programmers should really use asynchronous functions using promises nowadays.
Additional context n/a