-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
打印具备 deprecated 方法的对象时会报错 #14
Comments
v1.0.8(本周内更新)会暴露filter接口,可以调用屏蔽一些指定的Log。 eruda.get('console').filter(function (log)
{
return !(log.type === 'error' && /deprecated(.|\n)*stringify/.test(log.src.stack));
}); |
cool! |
Console面板的代码重构中,同时增加单元测试,字符串%d%o替换、CSS样式支持、表格输出等新功能及相关接口文档,版本更新推迟。 |
嗯,没事…… 这边我先绕过了 |
已更新1.1.0版(相关接口文档更新中),可通过以下方法绕过: 1、设置filter eruda.get('console').filter(function (log)
{
return !(log.type === 'error' && /deprecated(.|\n)*stringify/.test(log.src.stack));
}); 2、禁止访问不可枚举属性 eruda.get('console').config.set('displayUnenumerable', false); 3、禁止访问Getter方法(默认) eruda.get('console').config.get('displayGetterVal', false);
|
👍 很棒 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
API 升级后,经常会保留一些旧版本的 API 接口作为过渡,例如
然后如果用户尝试输出 console.log(sprite),就会看到多了上面的报错:'Sprite.cascade is deprecated, use Node.cascade please.'
请问该怎么解决这类问题?
The text was updated successfully, but these errors were encountered: