讨论 » 开发

Setting function to variable

§
发布于:2015-05-19

Setting function to variable

The script below use to work but now it doesn't. Can someone tell me why it fails and how I can get it working. Thanks

log.info = console.info;
log.log("TEST");
woxxom管理员
§
发布于:2015-05-19
log = console.log.bind(console);
log("TEST");

This works if it's what you want to do.

§
发布于:2015-05-19

Thank you. Works well.

发布留言

登录(不可用)以发布留言。

长期地址
遇到问题?请前往 GitHub 提 Issues。