Open Christian-health opened 6 years ago
RAIL,以用户为核心的性能模型:http://www.iteye.com/news/31048
渲染性:http://www.jianshu.com/p/b74e348612de
浏览器默认样式(User Agent Stylesheet):http://www.cnblogs.com/xcsn/p/4664079.html
User Agent 样式表:https://meiert.com/en/blog/user-agent-style-sheets/(老外的文章写的好)
css自定义属性三篇文章:https://zhuanlan.zhihu.com/p/25714131(翻译老外的比较好)
调试代码:
<!DOCTYPE html>
<html>
<head>
<title></title>
</head>
<body>
<div id="main">
<button id="first">第一个按钮</button>
<button onclick="modification()">添加子节点</button>
<button onclick="addedProperty()">添加属性</button>
<button onclick="remove()">删除第一个按钮</button>
</div>
<script type="text/javascript">
function modification(){
// 子树修改 触发dom事件,引起断点
var element = document.getElementById('main');
console.log('element',element);
//modify the element's subtree.
var mySpan = document.createElement('span');
element.appendChild( mySpan );
}
function addedProperty() {
// 属性修改 触发dom事件 引起断点
var element = document.getElementById('main');
// class attribute of element has been modified.
element.className = 'active';
}
function remove() {
// 节点移除 触发dom事件 引起断点
document.getElementById('first').remove();
}
</script>
</body>
</html>
如图可以看到,设置断点之后触发了哪些代码:
使用 DevTools 的工作区设置持久化:https://developers.google.com/web/tools/setup/setup-workflow#top_of_page(没看)
js-addEventListener()第三个参数useCapture: http://www.cnblogs.com/loveyouyou616/p/3916345.html(没看)
官方网站:https://developers.google.com/web/tools/chrome-devtools/#_8
第一篇好的文章:http://web.jobbole.com/81915/
google官网:https://developers.google.com/web/tools/chrome-devtools/
使用Chrome DevTools的Timeline分析页面性能:http://horve.github.io/2015/10/26/timeline/
全新Chrome Devtool Performance使用指南:https://zhuanlan.zhihu.com/p/29879682(好文章)
使用的测试网站:https://googlechrome.github.io/devtools-samples/jank/
总的学习资料: github中文chromeDev翻译文档:https://github.com/CN-Chrome-DevTools/CN-Chrome-DevTools