error-catcher-self
v0.0.3
Published
错误采集浏览器插件
Downloads
8
Readme
errorcatch-chjrome-extension
错误采集浏览器插件
引入打包好的 index.js 或支持 umd import
在页面初始化完成
window.onload = async function () {
const plugin = new CatchPlugin({
projectId: '1693', // 项目ID
url: 'http://baidu.com', // 平台接口地址 或 url: ''
});
plugin.init().then(() => plugin.listen());
};
import CatchPlugin from 'xxxx'
useEffect(() => {
const plugin = new CatchPlugin({
projectId: '1693', // 项目ID
url: 'http://10.45.46.15:10000', // 或 url: ''
});
plugin.init().then(() => plugin.listen());
return () => plugin.stop();
}, []);
设置了 URL 如配置获取完整的会拼接 url+ '/autotest-web/exceptionCatcher/getExceptionCatcherConfig'
没有设置默认即 url: '' 域名 /autotest-web/exceptionCatcher/getExceptionCatcherConfig
- 卸载取消dom监听
plugin.stop();