0.0.3 • Published 8 months ago

error-catcher-self v0.0.3

Weekly downloads
-
License
-
Repository
-
Last release
8 months ago

errorcatch-chjrome-extension

错误采集浏览器插件

  1. 引入打包好的 index.js 或支持 umd import

  2. 在页面初始化完成

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

  1. 卸载取消dom监听 plugin.stop();
0.0.3

8 months ago

0.0.2

8 months ago

0.0.1

8 months ago