Christian-health / StudyNote2017

2017年学习笔记
0 stars 0 forks source link

Chrome Dev tools 学习笔记 #27

Open Christian-health opened 6 years ago

Christian-health commented 6 years ago

总的学习资料: github中文chromeDev翻译文档:https://github.com/CN-Chrome-DevTools/CN-Chrome-DevTools

Christian-health commented 6 years ago

RAIL以用户为核心的性能模型学习:(没看)

RAIL,以用户为核心的性能模型:http://www.iteye.com/news/31048
渲染性:http://www.jianshu.com/p/b74e348612de

Christian-health commented 6 years ago

元素面板




浏览器默认的样式表:(没看)

浏览器默认样式(User Agent Stylesheet):http://www.cnblogs.com/xcsn/p/4664079.html

User Agent 样式表:https://meiert.com/en/blog/user-agent-style-sheets/(老外的文章写的好




css自定义属性(自定义变量):(没看)

css自定义属性三篇文章:https://zhuanlan.zhihu.com/p/25714131(翻译老外的比较好




Dom事件断点调试

调试代码:

<!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>

如图可以看到,设置断点之后触发了哪些代码: image

使用 DevTools 的工作区设置持久化:https://developers.google.com/web/tools/setup/setup-workflow#top_of_page(没看)

js-addEventListener()第三个参数useCapture: http://www.cnblogs.com/loveyouyou616/p/3916345.html(没看

Christian-health commented 6 years ago

内存面板

官方网站:https://developers.google.com/web/tools/chrome-devtools/#_8

第一篇好的文章:http://web.jobbole.com/81915/

Garbage Collection简称为GC,是垃圾回收的意思

Christian-health commented 6 years ago

Time line 学习:

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/

http://www.jianshu.com/p/471950517b07(好文章没看,一个系列的)
image