Enables use of modern JavaScript by augmenting built in objects with the latest JavaScript methods. Never overrides any native implementations; it only adds what is missing. Include the augment.js source file before any JavaScript in which you wish to use modern JavaScript methods. Array.prototype.every - Checks whether all elements in the array pass the test implemented by the provided function.
Firefox 6.0a1 の話。なんか、FirefoxってECMAScript.nextの実験台になっている気が...w http://wiki.ecmascript.org/doku.php?id=harmony:proxies Proxyとは、なんていうかECMAScriptの内部関数をJavaScriptで再定義できる感じのもの。 Firefox 4.0から使える http://wiki.ecmascript.org/doku.php?id=harmony:weak_maps WeakMapとは、keyとなるオブジェクト(プリミティブ値ではダメ)に対応するvalueをセットでき、keyとなるオブジェクトへの参照がWeakMapのみになった時、そのkey,valueはGCされるって仕組みのもの。だと思う。(詳しくはよく分かってない) Firefox 6.0a1 にいつの間にか実装され
newを封印して、JavaScriptでオブジェクト指向する(1) - 泥のように newを封印して、JavaScriptでオブジェクト指向する(2) - 泥のように newを封印するべき4つの理由 - 泥のように あたりを読んで、たまにはライブラリ的なものを作ってみようと思い立って作ってみた。上記記事よりJavaScript的なクラスを作成できると思う。 コード https://gist.github.com/972456 jsdoc-tookitの練習としてコメントも入れているのもあって、最初は数十行で済ませるつもりが100行オーバーしてしまった。 一応、Firefox4.0とGoogleChromeで動作は確認したが、ECMAScript 5th 入りまくり、かつ、__proto__を使っているので一般Webではまだ使えないかも。(ダメじゃん) 特徴 特徴というほどでもないけど in
This is an (almost) complete overview of the ES5 specification. ECMAScript is the language that governs JavaScript. Although meant to be finished some day, I'm just too busy right now. Most notes were a first draft. The meta javascript language is not using a very consistent api, etc. But seeing how others are popping up (see below), I guess I should publish my notes and see whether I'll take the
In my last post I introduced the programming language concept of Mirrors and mentioned jsmirrors, the prototype I’ve been working on to explore using mirrors to support reflection within JavaScript. In this post I’m going to take a deeper look into jsmirrors itself. I had three goals for my first iteration of jsmirrors: Define basic mirror-based interfaces for reflection upon upon JavaScript obj
alert( [ ] == ![ ] ); /* true */ っていうのはよくJavaScriptのWTFネタとしてよく見るんですが、その仕組みについて深く追いかけたことがありませんでした。 そいで今日、 さっきのがなんでtrueになるのか忘れた…あれー。参照が同一であるかをみるのは、両者ともにObject型だったときのみだったっけ… とツイートしたところ、id:efcl(@azu_re) さんから @esperia09 http://d.hatena.ne.jp/otn/20100222/p1 参照を見るのは=== と、回答を頂いたので、せっかくですし詳しく調べてみることにしました! 問題となる式 alert( [] == ![] ); // true !つけてんのになんでtrueやねん!っていう、ちょっと分かりにくい"仕様"です。(バグじゃないよ!) まずは、この評価がどういう判断
Crockford On JavaScript: Level 7: ECMAScript 5: The New Parts 1 day ago Loading… Flash Player 9 (or above) is needed to view presentations. We have detected that you do not have it on your computer. To install it, go here. Crockford On JavaScript: Level 7: ECMAScript 5: The New Parts - Presentation Transcript Level 7ECMAScript 5:The New Parts Any change to a standard is an act of violence. Complet
ECMAScript *1 において、プロパティとは名前と値のペアを意味します。 より詳しく言うと、名前が付けられたプロパティは、その状態を表す属性 (Property Attribute) *2 の集合を値として持っています。 ECMA-262 5th edition では、この属性の値を指定してプロパティを定義できるように、Object.defineProperty というメソッドが導入されました。 この記事では、Object.defineProperty メソッドを使い、属性を指定してプロパティを定義する方法を説明します。 なお、ECMA-262 5th edition を実装している JavaScript 処理系はまだ多くありません。 Firefox 4 などの一部のブラウザなどでしか実行できません。 また、サンプルコード中で、結果を出力するための print 関数を使用しています
Web Reflection: ES6, Harmony, and JS++ http://www.3site.eu/JSNext.pdf [PDF] 内容がとても面白い。 Mozilla JavaScripterなら知っているものは多そうだが。 SpiderMonkeyで独自に採用されているものが将来的にECMAScriptに採用されて仕様に載ると良いなと思う。 ということで内容を紹介と個人的メモ ブロックスコープ let JavaScriptで変数宣言というと、var一択で、これは関数ブロックに対するスコープとなり、真のブロックスコープは存在しない。 ということでletってのが登場。 for文、ifのブロック内でのスコープを提供できるよ。 for (let i = 0; i < 3; i++){ // ...; } typeof i; // undefined iはfor文内のみのスコ
structs.js Written by Dave Herman A prototype implementation of the ECMAScript Binary Data API. This version currently only works in Firefox 4, because it depends on proxies. It could be extended to work in Safari and Chrome by avoiding proxies (whose use is confined only to field.js). Then with a bit more work, it could be extended to work in IE by shimming typed arrays via plain arrays. To use t
Microsoft is holding an AI Agents Hackathon, and we want to see what you can build with Python! We'll have 20+ live streams showing you how to build AI agents with Python using popular agent frameworks and Microsoft technologies. Then, you can submit your project for a chance to win prizes, including a Best in Python prize!
This feature is well established and works across many devices and browser versions. It’s been available across browsers since September 2016. Learn moreSee full compatibilityReport feedback The Proxy object enables you to create a proxy for another object, which can intercept and redefine fundamental operations for that object. The Proxy object allows you to create an object that can be used in p
You can find more information on our Wiki at http://www.v8project.org
Perlの話ではない、JavaScriptの話なのである。 あと、タイトルはまんじゅう怖い的な意味なのである ECMAScript 5 strict mode in Firefox 4 ? Mozilla Hacks ? the Web developer blog Firefox4.0b10pre に ECMAScript5 の Strict モードが実装されましたーパチパチー で、自分がはまった罠について書いておくよ。まあ上記ページに書かれていることなんだけどね。 "caller", "callee" in arguments オブジェクト 使うとエラー (function() { "use strict"; return arguments.callee; })(); TypeError: 'caller', 'callee', and 'arguments' properties
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く