概要 「new.target」とは、ES2015で導入されたビルトインクラスのサブクラスを作る上で欠かせない存在である[[newTarget]]を取得するためのメタプロパティである。 従来の問題点 ES5まではArrayのようなビルトインクラスを適切に継承したサブクラスを作ることができなかった。 ES2015からのプロトタイプ設定機能を使うと可能であり、このようになる。 class Stack extends Array { constructor( ...args ) { var stack = new Array( ...args ) return Object.setPrototypeOf( stack, Stack.prototype ) } clear() { this.length = 0 } } しかし毎回このように書かないといけないのはスマートではない。 できればこの様に書
Show navigationWhat is V8?V8 is Google’s open source high-performance JavaScript and WebAssembly engine, written in C++. It is used in Chrome and in Node.js, among others. It implements ECMAScript and WebAssembly, and runs on Windows, macOS, and Linux systems that use x64, IA-32, or ARM processors. V8 can be embedded into any C++ application. Latest posts and feature explainersIntroducing the WebA
概要 今まではサロゲートペアによる文字を1シーケンスで表すことが出来なかったが、ES2015では『\u{xxxxx}』の形式で「0xffff」を超える文字コードを表すことができる。 例 var s1 = '\ud842\udf9f' var s2 = '\u{20b9f}' console.log( s1 == s2, s1, s2 ) // true "𠮟" "𠮟" 実装されるバージョン V8 3.31.38(文字列リテラル内) 4.2.1(正規表現リテラル内)
概要 例えば『Object.prototype.toString.call([])』と呼ぶと、『"[object Array]"』と帰ってくるが、 その「Array」の部分をどういう表記にするか設定できるビルトインシンボルが実装された。 例 function Cat() { } var cat = new Cat console.log( '' + cat ) // "[object Object]" Cat.prototype[Symbol.toStringTag] = 'Cat' console.log( '' + cat ) // "[object Cat]" 一部のビルドインコンストラクタには@@toStringTagが定義されている。 console.log( Map.prototype[Symbol.toStringTag] ) // "Map" 実装されるバージョン V8 3
概要 with文に与えたオブジェクトの特定のプロパティがスコープに含まれることを防ぐための、 ビルトイン"unscopables"シンボルが実装された。 例 @@unscopablesプロパティのオブジェクトが有する名前のプロパティは、値がTruthyならスコープから外される。 var a = 'unscopable', b = 'unscopable', c = 'unscopable' var obj = { a: 'scopable', b: 'scopable', c: 'scopable', } obj[Symbol.unscopables] = { b: true, c: false } with (obj) { console.log(a, b, c) } /* log "scopable" "unscopable" "scopable" */ 何故必要なのか ES2015で
概要 V8でES2015のイテレーション周りの実装が進んできたので、解説してみようと思う。 イテレーションとは ここではデータの要素を繰り返して取り出すこと。 例えば配列のforEachメソッドは、要素やインデックスをイテレートするイテレータである。 ただしこれらは(内部的に)繰り返しまで行うイテレータ(内部イテレータ)だが、ES2015では外部イテレーションのための仕組みが入った。 イテレータオブジェクト イテレータオブジェクトは『次の要素』を返すメソッドを備えているオブジェクトである。 つまりイテレーションの『次の要素を取り出す』ことだけを担い、それを繰り返すことは外で行われる(外部イテレータ)。 例 Array.prototype.values()は配列の要素を順番に列挙するイテレータオブジェクトを返す。 var ary = [5, 4, 3] var iter = ary.valu
追記(2018年4月16日):現在はWebKitではなくBlinkになったため“Experimental Web Platform features”というセクションになっている。さらにはもっと簡単に、runtime_enabled_features.json5というファイルを見ればどんな機能があるのかがわかるようになっている。 chrome://flagsにはいろんなランタイムフラグがある。CSS ShadersやらVP9 playbackやら、実験中の機能を有効にできるようになっている(動くかどうかはしらない)。 その中にこんなフラグがある。 Enable experimental WebKit features. Enable experimental WebKit features that are in development. Enable Experimental JavaS
You can find more information on our Wiki at http://www.v8project.org
Desktop Opera introduces Opera Air – a new browser built to make you feel better February 4th, 2025 Today we’re introducing Opera Air, the first web browser built around the concept of mindfulness. Desktop Opera invites you to browse from hygge desks in the most epic locations in Norway January 21st, 2025 Opera is looking for 10 people to browse the web from a hygge desk in one of Norway’s most sc
Daniel Clifford recently gave a great talk at Google I/O 2012 called “Breaking the JavaScript Speed Limit with V8”. In it he goes in depth to explain 13 simple optimizations you can do in your JavaScript code to help Chrome’s V8 JavaScript engine compile / run your JavaScript code faster. In the talk he gives a lot of great explanations as to what they are and why they help, but if you just want t
Join the official community for Google Workspace administrators In the Google Cloud Community, connect with Googlers and other Google Workspace admins like yourself. Participate in product discussions, check out the Community Articles, and learn tips and tricks that will make your work and life easier. Be the first to know what's happening with Google Workspace. ______________ Learn about more Goo
$200K 1 10th birthday 4 abusive ads 1 abusive notifications 2 accessibility 3 ad blockers 1 ad blocking 2 advanced capabilities 1 android 2 anti abuse 1 anti-deception 1 background periodic sync 1 badging 1 benchmarks 1 beta 83 better ads standards 1 billing 1 birthday 4 blink 2 browser 2 browser interoperability 1 bundles 1 capabilities 6 capable web 1 cds 1 cds18 2 cds2018 1 chrome 35 chrome 81
This document discusses adding a V8 API to SpiderMonkey, Mozilla's JavaScript engine. It aims to give SpiderMonkey a better C++ API like V8's and support evolving JavaScript features. Key points discussed include giving SpiderMonkey a "C++ the good parts" API like V8, supporting upcoming ES.next features like let/const, and exploring proposals for Harmony like arrow functions and classes. Examples
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く