Skip to content

Instantly share code, notes, and snippets.

🎯
Focusing

浩麟 gwuhaolin

🎯
Focusing
Block or report user

Report or block gwuhaolin

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View 前端异常监控.md

前端异常监控

为什么需要前端异常监控

如今Web庞大复杂应用场景广泛,再加上各种浏览器造成的环境差异,很难保证我们的页面呈现给每个用户时都是正常的。稳定和准确是每个产品的基础,对于用户直接交互的页面更加显得重要。我们不能等到用户投诉后才知道出现问题,而是应该主动监控尽快暴露出异常。

前端有哪些异常

  • 静态资源加载异常
    • 网络环境恶劣
    • 运营商劫持
    • 文件丢失
View package.json
{
"scripts": {
"dev": "webpack-dev-server --hot --open",
"dist": "rm -rf public && NODE_ENV=production webpack --config webpack-dist.config.js --display-optimization-bailout",
"jbdist": "tnpm i && NODE_ENV=production webpack --config webpack-dist.config.js"
},
"dependencies": {
"babel-runtime": "^6.23.0",
"badjs-report": "^1.3.2",
"classnames": "^2.2.5",
@gwuhaolin
gwuhaolin / fis3.d.ts
Last active Aug 4, 2016
typescript d.ts file for fis3
View fis3.d.ts
/**
* typescript d.ts file for fis3
*/
module fis {
/**
* fis 插件
*/
interface plugin {
}
View mini-jsonp
function jsonp(url, callback) {
var script = document.createElement('script');
script.type = "text/javascript";
script.src = url + (url.indexOf('?') > 0 ? '&' : '?') + 'callback=CB&' + Date.now();
script.onload=function(){
script.parentNode.removeChild(script);
};
window['CB'] = function (json) {
callback(json);
You can’t perform that action at this time.