ECMAScript 2015 (6. version), ECMAScript Dili standartlarinin su an gecerli olan versiyonudur. ECMAScript 2015, Firefox ve diger Mozilla uygulamalarinda kullanilan JavaScript yoneticisi SpiderMonkey de uygulanan JavaScript standardlarini tanimlamaktadir.
ECMAScript 5.1 taban alinarak hazirlanan ve "ES.next", "Harmony" kod isimleri ile hazirlanan ilk calisir taslak 12 Temmuz 2011 de "ES.next" adi ile yayinlanmistir. ECMAScript 2015 nin ozellikleri Agustos 2014 te son sekline getirilip bu asamadan sonra hatalarin ve iyilestirilmelerin yapildigi periyoda girilmistir. ECMA-262 Version 6, ECMA General Assembly tarafindan 17 Haziran 2015 de resmi standart olarak onaylanmis ve yayinlanmistir. Bu standartlar, ayni zamanda uluslararasi endustri standartlari ISO/IEC 16252:2016 da yerini almistir.
Soz konusu stardartlarin PDF ve HTML versiyonlari ucresitsiz olarak ecma-international.org sitesinden indirilebilir.
ECMAScript standartlari ile dusunce ve izlenimler es-discuss uzerinden yapilabilinir.
Firefox tarafindan desteklenen ozellikler
Listelenen tum ozellikler hala hazirda Firefox tarafindan destekleniyor olup, her ozelligin hangi versiondan itibaren dekteklendigi de ayrica belirtilmistir.
Standart kutuphane
Array
nesnesine yapilan eklemeler:
Array
iteration withfor...of
(Firefox 13)Array.from()
(Firefox 32)Array.of()
(Firefox 25)Array.prototype.fill()
(Firefox 31)Array.prototype.find()
,Array.prototype.findIndex()
(Firefox 25)Array.prototype.entries()
,
Array.prototype.keys()
(Firefox 28)Array.prototype.copyWithin()
(Firefox 32)
Yeni Map
ve Set
nesneleri
Map
(Firefox 13)Map
iteration withfor...of
(Firefox 17)Map.prototype.forEach()
(Firefox 25)Map.prototype.entries()
,
Map.prototype.keys()
,
Map.prototype.values()
(Firefox 20)- Constructor degiskeni:
new
(Firefox 37)Map
(null) - Monkey-patched
set()
in Constructor (Firefox 37) get Map[@@species]
(Firefox 41)
Set
(Firefox 13)Set
iteration withfor...of
(Firefox 17)Set.prototype.forEach()
(Firefox 25)Set.prototype.entries()
,
Set.prototype.keys()
,
Set.prototype.values()
(Firefox 24)- Constructor degiskeni:
new
(Firefox 37)Set
(null) - Constructor da Monkey-patched
add()
(Firefox 37) get Set[@@species]
(Firefox 41)
WeakMap
(Firefox 6)WeakMap.clear()
(Firefox 20)WeakMap
constructor da opsiyonel iterable degiskeni (Firefox 36)- Constructor degiskeni
new
(Firefox 37)WeakMap
(null) - Constructor da Monkey-patched
set()
(Firefox 37)
WeakSet
(Firefox 34)- Constructor degiskeni:
new
(Firefox 37)WeakSet
(null) - Monkey-patched
add()
in Constructor (Firefox 37)
- Constructor degiskeni:
Yeni Math
fonksiyonlari
Math.imul()
(Firefox 20)Math.clz32()
(Firefox 31)Math.fround()
(Firefox 26)Math.log10()
,Math.log2()
,Math.log1p()
,Math.expm1()
,Math.cosh()
,Math.sinh()
,Math.tanh()
,Math.acosh()
,Math.asinh()
,Math.atanh()
,Math.hypot()
,Math.trunc()
,Math.sign()
,Math.cbrt()
(Firefox 25)
Number
nesnesine yapilan eklemeler
Number.isNaN()
(Firefox 16)Number.isFinite()
(Firefox 16)Number.isInteger()
(Firefox 16)Number.parseInt()
(Firefox 25)Number.parseFloat()
(Firefox 25)Number.EPSILON
(Firefox 25)Number.MAX_SAFE_INTEGER
,Number.MIN_SAFE_INTEGER
(Firefox 31)Number.isSafeInteger()
(Firefox 32)
Object
nesnesine yapilan eklemeler
Object.prototype.__proto__
standartlastirildiObject.is()
(Firefox 22)Object.setPrototypeOf()
(Firefox 31)Object.assign()
(Firefox 34)Object.getOwnPropertySymbols()
(Firefox 33)
Date
nesnesine yapilan eklemeler
Date.prototype
is an ordinary object (Firefox 41)- generic
Date.prototype.toString
(Firefox 41)
Yeni Promise
nesnesi
Promise
(Firefox 24, Firefox 29 de standart olarak kullanima sunuldu)
RegExp
nesnesine yapilan eklemeler
RegExp
sticky (y) flag (Firefox 3)- generic
RegExp.prototype.toString
(Firefox 39)
String
nesnesine yapilan eklemeler
String.fromCodePoint()
(Firefox 29)String.prototype.codePointAt()
(Firefox 29)String.prototype.startsWith()
,String.prototype.endsWith()
(Firefox 17)String.prototype.includes()
(Firefox 40) (formerlyString.prototype.contains()
(Firefox 17))String.prototype.repeat()
(Firefox 24)String.prototype.normalize()
(Firefox 31)String.raw()
(Firefox 34)- \u{XXXXXX} Unicode code point escapes (Firefox 40)
Yeni Symbol
nesnesi
Symbol
(Firefox 36)Symbol.iterator
(Firefox 36)Symbol.for()
- global Symbol registry (Firefox 36)Symbol.match
(Firefox 40)Symbol.species
(Firefox 41)
Tur Dizileri
Tur Dizileri, eskiden oldugu gibi kendi stardarlarina sahip olmak yeni, ECMAScript 2015 bir parcasi olarak standart halne getirildi
Ifadeler ve Islecler
- Diziler icin Spread isleci (Firefox 16)
- use
Symbol.iterator
property (Firefox 36)
- use
- Fonksiyon cagrilari icin Spread isleci (Firefox 27)
- use
Symbol.iterator
property (Firefox 36)
- use
Bildiriler
for...of
(Firefox 13)- works in terms of
.iterator()
and.next()
(Firefox 17) - use
"@@iterator"
property (Firefox 27) - use
Symbol.iterator
property (Firefox 36)
- works in terms of
Fonksiyonlar
- Rest parameters (Firefox 15)
- Default parameters (Firefox 15)
- Parameters without defaults after default parameters (Firefox 26)
- Destructured parameters with default value assignment (Firefox 41)
- Arrow functions (Firefox 22)
Generator function
(Firefox 26)
Diger Ozellikler
ES2015 ile tam uyumlu olmayan ozellikler
Asagida belirtilen ozellikler Firefox da kismi olarak uyarlanmis olup, ES2015 standartlari ile tam uyum gostermemektedirler. Bunun sebebi Firefox' da ki uygulamalarin ES2015 in daha eski olan taslaklarini taban olrak kullanmis olmasi ya da Firefox' un soz konusu ozelligi, bu ozeligin ES2015 standartlarindan daha once deneme amacli olarak uygulamaya konulmasindan kaynakli olabilir.
- Legacy iterators and generators (JS 1.7, Firefox 2)
- ES2015 iterators and generators Firefox 26+ da uygulamaya kondu.
- Destructuring assignment (JS 1.7, Firefox 2) (ES2015 compliance bug 950547)
const
(JS 1.5, Firefox 1.0) (ES2015 compliance bug 950547)let
(JS 1.7, Firefox 2) (ES2015 compliance bug 950547)Proxy
(Firefox 18) (ES2015 compliance bug 978228)
Firefox tarafindan kismi olarak desteklenen ozellikler
Bu ozellikler ES2015' in parcasi olmasina ragmen sadece bir kismi FireFox da desteklenmis ve su an itibari ile sadece nightly builds vasitasiyla kullanima sunulmustur.
Yeni class yapisi
Firefox tarafindan henuz desteklenmeyen ozellikler
Asagidaki ozellikler ECMAScript 2015 standartlarinda yer almasina ragmen henuz Firefox tarafindan uygulanmaya konulmamistir..
- Moduller(bug 568953)
import
syntaxexport
syntax
Array.prototype.values()
(bug 875433)Reflect
(bug 987514)- Bilinen semboller (bug 1119779)
- RegExp "u" flag (bug 1135377)