ES6 arrow functions are often a compelling alternative to Function.prototype.bind(). Extracting methods # If an extracted method is to work as a callback, you must specify a fixed this, otherwise it will be invoked as a function (and this will be undefined or the global object). For example: obj.on('anEvent', console.log.bind(console)) An alternative is to use an arrow function: obj.on('anEvent',
Data is what programming is all about. Applications would be nothing without that beautiful i/o of data moving between modules, services, and data storage. But data is nothing if it’s not consistent. Obey was developed specifically to address, and provide solutions for, data modelling and validation for modern web applications developed in JavaScript. Diving In Let’s start with a simple example: v
Like many a developer both before and after me, the first time I saw JSX left me with a curious impression of React. Why is there html in my JavaScript? This is a terrible idea. I feel dirty. Fortunately, I heeded Pete Hunt’s advice and gave it five minutes. I suppressed my knee-jerk reaction, realized that JSX is just a declarative DSL (no one wants a DOM like api for creating components…), and b
知っていれば恐くない、XMLHttpRequestによるXSSへの対応方法:HTML5時代の「新しいセキュリティ・エチケット」(3)(1/2 ページ) 連載目次 皆さんこんにちは。ネットエージェントのはせがわようすけです。前回は、同一オリジンポリシーを突破する攻撃の代表的事例であるXSSについて、特にDOM based XSSと呼ばれるものについて解説しました。今回はその続きとして、XMLHttpRequestによるXSSを解説します。 XHR Level 2によるリモートからのコード挿入によるXSS 従来、XMLHttpRequest(以下、XHR)は、表示しているドキュメントと同じオリジン(オリジンについては第1回を参照)としか通信できませんでしたが、現在の主要なブラウザーではXHR Level 2と呼ばれる実装により、オリジンを超えて通信することが可能になっています。 これは、Jav
How does SAM work? SAM is built on one of the most robust foundation of computer science (TLA+). SAM recommends factoring application state management along three building blocks, actions, model, and state that are invoked in well defined "steps". Actions are triggered by events, their role is to translate events into proposals to mutate the model The Model is solely responsible for the decision o
hyperxify browserify transform for hyperx This module will compile your hyperx template strings down to javascript expressions so that you don't need to send the hyperx library over the wire. example Given some hyperx code: var vdom = require('virtual-dom') var hyperx = require('hyperx') var hx = hyperx(vdom.h) var main = require('main-loop') var loop = main({ times: 0 }, render, vdom) document.qu
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く