es5 / es5.github.io Goto Github PK
View Code? Open in Web Editor NEWAnnotated ECMAScript 5.1
Home Page: https://es5.github.io/
Annotated ECMAScript 5.1
Home Page: https://es5.github.io/
The MDN reference links for
http://es5.github.com/#x15.3.5.1
and
http://es5.github.com/#x15.3.5.2 are swapped.
The one-page version is pretty huge and is capable of slowing down modern browsers considerably. It would be great to have a multi-page version, e.g. separate pages for each of the 16 chapters.
Thoughts?
Some of the errata for [15.9.1.15 Date Time String Format](some of the errata for 15.9.1.15 Date Time String Format) haven't got incorporated. For example,
HH
is the number of complete hours that have passed since midnight as two decimal digits.
is missing "from 00 to 24".
Also, the errata seem outdated, for example, ES5.1 has made the correction for
-
“:” (hyphen) ...
which should read
-
“-" (hyphen) ...
The production do Statement while ( Expression ); is evaluated as follows:
should be
The production IterationStatement : do Statement while ( Expression ); is evaluated as follows:
http://es5.github.io/#A.6 - uriMark includes ‘ when it should include ' (the inline part of the spec uses the irght character). The official spec uses the right character in both places, so I believe this is an issue only with es5.github.io.
The [[GetOwnProperty]] definition says "4. If X is a data property, then", but "data property" is not linked to the formal definition.
es5.github.com
to es5.github.io
to match the new URL (GitHub will set up a redirect from the old name to the new one)es5.github.com
should be changed to es5.github.io
to avoid confusionIn this section: http://es5.github.com/#x15.9.1.15 there is a row describing the hyphens as:
Note that it is actually a colon in quotes. I first assumed that it was an error in the original but at least this specification: http://www.ecma-international.org/publications/files/ECMA-ST/Ecma-262.pdf does not contain the error.
I checked the source and this problem exist in two files, I'll send a pull request.
At http://es5.github.com/#x15.2.3.7 steps 5 and 6 should be merged (5 is the pre errata and 6 is the post errata versions of step 5), and you are missing the real step 7.
Patch to follow
When I visited http://es5.github.com/#x13 I saw several texts referencing section 13.2 but no links to the section.
The standard is now 5.1 and some changes have occurred. The updated 5.1 has a second in it to cover the changed from 5 -> 5.1
Array#splice
has a spec bug associated with it here:
https://bugs.ecmascript.org/show_bug.cgi?id=429
The new version of Firefox (52) broke the parseInt() behavior on the test if (parseInt(ws + '08') !== 8 || parseInt(ws + '0x16') !== 22)
(line 1956) because of wrong whitespace characters ; returning NaN for both instead of 8 and 22.
Thus parseInt() is redefined by your shim. However, the case parseInt()
(empty parameter, or undefined, or null) throws an exception while using trim(string)
(line 1962) instead of returning NaN (as default behavior) - trim() should never be called with undefined or null as parameter.
This fixes the issue : if (str === undefined || str === null) str = "";
(to add before line 1962) ; Do not attempt to return NaN directly instead as it has bad side effects on some libraries (such as PerfectScrollbar) - I don't know why but it does.
Full example:
// ES-5 15.1.2.2
/* eslint-disable radix */
if (parseInt(ws + '08') !== 8 || parseInt(ws + '0x16') !== 22) {
/* eslint-enable radix */
/* global parseInt: true */
parseInt = (function (origParseInt) {
var hexRegex = /^[\-+]?0[xX]/;
return function parseInt(str, radix) {
if (str === undefined || str === null) str = "" ; // Fix here
var string = trim(str);
var defaultedRadix = $Number(radix) || (hexRegex.test(string) ? 16 : 10);
return origParseInt(string, defaultedRadix);
};
}(parseInt));
}
The redefined function parseFloat() should have the same fix too (before line 1974).
I'm wondering that whether it is possible to create a translation?
Thanks.
Just a suggestion for somebody who has the time available...
It would be useful to maintain links from appropriate sections to applicable bugs that have been filed at bugs.ecmascript.org. The bugs that apply are agains the "ECMA-262" component: https://bugs.ecmascript.org/describecomponents.cgi?product=ECMA-262
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.