Open danjenkins opened 7 years ago
I'm talking about https://beaufortfrancois.github.io/sandbox/web-bluetooth/generator/
What would you add exactly?
function ready(fn) {
if (document.readyState != 'loading'){
fn();
} else {
document.addEventListener('DOMContentLoaded', fn);
}
}
I always start out with the generator and I always have to fill in the onload functions
I'm guessing this would be useful to other people too
Otherwise you just get "can't add listener to null"