Previous Next We've seen that a web page is composed of elements — headings, paragraphs of text, images, buttons, and so on — and that you can listen for events that happen to these elements. For example, you could add a listener to a button, and it will run when the user clicks the button. We've also seen that these elements can be nested inside each other: for example, a <button> could be placed
このエントリはJavaScript Advent Calendar 2010 : ATNDの20日目として書きます。一つ前はsecondlifeさんのコマンドラインから JavaScript のシンタックスチェックを行う方法 - って、なんでですか〜 - subtechでした。 普段はC#でもしゃもしゃしている、@neuecc(twitter)といいます。そんなわけで今回はC#畑からのJavaScriptライブラリを二つほど紹介します。 ここではC#の中でも、LINQ: .NET 統合言語クエリという機能から来ているlinq.jsとRxJSを紹介します。linq.jsはコレクション操作を、RxJSはイベント操作と非同期操作に関するライブラリとなっています。どちらもwindowオブジェクトには一切触らない、DOMやXmlHttpRequestとは全く無関係の中立で地味な、phpspotで紹介
Previous Next JavaScript typed arrays are array-like objects that provide a mechanism for reading and writing raw binary data in memory buffers. Typed arrays are not intended to replace arrays for any kind of functionality. Instead, they provide developers with a familiar interface for manipulating binary data. This is useful when interacting with platform features, such as audio and video manipul
Emacsauto-complete.el は,補完候補をプルダウンで表示し,補完してくれる非常に強力な Emacs の拡張です.インストール,初期設定と詳しい説明については以下を参照してください.http://www.emacswiki.org/emacs-en/AutoComplete 今回は,この拡張で関数やプロパティ名などを補完するようにしてみました.基本的には前の記事と同じような感じです.http://d.hatena.ne.jp/jimo1001/20080712/1215842570因みに,補完候補のリストは xyzzy のようにリストの記述されたファイルを使用します. 補完候補リストのファイルhttp://files.undo.jp/completions.tar.gz Source以下 JavaScript 定義です.他のモードは適当書き変えると動きます. ;; ac-m
Note: I have stopped updating this page. At this point nearly all popular browsers are have achieved a good level of compatibility on most of these features, and their behavior with respect to them just isn't changing much anymore. The only thing web designers really need to still watch out for is IE8, which is lingering due to the fact that it is the best version of IE that works on windows XP. (
This feature is well established and works across many devices and browser versions. It’s been available across browsers since July 2015. * Some parts of this feature may have varying levels of support. Learn more See full compatibility Report feedback KeyboardEvent objects describe a user interaction with the keyboard; each event describes a single interaction between the user and a key (or com
Previously I analyzed ECMAScript 5’s Object and Property system. This is a huge new aspect of the language and deserved its special consideration. There are a number of other new features and APIs that need attention, as well. The largest of which are Strict Mode and native JSON support. Strict Mode is a new feature in ECMAScript 5 that allows you to place a program, or a function, in a “strict” o
The Evolution of Async-Programming (SD 2.0, JavaScript)AI-enhanced description This document discusses the evolution of asynchronous programming. It begins by explaining why asynchronous programming is important for cloud, web and mobile applications due to their inherently asynchronous nature. It then covers several approaches to asynchronous programming including callback-based, iterator-based,
JavaScript Advent Calendar 2010 8日目担当のid:os0xです。 JavaScriptネタは案外範囲が広くて色んなネタがあるので、毎回が楽しみですね。 さて、私はデバッグをネタにしたいと思います。テストではなくデバッグです。誰かが書いたコードをメンテナンスしなきゃー、とか。jQueryプラグイン導入しようとしたけど、なんかうまく動かないーみたいなケースのおはなしです。 JavaScriptのデバッグは大変なので、多くの方が日々苦労されていると思います。なぜJavaScriptのデバッグが大変なのか少し整理してみましょう。 ブラウザ依存 まず、なんといってもJavaScriptはウェブブラウザ上で実行されるので、環境が一定ではありません。特定の環境だけを対象にJavaScriptを書くことは滅多にありません。PC向けではIE、Firefox、Chrome、Sa
It’s a great time for JavaScript. Not only is it becoming a much more respected language, but it's also growing in leaps and bounds - both in popularity and features. As more browsers begin to implement the features of the ECMAScript 5th edition standard, JavaScript becomes an even more powerful platform for you to develop on. In this tutorial, we’ll talk about the new methods that are available t
はじめに JavaScriptの数値表現はIEEE754の64ビットの倍精度型浮動小数ですが、ビット演算はどのように定義されているのでしょうか。今回はそのビット演算について解説します。この仕様は10年以上前から変わらないのですが、改めてその部分が書籍などでどのように解説してあるかを見ると、and, or などのビット演算が教科書的に書かれているだけで、任意の数値に対してどう定義されるかについてはほとんど説明されていません。 JavaScript以外の言語では? JavaScriptについて説明する前に、他の言語ではどうなっているでしょうか。ここでは、ちょっと手を抜いて実際に実行した結果のみを示します。バージョンによっては結果が違うかも知れません。 まずは、一番単純な 0 との orを調べてみました。つまり x | 0 の結果です。 x C (gcc) Java Ruby Perl -123
Arrayインスタンスを拡張したい。 prototype汚染はさせない Array.prototypeの上書き禁止 Arrayオブジェクトと同じ挙動 という条件。 下記、EXArrayというコンストラクタをArrayの様な扱いにしたいわけだ。 テストコードでも書いているが instanceof obj instanceof Array // true であること obj instanceof EXArray // true であること 配列要素は hasOwnProperty で true が返ること toStringが配列っぽく返ってくること までは実現できている。しかし、 JSON.stringify(obj) が Arrayっぽくない obj.toSource()がTypeError: Array.prototype.toSource called on incompatible O
HTML5のhistory.pushState、history.replaceStateを試した。 HTML5 pushState/replaceState demoで動かせる。 Minefieldだと完全に意図した通りに動くがWebKitだとURLまわりがうまくいかない。 メインのソースコードは下記の通り。 canvasで適当に壁紙用画像を作るデモで、画像自体をクリックして何度も作り直せるようにした。 こういう物を作るときは、前の画像に戻れるよう履歴管理をすべきだが、今まではlocation.hashを使ったり(hashchangeイベントが入るまではタイマーが必要だった)iframeを使ったハックだったり(ブラウザ間の互換性やhistory.go(-2)をきちんと動かすのが難しい)、あるいはページを遷移する(必要ない部分まで毎回読み込まれる)必要があった。 pushState/repl
JavaScript Advent Calendar 2010 6日目のid:Constellationです. ECMAScript5になって大きく変更されたといえば, strict mode, early error, Object extras, そしてProperty Descriptorの概念です. ということで今回はES5 PropertyDescriptorについてまるっと分かってしまおうということで. Property Descriptorとは JavaScriptのObjectは事実上Hash Tableです. しかし, key -> value という対応でHash Tableに格納されているのかといえばそうではありません. なぜなら, EcmaScriptにはgetter / setterやattributeが存在するからです. // getter / setter v
See harmony for requirements, goals, and means informing and guiding the proposals under development for ES-Harmony. Lacking a formal language specification, the following list is not definitive, but it should reflect consensus achieved so far in TC39. Anything can be revisited for a good reason, of course. The following list will grow, but not without bound before the next ECMA-262 Edition is con
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く