{"id":609,"date":"2017-07-05T15:59:40","date_gmt":"2017-07-05T06:59:40","guid":{"rendered":"https:\/\/www.ecomott.co.jp\/tech_blog\/?p=609"},"modified":"2018-09-13T10:15:55","modified_gmt":"2018-09-13T01:15:55","slug":"chrome%e3%81%a7%e4%bd%99%e5%88%86%e3%81%aacssjavascript%e3%82%92%e3%81%82%e3%81%b6%e3%82%8a%e5%87%ba%e3%81%99","status":"publish","type":"post","link":"https:\/\/test.ecomottblog.com\/?p=609","title":{"rendered":"Chrome\u3067\u4e0d\u8981\u306aCSS\/JavaScript\u3092\u6d17\u3044\u51fa\u3059"},"content":{"rendered":"<p>\u3053\u3093\u306b\u3061\u306f\uff01<br \/>\n\u958b\u767a\u90e8\u306e\u6b66\u5185\u3067\u3059\u3002<\/p>\n<p>Web\u30d5\u30ed\u30f3\u30c8\u30a8\u30f3\u30c9\u306e\u958b\u767a\u306f\u3053\u3053\u6570\u5e74\u3067\u6025\u6fc0\u306b\u9ad8\u5ea6\u5316\u3057\u3066\u3044\u307e\u3059\u304c\u3001<br \/>\n\u305d\u308c\u3092\u5927\u304d\u304f\u5f8c\u62bc\u3057\u3057\u3066\u3044\u308b\u4e00\u56e0\u306b\u30d6\u30e9\u30a6\u30b6\u4ed8\u5c5e\u306e\u958b\u767a\u30c4\u30fc\u30eb\u304c\u3042\u308a\u307e\u3059\u3002<\/p>\n<p>Chrome\u3001Firefox\u3001Edge\u3001Safari\u306a\u3069\u306b\u4ed8\u5c5e\u3057\u3066\u3044\u307e\u3059\u304c\u3001\u3069\u308c\u3082\u975e\u5e38\u306b\u9ad8\u6a5f\u80fd\u3067\u3059\u3002<br \/>\nWeb\u30d5\u30ed\u30f3\u30c8\u30a8\u30f3\u30c9\u30a8\u30f3\u30b8\u30cb\u30a2\u3067\u4f7f\u3063\u3066\u3044\u306a\u3044\u65b9\u306f\u3044\u306a\u3044\u306e\u3067\u306f\u306a\u3044\u3067\u3057\u3087\u3046\u304b\u3002<\/p>\n<ul>\n<li>\u30b0\u30e9\u30d5\u30a3\u30ab\u30eb\u306a\u30c7\u30b6\u30a4\u30f3\u8abf\u6574<\/li>\n<li>\u30b3\u30fc\u30c9\u306e\u30b9\u30c6\u30c3\u30d7\u5b9f\u884c<\/li>\n<li>\u901a\u4fe1\u306e\u30ed\u30ae\u30f3\u30b0<\/li>\n<li>etc&#8230;<\/li>\n<\/ul>\n<p>\u4eca\u56de\u3001Chrome 59\u306e\u30a2\u30c3\u30d7\u30c7\u30fc\u30c8\u3067CSS\/JavaScript\u306e\u30ab\u30d0\u30ec\u30c3\u30b8\u6a5f\u80fd\u304c\u8ffd\u52a0\u3055\u308c\u305f\u306e\u3067\u8a66\u3057\u3066\u307f\u307e\u3057\u305f\u3002<br \/>\n<!--more--><\/p>\n<h2>CSS and JS code coverage<\/h2>\n<p><a href=\"https:\/\/developers.google.com\/web\/updates\/2017\/04\/devtools-release-notes\">What&#8217;s New In DevTools (Chrome 59)<\/a><\/p>\n<blockquote><p>\n  Find unused CSS and JS code with the new Coverage tab. When you load or run a page, the tab tells you how much code was used, versus how much was loaded. You can reduce the size of your pages by only shipping the code that you need.\n<\/p><\/blockquote>\n<p>\u30da\u30fc\u30b8\u30ed\u30fc\u30c9\u6642\u306b\u5b9f\u884c\u3092\u30c8\u30ec\u30fc\u30b9\u3057\u3066\u4f7f\u7528\u3055\u308c\u305f\u30b3\u30fc\u30c9\u3092\u78ba\u8a8d\u3067\u304d\u308b\u3088\u3046\u3067\u3059\u306d\u3002<\/p>\n<h4>Chrome\u306e\u66f4\u65b0<\/h4>\n<p>Chrome\u309259\u306b\u66f4\u65b0\u3057\u307e\u3059\u3002<br \/>\n\u666e\u6bb5\u304b\u3089Chrome\u3092\u4f7f\u7528\u3057\u3066\u3044\u308b\u65b9\u306f\u81ea\u7136\u3068\u66f4\u65b0\u3055\u308c\u3066\u3044\u308b\u304b\u3068\u601d\u3044\u307e\u3059\u304c\u3001<br \/>\n\u66f4\u65b0\u3055\u308c\u3066\u3044\u306a\u3044\u5834\u5408\u306f <strong>\u8a2d\u5b9a\u2192\u30d8\u30eb\u30d7\u2192Google Chrome\u306b\u3064\u3044\u3066<\/strong> \u304b\u3089\u66f4\u65b0\u3057\u307e\u3059\u3002<br \/>\n2017\/06\/26\u73fe\u5728\u306e\u6700\u65b0\u30d0\u30fc\u30b8\u30e7\u30f3\u306f59.0.3071.109\u3067\u3057\u305f\u3002<\/p>\n<h4>\u304a\u8a66\u3057\u30b3\u30fc\u30c9<\/h4>\n<p>\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u4f5c\u6210\u3057\u307e\u3057\u305f\u3002<\/p>\n<pre><code class=\"html\">&lt;!-- test.html --&gt;\n\n&lt;html&gt;\n    &lt;head&gt;\n        &lt;link rel=\"stylesheet\" type=\"text\/css\" href=\"test.css\"&gt;\n        &lt;script type=\"text\/javascript\" src=\"test.js\"&gt;&lt;\/script&gt;\n    &lt;\/head&gt;\n    &lt;body&gt;\n        &lt;div class=\"red\"&gt;Hoge&lt;\/div&gt;\n    &lt;\/body&gt;\n&lt;\/html&gt;\n<\/code><\/pre>\n<pre><code class=\"css\">\/* test.css *\/\n\ndiv.red {\n    color: Red;\n}\n\ndiv.blue {\n    color: Blue;\n}\n<\/code><\/pre>\n<pre><code class=\"javascript\">\/\/ test.js\n\nexecute();\n\nfunction execute() {\n    alert(\"execute()\");\n}\n\nfunction not_execute() {\n    alert(\"not_execute()\");\n}\n<\/code><\/pre>\n<h4>\u30ab\u30d0\u30ec\u30c3\u30b8\u6a5f\u80fd<\/h4>\n<p><strong>\u8a2d\u5b9a\u2192\u305d\u306e\u4ed6\u306e\u30c4\u30fc\u30eb\u2192\u30c7\u30d9\u30ed\u30c3\u30d1\u30fc\u30c4\u30fc\u30eb<\/strong> \u3092\u958b\u304d\u3001<br \/>\n\u4e0b\u90e8 <strong>Console<\/strong> \u306e\u5de6\u306e\u30e1\u30cb\u30e5\u30fc\u304b\u3089 <strong>Caverage<\/strong> \u3092\u9078\u629e\u3057\u3066Caverage\u30bf\u30d6\u3092\u8ffd\u52a0\u3057\u307e\u3059\u3002<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/www.ecomottblog.com\/cmswp\/wp-content\/uploads\/2017\/06\/chrome_cava01.png\" alt=\"chrome_cava01\" \/><\/p>\n<p>\u5de6\u5074\u306e\u30ec\u30b3\u30fc\u30c9\u30dc\u30bf\u30f3\u3092\u62bc\u3057\u3066\u30c8\u30ec\u30fc\u30b9\u3092\u958b\u59cb\u3057\u307e\u3059\u3002<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/www.ecomottblog.com\/cmswp\/wp-content\/uploads\/2017\/06\/chrome_cava02.png\" alt=\"chrome_cava02\" \/><\/p>\n<p>\u3053\u306e\u72b6\u614b\u3067\u30da\u30fc\u30b8\u306b\u30a2\u30af\u30bb\u30b9\u3057\u307e\u3059\u3002<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/www.ecomottblog.com\/cmswp\/wp-content\/uploads\/2017\/06\/chrome_cava03.png\" alt=\"chrome_cava03\" \/><\/p>\n<p>\u30b3\u30fc\u30c9\u306f\u60f3\u5b9a\u901a\u308a\u306b\u52d5\u304d\u307e\u3057\u305f\u3002<br \/>\n\u30ec\u30b3\u30fc\u30c9\u30dc\u30bf\u30f3\u3092\u518d\u5ea6\u62bc\u3059\u3068\u7d50\u679c\u304c\u8868\u793a\u3055\u308c\u307e\u3059\u3002<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/www.ecomottblog.com\/cmswp\/wp-content\/uploads\/2017\/06\/chrome_cava04.png\" alt=\"chrome_cava04\" \/><\/p>\n<p>\u7dd1\u304c\u4f7f\u7528\u3001\u8d64\u304c\u672a\u4f7f\u7528\u3092\u8868\u3057\u307e\u3059\u3002<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/www.ecomottblog.com\/cmswp\/wp-content\/uploads\/2017\/06\/chrome_cava05.png\" alt=\"chrome_cava05\" \/><\/p>\n<p>\u3069\u306e\u884c\u304c\u5b9f\u884c\u3055\u308c\u3066\u3044\u308b\u304b\u3082\u78ba\u8a8d\u3067\u304d\u307e\u3059\u3002<br \/>\nJavaScript\u306fnot_execute()\u304c\u5b9f\u884c\u3055\u308c\u3066\u304a\u3089\u305a\u3001<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/www.ecomottblog.com\/cmswp\/wp-content\/uploads\/2017\/06\/chrome_cava06.png\" alt=\"chrome_cava06\" \/><\/p>\n<p>CSS\u306fBlue\u304c\u5b9f\u884c\u3055\u308c\u3066\u3044\u307e\u305b\u3093\u3002<br \/>\n\u3064\u307e\u308a\u3053\u308c\u3089\u306f\u7121\u99c4\u306a\u30b3\u30fc\u30c9\u3068\u3044\u3046\u3053\u3068\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n<h2>\u304a\u308f\u308a\u306b<\/h2>\n<p>\u30af\u30e9\u30a4\u30a2\u30f3\u30c8\u30b5\u30a4\u30c9\u306b\u304a\u3044\u3066\u306f\u30b3\u30fc\u30c9\u306e\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9\u304c\u5927\u304d\u306a\u5b9f\u884c\u6642\u9593\u3092\u5360\u3081\u308b\u3053\u3068\u3082\u3042\u308a\u307e\u3059\u3002<br \/>\n\u3053\u306e\u6a5f\u80fd\u3092\u4f7f\u3044\u3001\u81ea\u793e\u30b5\u30a4\u30c8\u306e\u30b3\u30fc\u30c9\u306e\u68da\u5378\u3057\u306a\u3093\u304b\u826f\u3044\u304b\u3082\u3057\u308c\u307e\u305b\u3093\u306d\u3002<\/p>\n<p>\u7686\u3055\u307e\u306e\u5feb\u9069\u306aWeb\u30d5\u30ed\u30f3\u30c8\u30a8\u30f3\u30c9\u958b\u767a\u306e\u4e00\u52a9\u306b\u306a\u308c\u3070\u5e78\u3044\u3067\u3059\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u3053\u3093\u306b\u3061\u306f\uff01 \u958b\u767a\u90e8\u306e\u6b66\u5185\u3067\u3059\u3002 Web\u30d5\u30ed\u30f3\u30c8\u30a8\u30f3\u30c9\u306e\u958b\u767a\u306f\u3053\u3053\u6570\u5e74\u3067\u6025\u6fc0\u306b\u9ad8\u5ea6\u5316\u3057\u3066\u3044\u307e\u3059\u304c\u3001 \u305d\u308c\u3092\u5927\u304d\u304f\u5f8c\u62bc\u3057\u3057\u3066\u3044\u308b\u4e00\u56e0\u306b\u30d6\u30e9\u30a6\u30b6\u4ed8\u5c5e\u306e\u958b\u767a\u30c4\u30fc\u30eb\u304c\u3042\u308a\u307e\u3059\u3002 Chrome\u3001Firefox\u3001Edge\u3001Safar [&hellip;]<\/p>\n","protected":false},"author":9,"featured_media":637,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[27],"tags":[31],"_links":{"self":[{"href":"https:\/\/test.ecomottblog.com\/index.php?rest_route=\/wp\/v2\/posts\/609"}],"collection":[{"href":"https:\/\/test.ecomottblog.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/test.ecomottblog.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/test.ecomottblog.com\/index.php?rest_route=\/wp\/v2\/users\/9"}],"replies":[{"embeddable":true,"href":"https:\/\/test.ecomottblog.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=609"}],"version-history":[{"count":6,"href":"https:\/\/test.ecomottblog.com\/index.php?rest_route=\/wp\/v2\/posts\/609\/revisions"}],"predecessor-version":[{"id":2937,"href":"https:\/\/test.ecomottblog.com\/index.php?rest_route=\/wp\/v2\/posts\/609\/revisions\/2937"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/test.ecomottblog.com\/index.php?rest_route=\/wp\/v2\/media\/637"}],"wp:attachment":[{"href":"https:\/\/test.ecomottblog.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=609"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/test.ecomottblog.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=609"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/test.ecomottblog.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=609"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}