ResizeObserver: it's like document.onresize for elements Stay organized with collections Save and categorize content based on your preferences. Before ResizeObserver, you had to attach a listener to the document's resize event to get notified of any change of the viewport's dimensions. In the event handler, you would then have to figure out which elements have been affected by that change and call
Element queries (or “container queries” if you must) continue to make their way into conversations amongst responsive web design makers, but their inclusion into any spec and the present landscape is unclear. In this article we’ll discuss what element queries are and where community consensus currently finds itself amongst developers and standards working groups. What Are Element Queries? Element
モナドを理解するために Monads for functional programming の例題にある例外モナドを JavaScript で実装してみたのでメモっとく。 戻るボタンをクリックする前に無心で写経してみてほしい。Web ブラウザーの JavaScript コンソールで試せるようにしてあるので! ちなみに、モナドを理解するために書いたコードなので JavaScript でモナドを実用する上では役に立たないのでご注意を。 前提知識 コードを簡潔に表現するために下記のような言語仕様を活用する。 アロー関数 アロー関数を活用して関数を簡潔に表現する。 var add = (n, m) => n + m; // var add = function(n, m) { // return n + m; // }; // var mul = n => m => n * m; // var m
Foreword by @MylesBorins: Modules were first standardized in ECMAScript 6 in 2015. As of December 2017 you can now use ESModules (ESM) in 3 out of 4 of the major browsers. Node.js has traditionally shipped an implementation of Common.js (CJS), you use it in your Node.js code today via require(). There are vast differences between the two module systems that make it quite difficult to utilize Commo
Modern Asynchronous CSS Loading Posted by Scott Jehl 11/30/2017 The simplest way to load a CSS file in an HTML document is to use a link element with rel="stylesheet": <link rel="stylesheet" href="mycssfile.css"> Referencing CSS this way works great, but it comes with a downside: it’s synchronous. In other words, with a typical stylesheet link like this, the browser stops rendering subsequent port
On Twitter, Allen Wirfs-Brock asked folks if they knew what Array.isArray(obj) did, and the results suggested… no they don't. For what it's worth, I also got the answer wrong. Type-checking arrays Let's say we wanted to do something specific if obj is an array. JSON.stringify is an example of this, it outputs arrays differently to other objects. We could do:
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く