rubyの軽量フレームワークsinatraとBackbonejsでpjaxをやってみたので備忘録。 HTML5からはhistoryオブジェクトにpushStateやreplaceStateメソッドが追加され、履歴のスタックを操作できるようになりました。pjaxは、そのpushStateとAjaxを利用したブラウザの戻る・進む機能が使える技術。 通常のリクエストと異なり、必要な箇所だけをAjaxで取得するためデータの転送量を削減できる。 具体例でいうと、あのGitHubで使われてるやつ。 以下は個人的なメモ。 ヘッダー情報にHTTP_X_PJAXが付与されている場合はpjaxの処理をさせる [sourcecode language="ruby"] class Sinatra::Request def pjax? env['HTTP_X_PJAX'] || self['_pjax'] end
<div id="capture" style="padding: 10px; background: #f5da55"> <h4 style="color: #000; ">Hello world!</h4> </div> html2canvas(document.querySelector("#capture")).then(canvas => { document.body.appendChild(canvas) });
Credits for music artists are on staff rolls of each games and here. Feel brave? So you're ready for the Dark side of Akihabara with experimental material! Uh-uh-uh! HTML5 is my Arcade. Akihabara is a major Tokyo shopping area for electronic, computer, anime, and otaku goods. You can find any sort of old & new videogames, starting from the 8-bit era to modern motion-sensing videogames. But is also
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く