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

Don't log to the console unless specified. #201

Open
saborrie opened this issue Mar 19, 2018 · 1 comment
Open

Don't log to the console unless specified. #201

saborrie opened this issue Mar 19, 2018 · 1 comment

Comments

@saborrie
Copy link

It's not good practice for libraries to log directly to the console unless a consumer sets a verbosity setting to enable it.

E.g. this piece of code in dom-to-image.js:
(a non-fatal error of some stylesheets not working doesn't warrant an unsuppressible call to console.log)

try {
  util.asArray(sheet.cssRules || []).forEach(cssRules.push.bind(cssRules));
} catch (e) {
  console.log('Error while reading CSS rules from ' + sheet.href, e.toString());
}

There may be others places too.

@rafagil
Copy link

rafagil commented Jun 9, 2021

Hi @saborrie. Added a PR for this: #374

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

2 participants