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

能否提供api来获取工具面板里的信息? #83

Closed
lili21 opened this issue Aug 10, 2018 · 3 comments
Closed

能否提供api来获取工具面板里的信息? #83

lili21 opened this issue Aug 10, 2018 · 3 comments

Comments

@lili21
Copy link

lili21 commented Aug 10, 2018

比如Info

const info = eruda.get('info')

info.get() // 返回info内容

类似于这样的api。

虽然可以通过info._infos获取,但感觉不是很直观。

surunzi added a commit that referenced this issue Aug 16, 2018
@surunzi
Copy link
Member

surunzi commented Aug 18, 2018

1.5.1 版本已发布,支持获取信息。

const info = eruda.get('info')
info.add('title', 'content')
info.get(); // -> [{name: 'title', val: 'content'}]
info.get('title') // -> 'content'

@surunzi surunzi closed this as completed Aug 20, 2018
@lili21
Copy link
Author

lili21 commented Aug 20, 2018

这个是只加了Info吗?我只是以info做个例子,应该其他的也加一下对于的接口?console, network, resources。

@surunzi
Copy link
Member

surunzi commented Aug 20, 2018

只加 info,列举的其它那些自己重写下相关方法就能拿到了吧。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants