ヤフー株式会社は、2023年10月1日にLINEヤフー株式会社になりました。LINEヤフー株式会社の新しいブログはこちらです。LINEヤフー Tech Blog Yahoo!デベロッパーネットワークの中野(@Hiraku)です。これまで、JavaScriptで非同期処理を書く上での問題として、コールバック地獄やエラー処理に例外が使えないことなどを解説してきました。 これらの問題に対処するライブラリの1つであるjQuery.Deferredに関して、もう少し丁寧に解説いたします。なお、jQueryのバージョンは記事執筆時点の最新である、1.9.1を想定しています。 jQuery.Deferredとは jQuery.DeferredとはjQueryのバージョン1.5から導入された、非同期処理をうまく扱うための標準モジュールです。使いこなすことで、以下のような効果が見込めます。 非同期処理を連結
The next beta of jQuery 2.0 has arrived! This beta has several changes and tweaks based on the feedback we received from those of you who generously tested the first beta. We really need you to test this version as well and let us know what still needs to be done. We believe this version is very stable and ready for you to try; don’t wait until the final release and then find out your code doesn’t
CSSファイルをクライアントサイドだけで動的なURLつけて非同期読み込みしたい場合、単純に以下のようなコードを書くと同期読み込みになって読み込み完了まで他のファイルの読み込みがブロックされる。 (function () { var href = 'style sheet url'; var link = document.createElement('link'); link.rel = 'stylesheet'; link.href = href; var head = document.getElementsByTagName('head')[0]; head.appendChild(link); })(); (function () { var href = 'style sheet url'; var html = document.documentElement; html.st
新たな自動化で熱視線! AIエージェントの「推論能力」を支える2つのコンポーネントとは? 11月28日 6:30
This webpage was generated by the domain owner using Sedo Domain Parking. Disclaimer: Sedo maintains no relationship with third party advertisers. Reference to any specific service or trade mark is not controlled by Sedo nor does it constitute or imply its association, endorsement or recommendation.
1. One Language to Rule Them All Write simultaneously the frontend and backend code, in the same language, within the same module. Even better: the Opa Slicer automates the calls between client and server. No more manually written AJAX calls or value serialization! And when auto is not enough, add hints to the code to enforce client or server-side, privacy, synchronous or asynchronous.
はてなグループの終了日を2020年1月31日(金)に決定しました 以下のエントリの通り、今年末を目処にはてなグループを終了予定である旨をお知らせしておりました。 2019年末を目処に、はてなグループの提供を終了する予定です - はてなグループ日記 このたび、正式に終了日を決定いたしましたので、以下の通りご確認ください。 終了日: 2020年1月31日(金) エクスポート希望申請期限:2020年1月31日(金) 終了日以降は、はてなグループの閲覧および投稿は行えません。日記のエクスポートが必要な方は以下の記事にしたがって手続きをしてください。 はてなグループに投稿された日記データのエクスポートについて - はてなグループ日記 ご利用のみなさまにはご迷惑をおかけいたしますが、どうぞよろしくお願いいたします。 2020-06-25 追記 はてなグループ日記のエクスポートデータは2020年2月28
モバイルアプリケーションのためのバックエンドサービスに特化したクラウド、BaaS(Backend as a Service)として知られる「Parse」が、Cloud Codeという機能でサーバサイドスクリプトのサポートを開始しました。JavaScriptでサーバ側の機能を作り込むことができます。 これまでParseに代表されるBaaSでは一般に、データストア機能、プッシュ通信機能、ユーザー管理機能、ソーシャルとの連係、ロケーションとの連係など、あらかじめAPI経由で呼び出すことができる機能は決まっていました。 ParseのCloud Codeは、任意のロジックをBaaSに組み込むことを実現します。 サーバ側で演算、入力値のチェックなど 例えば、いままでは演算処理などのロジックはモバイルデバイス側のアプリケーションで記述しなければならなかったため、レストランガイドのアプリケーションで星の数
CoffeeScript Source Maps By Ryan Florence, published 2012-09-07 Michael Ficarra’s successful kickstarter to create a “better CoffeeScript compiler” is already paying some huge dividends to the backers with source maps. Debugging CoffeeScript, the most popular and strongest argument for not using it in the browser, is now 90% solved. Try it out yourself, what you’ll need: Google Chrome CoffeeScript
8月17 jsPerf, JSPerfView を使った、JavaScript コードのベンチマーク計測とブログなどで計測結果を利用する方法 jsPerf とは JavaScript のコードスニペットに対してベンチマークを計測するサービスです。 一般的に、コードの速度を計測する際は console.time, console.timeEnd を使う事が多いと思いますが、 実行するたびに結果がブレたり、短い処理では正確な比較ができなかったりします。 jsPerf では何度か同じ処理を実行して最終的に一秒間に何回実行できたかをスコアにするので、実行時間が 1ms より小さい処理でも計測できたり、ブレがあっても大体のスコアが分かったりします。 このスコアを計算する部分は Benchmark.js というライブラリで書かれていますので、サーバサイドの JavaScript コードの速度を計測する
URL の自動リンクをする autolink.js ってのつくった。 なんかまともにうごくフリーのやつみあたらなかったというか、そういう感じだったので、つくっといた。 https://github.com/tokuhirom/autolink.js/ 動作としては以下のようなかんじになります。まあコピペしてつかうなりなんなりご自由にどうぞ。MIT ライセンスってかいてあるけど public domain 扱いでいいので。 #!/usr/bin/env node var assert = require('assert'); var al = require('../lib/autolink.js'); assert.equal(al.autolink("http://google.com/"), "<a href='http://google.com/'>http://google.com
August just got a little hotter, because jQuery 1.8 final code is here! You can pick up the code from jQuery’s CDN: http://code.jquery.com/jquery-1.8.0.min.js (compressed and minified, for production) http://code.jquery.com/jquery-1.8.0.js (uncompressed, for debugging) As usual, the Google and Microsoft CDNs will also have the file soon. Please don’t ask us about when they’ll be there, we don’t kn
さいきんWebとiOS/Andoroid Native Appの融合がすすんでいますね! ブラウザコンポーネント(WebViewという)のJSからiOSのネイティブ機能を呼び出すスタイルも流行っています. PhoneGapとかFacebookアプリとかね! 自分は勝手にJS-Native Bridgeと呼んでいるのですが, あれってどうやってるのって話 Google先生で「uiwebview native」でぐぐると UIWebViewでWebとネイティブを相互連携させる方法について iPhoneのネイティブ機能をWebViewから呼び出す方法 こういう記事が出てきます ようするに Obj-C → JS [webView stringByEvaluatingJavaScriptFromString:@"JSCode"] JS → Obj-C webView:shouldStartLoadW
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く