You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session. You switched accounts on another tab or window. Reload to refresh your session. Dismiss alert
What is that preload? What does it do? And how can it help you? Preload gives developers the ability to define custom loading logic without suffering the performance penalty that script-based resource loaders incur. In human terms, it’s a way to tell a browser to start fetching a certain resource, because you as authors know that the browser is going to need that particular resource pretty soon. P
Many sites and apps have a lot of scripts to execute. Your JavaScript often needs to be run as soon as possible, but at the same time you don’t want it to get in the user’s way. If you send analytics data when the user is scrolling the page, or you append elements to the DOM while they happen to be tapping on the button, your web app can become unresponsive, resulting in a poor user experience. Th
Yeah, ok, it's a touch bold to talk about something being the thing of the year as early as January, but the potential of the web streams API has gotten me all excited. TL;DR: Streams can be used to do fun things like turn clouds to butts, transcode MPEG to GIF, but most importantly, they can be combined with service workers to become the fastest way to serve content. Streams, huh! What are they g
どうも、ほそだです。ゴールデンウィークも終わり、暖かい空気を感じる季節になりました。 さてちょっと前に、こんな記事が話題になっていました。 You Don’t Need jQuery – Qiita (旧題:もうjQueryは必要ない) 元々は海外の方が書かれたものを日本語訳してくださったものですが、あらかた網羅されていて感服しました。実は今回、これと全く同じようなことをこのブログのネタにしようと考えていたのですが(jQueryでやってたことをjQueryを使わずにやってみた的な)、締切間近になってさあ書くぞってタイミングでここまで完璧なものを先に出されちゃったので、こりゃ勝てねえと泣く泣く断念したのですよね。。 それで急遽新たにネタを考えなきゃいけなくなったのですが、これに対するネット上での反応がけっこう興味深いなと思って見ていました。 「もうjQueryは必要ない」に関するみんなの反応
書こう書こうと思いながらこのタイミングまでのがしてしまいました。 今一番 Node.js の中で hot な discussion の一つと言えるでしょう、『ES Modules が Node.js の中でどうなるか』です。 ES Modules 現況 ES2015 が発刊されてそろそろ一年です。 ES2015 にある機能は Node.js v6でも 93% 程度カバーされています。モダンブラウザでも大体が90%を超えています。しかし、 ES Modules だけはまだどのブラウザも実装しきれていません(kangax compat table は ES Modules は省かれてます)。 そもそも ECMAScript 2015 自身で定義されたのは構文だけなので、構文はともかく、どうやってモジュールを取ってくるかという Loader の部分がまだ決まりきっていません。 https://w
class FlagIcon extends HTMLElement { constructor() { super(); this._countryCode = null; } static get observedAttributes() { return ["country"]; } attributeChangedCallback(name, oldValue, newValue) { // observedAttributes によって、 name はいつも "country" になる this._countryCode = newValue; this._updateRendering(); } get country() { return this._countryCode; } set country(v) { this.setAttribute("country", v)
概要 ES2015で特定の形で関数呼び出しがされている場合に末尾呼び出し最適化が行われるよう定められたが、 パフォーマンスや、デバッグなどの実装上の問題が浮上したため、それを解決するための新たな構文がV8で実装されたが、その後廃止された 説明 具体的には、strictモードの是非を問わず、「 return continue fn() 」という形での呼び出しについて最適化が有効になる。 (詳細は明示的でない末尾呼び出し最適化の記事をご覧ください) 最適化が効く例: function fn( n ) { 'use strict' if ( n <= 0 ) { return 'done!' } return continue fn( n - 1 ) } fn( 1e6 ) // "done!" 最適化が効かない例: function fn( n ) { 'use strict' if ( n
#child_process_sushiで最近やってたJavaScriptの設計の話をしてきた。 Almin.js | JavaScriptアーキテクチャ Fluxとかで上半分は皆やるようになったけど、ドメインモデルとかFluxの場合にビジネスロジックとかをどこに書くとかはまだ未成熟な気がしているので、そのパターンを考えててAlmin.jsというのを書いたという話をした。 Almin自体は大した実装ではないので、サンプルとかドキュメントとしてパターンについて学べるものを書いていきたいイメージ。(このアーキテクチャ話自体は、色々な言語で繰り返しやっては言語が廃れて、パターンがちょっと違う形で残るというのを繰り返している by @t_wada) JavaScriptでもウェブアプリやElectronでのアプリのような、APIを叩いて表示して終わりじゃなくて、ドメインモデルの生存期間が長いものが
IntersectionObserver’s coming into viewPublished on Wednesday, April 20, 2016 • Updated on Tuesday, October 3, 2017 Let’s say you want to track when an element in your DOM enters the visible viewport. You might want to do this so you can lazy-load images just in time or because you need to know if the user is actually looking at a certain ad banner. You can do that by hooking up the scroll event o
Wallaby.js runs your JavaScript and TypeScript tests immediately as you type, displaying results next to your code. Instant Actionable Feedback Time Travel Debugger Practical Test Insights Test execution results, including code coverage, are displayed and updated in realtime right where you need to see them — in your code editor, next to the line of code that you're editing. Say goodbye to context
概要 ES2015からは名前の無い関数定義であっても、コンテキストによって関数のnameプロパティが定義されるようになった。 nameプロパティが定義される例 直接的な変数への代入 f1 = function () {} var f2 = function () {} let f3 = () => {} const f4 = () => {} console.log( f1.name, f2.name, f3.name, f4.name ) // "f1" "f2" "f3" "f4" 直接的なプロパティ定義 o = { m1: function () {}, ['m2']: () => {}, m3() {} } console.log( o.m1.name, o.m2.name, o.m3.name ) // "m1" "m2" "m3" nameプロパティが定義されない例 間接的なケ
Please leave your sense of logic at the door, thanks! Adding JavaScript modules to the web platform April 13th, 2016 by Domenic Denicola in Elements, Processing Model, WHATWG One thing we’ve been meaning to do more of is tell our blog readers more about new features we’ve been working on across WHATWG standards. We have quite a backlog of exciting things that have happened, and I’ve been nominated
const areThey = 'Yes'; console.log(`${areThey}, they are`); // Logs: Yes, they are function strongValues(strings, ...values) { return strings.reduce((totalStr, str, i) => { totalStr += str; if (i in values) totalStr += `<strong>${values[i]}</strong>`; return totalStr; }, ''); } const areThey = 'Yes'; console.log(strongValues`${areThey}, they are`); // Logs: <strong>Yes</strong>, they are The synta
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く