JavaScript
Last reviewed/updated: 15 Aug 2023 | Published: 08 Jan 2014 | Status: Active
1. Introduction
1.1. JavaScript Introduction
- The web language for adding front-end programming logic to the web browser window and web pages.
- The web language that is object-oriented, interpreted by the web browser, and compatible with the Browser Object Model (BOM) and the Document Object Model (DOM).
- The front-end web browser window and web page behavior (including interactive/dynamic behavior) language.
- Web browser window behaviors include opening new web browser windows and displaying alert, confirm, prompt, find, and print dialogs. Web page behaviors include handling events, validating forms, and changing the content, structure, and style of web pages.
- Language concepts include: variables, strings, numbers, booleans, arrays, operators, statements, functions, arguments, objects, properties, methods, inheritance, and scope.
JavaScript was initially developed by Netscape. Instead of licensing JavaScript, Microsoft reverse-engineered JavaScript as JScript. Eventually, those interested in the language turned it over to a third party industry standards association, ECMA, for further development. ECMA develops the language as ECMAScript, and Standard ECMA-262 is the official documentation for ECMAScript. JavaScript and JScript are implementations of ECMAScript.
1.2. BOM Introduction
- Browser Object Model (BOM).
- An application programming interface (API) built into web browsers that allows programs and scripts to interact with the web browser window.
- Defines web browser objects and interfaces that allow programs and scripts to interact with the web browser window.
- Defines a hierarchy of web browser objects whose exposed objects, methods, and properties constitute an interface that allows programs and scripts to access and manipulate the web browser window.
- Root object: the
Window
object. The BOMWindow
object represents both the web browser window and the JavaScriptGlobal
object; and, therefore, is the link between JavaScript and the web browser window.
1.3. DOM Introduction
- Document Object Model (DOM).
- An application programming interface (API) built into web browsers that allows programs and scripts to interact with displayed HTML documents (i.e., web pages).
- Defines displayed HTML document structure, objects, and interfaces that allow programs and scripts to interact with web pages.
- Defines displayed HTML documents as a hierarchal, tree-like structure of objects (a.k.a., nodes) whose exposed objects, methods, and properties constitute an interface that allows programs and scripts to access and manipulate the content, structure, and style of web pages.
- Root object: the
Document
object. The DOMDocument
object represents the entire HTML document being displayed in the web browser window; and, therefore, is the link between JavaScript and the web page. The DOMDocument
object is a property of the BOMWindow
object. Therefore, the path to theDocument
object is first to theWindow
object and then to theDocument
object, which iswindow.document
.
2. Original Content
2.1. JavaScript Original Content
- AngularJS Shopping Cart Single Page Application (learnwebcoding.com)
- JavaScript Shopping Cart Single Page Application (learnwebcoding.com)
- Errata Pro jQuery 2.0 2nd Edition By Adam Freeman (learnwebcoding.com)
- JavaScript Techniques (learnwebcoding.com)
- JavaScript Technique: Breadcrumbs Navigation (learnwebcoding.com)
- JavaScript Technique: Change Web Page External Style Sheet (learnwebcoding.com)
- JavaScript Technique: Collapse Or Expand Multiple Sections Of A Web Page Simultaneously (learnwebcoding.com)
- JavaScript Technique: Tabbed Web Pages (learnwebcoding.com)
- JavaScript Feature Reference (learnwebcoding.com)
- JavaScript Feature Reference:
arguments
Object Web Browser Support Test (learnwebcoding.com) - JavaScript Feature Reference: Array Destructuring Syntax Web Browser Support Test (learnwebcoding.com)
- JavaScript Feature Reference: Arrow Function Syntax Web Browser Support Test (learnwebcoding.com)
- JavaScript Feature Reference:
bind()
Method Web Browser Support Test (learnwebcoding.com) - JavaScript Feature Reference:
class
Syntax Web Browser Support Test (learnwebcoding.com) - JavaScript Feature Reference:
classList
Property Web Browser Support Test (learnwebcoding.com) - JavaScript Feature Reference:
className
Property Web Browser Support Test (learnwebcoding.com) - JavaScript Feature Reference: Concise Method Syntax Web Browser Support Test (learnwebcoding.com)
- JavaScript Feature Reference:
create()
Method Web Browser Support Test (learnwebcoding.com) - JavaScript Feature Reference:
dataset
Property Web Browser Support Test (learnwebcoding.com) - JavaScript Feature Reference:
defineProperty()
Method Web Browser Support Test (learnwebcoding.com) - JavaScript Feature Reference:
endsWith()
Method Web Browser Support Test (learnwebcoding.com) - JavaScript Feature Reference:
entries()
Method On Arrays Web Browser Support Test (learnwebcoding.com) - JavaScript Feature Reference:
entries()
Method On Maps Web Browser Support Test (learnwebcoding.com) - JavaScript Feature Reference:
entries()
Method On Sets Web Browser Support Test (learnwebcoding.com) - JavaScript Feature Reference:
find()
Method Web Browser Support Test (learnwebcoding.com) - JavaScript Feature Reference:
findIndex()
Method Web Browser Support Test (learnwebcoding.com) - JavaScript Feature Reference:
for...of
Statement Web Browser Support Test (learnwebcoding.com) - JavaScript Feature Reference:
forEach()
Method On Arrays Web Browser Support Test (learnwebcoding.com) - JavaScript Feature Reference:
forEach()
Method On Maps Web Browser Support Test (learnwebcoding.com) - JavaScript Feature Reference:
forEach()
Method On Sets Web Browser Support Test (learnwebcoding.com) - JavaScript Feature Reference: Generator Function Web Browser Support Test (learnwebcoding.com)
- JavaScript Feature Reference:
Generator
Object Web Browser Support Test (learnwebcoding.com) - JavaScript Feature Reference:
getAttribute()
Method Web Browser Support Test (learnwebcoding.com) - JavaScript Feature Reference:
getElementById()
Method Web Browser Support Test (learnwebcoding.com) - JavaScript Feature Reference:
getElementsByClassName()
Method Web Browser Support Test (learnwebcoding.com) - JavaScript Feature Reference:
getOwnPropertyDescriptor()
Method Web Browser Support Test (learnwebcoding.com) - JavaScript Feature Reference:
getPrototypeOf()
Method Web Browser Support Test (learnwebcoding.com) - JavaScript Feature Reference:
hasOwnProperty()
Method Web Browser Support Test (learnwebcoding.com) - JavaScript Feature Reference:
includes()
Method Web Browser Support Test (learnwebcoding.com) - JavaScript Feature Reference:
indexOf()
Method On Arrays Web Browser Support Test (learnwebcoding.com) - JavaScript Feature Reference:
indexOf()
Method On Strings Web Browser Support Test (learnwebcoding.com) - JavaScript Feature Reference:
innerHTML
Property Web Browser Support Test (learnwebcoding.com) - JavaScript Feature Reference:
insertAdjacentHTML()
Method Web Browser Support Test (learnwebcoding.com) - JavaScript Feature Reference:
instanceof
Operator Web Browser Support Test (learnwebcoding.com) - JavaScript Feature Reference:
isArray()
Method Web Browser Support Test (learnwebcoding.com) - JavaScript Feature Reference:
isPrototypeOf()
Method Web Browser Support Test (learnwebcoding.com) - JavaScript Feature Reference:
JSON
Object Web Browser Support Test (learnwebcoding.com) - JavaScript Feature Reference:
keys()
Method On Arrays Web Browser Support Test (learnwebcoding.com) - JavaScript Feature Reference:
keys()
Method On Maps Web Browser Support Test (learnwebcoding.com) - JavaScript Feature Reference:
keys()
Method On Sets Web Browser Support Test (learnwebcoding.com) - JavaScript Feature Reference:
let
Declaration Web Browser Support Test (learnwebcoding.com) - JavaScript Feature Reference:
localStorage
Object Web Browser Support Test (learnwebcoding.com) - JavaScript Feature Reference:
Map
Object Web Browser Support Test (learnwebcoding.com) - JavaScript Feature Reference: Module Web Browser Support Test (learnwebcoding.com)
- JavaScript Feature Reference:
name
Property Web Browser Support Test (learnwebcoding.com) - JavaScript Feature Reference:
new.target
Metaproperty Web Browser Support Test (learnwebcoding.com) - JavaScript Feature Reference: Object Destructuring Syntax Web Browser Support Test (learnwebcoding.com)
- JavaScript Feature Reference: Object Literal Accessor Property Syntax Web Browser Support Test (learnwebcoding.com)
- JavaScript Feature Reference: Parameter Default Value Web Browser Support Test (learnwebcoding.com)
- JavaScript Feature Reference:
Promise
Object Web Browser Support Test (learnwebcoding.com) - JavaScript Feature Reference:
propertyIsEnumerable()
Method Web Browser Support Test (learnwebcoding.com) - JavaScript Feature Reference:
querySelectorAll()
Method Web Browser Support Test (learnwebcoding.com) - JavaScript Feature Reference: Rest Parameter Web Browser Support Test (learnwebcoding.com)
- JavaScript Feature Reference:
scrollIntoView()
Method Web Browser Support Test (learnwebcoding.com) - JavaScript Feature Reference:
Set
Object Web Browser Support Test (learnwebcoding.com) - JavaScript Feature Reference:
setPrototypeOf()
Method Web Browser Support Test (learnwebcoding.com) - JavaScript Feature Reference:
setTimeout()
Method Web Browser Support Test (learnwebcoding.com) - JavaScript Feature Reference:
splice()
Method Web Browser Support Test (learnwebcoding.com) - JavaScript Feature Reference: Spread Operator In Array Literals Web Browser Support Test (learnwebcoding.com)
- JavaScript Feature Reference: Spread Operator In Function Calls Web Browser Support Test (learnwebcoding.com)
- JavaScript Feature Reference: Spread Operator In
Math
Object Methods Web Browser Support Test (learnwebcoding.com) - JavaScript Feature Reference: Spread Operator In Object Literals Web Browser Support Test (learnwebcoding.com)
- JavaScript Feature Reference:
startsWith()
Method Web Browser Support Test (learnwebcoding.com) - JavaScript Feature Reference:
style
Object Web Browser Support Test (learnwebcoding.com) - JavaScript Feature Reference:
[Symbol.iterator]
Property Web Browser Support Test (learnwebcoding.com) - JavaScript Feature Reference: Template Literal Syntax Web Browser Support Test (learnwebcoding.com)
- JavaScript Feature Reference: Template Tag Syntax Web Browser Support Test (learnwebcoding.com)
- JavaScript Feature Reference:
TypedArray
Object Web Browser Support Test (learnwebcoding.com) - JavaScript Feature Reference:
values()
Method On Arrays Web Browser Support Test (learnwebcoding.com) - JavaScript Feature Reference:
values()
Method On Maps Web Browser Support Test (learnwebcoding.com) - JavaScript Feature Reference:
values()
Method On Sets Web Browser Support Test (learnwebcoding.com)
- JavaScript Feature Reference:
- jQuery Techniques (learnwebcoding.com)
2.2. BOM Original Content
3. Standards
3.1. JavaScript Standards
3.1.1 ECMAScript Standards
The edition of ECMAScript skipped from 3rd to 5th.
- Standard ECMA-262 June 1997: ECMAScript: A General Purpose, Cross-Platform Programming Language (.pdf) (ecma-international.org) (ECMA-262 1st edition)
- Standard ECMA-262 2nd Edition / August 1998: ECMAScript Language Specification (.pdf) (ecma-international.org)
- Standard ECMA-262 3rd Edition / December 1999: ECMAScript Language Specification (.pdf) (ecma-international.org)
- Standard ECMA-262 5th Edition / December 2009: ECMAScript Language Specification (.pdf) (ecma-international.org)
- Standard ECMA-262 5.1 Edition / June 2011: ECMAScript Language Specification (262.ecma-international.org)
- Standard ECMA-262 5.1 Edition / June 2011: ECMAScript Language Specification (.pdf) (ecma-international.org)
- Standard ECMA-262 6th Edition / June 2015: ECMAScript 2015 Language Specification (262.ecma-international.org)
- Standard ECMA-262 6th Edition / June 2015: ECMAScript 2015 Language Specification (.pdf) (ecma-international.org)
- ECMA-262 7th Edition / June 2016: ECMAScript 2016 Language Specification (262.ecma-international.org)
- ECMA-262 7th Edition / June 2016: ECMAScript 2016 Language Specification (.pdf) (ecma-international.org)
- ECMA-262 8th Edition / June 2017: ECMAScript 2017 Language Specification (262.ecma-international.org)
- ECMA-262 8th Edition / June 2017: ECMAScript 2017 Language Specification (.pdf) (ecma-international.org)
- ECMA-262 9th Edition / June 2018: ECMAScript 2018 Language Specification (262.ecma-international.org)
- ECMA-262 9th Edition / June 2018: ECMAScript 2018 Language Specification (.pdf) (ecma-international.org)
- ECMA-262 10th Edition / June 2019: ECMAScript 2019 Language Specification (262.ecma-international.org)
- ECMA-262 10th Edition / June 2019: ECMAScript 2019 Language Specification (.pdf) (ecma-international.org)
- ECMA-262 11th Edition / June 2020: ECMAScript 2020 Language Specification (262.ecma-international.org)
- ECMA-262 11th Edition / June 2020: ECMAScript 2020 Language Specification (.pdf) (ecma-international.org)
3.1.2. W3C And WHATWG Web IDL/API Recommendations/Etc.
- Pointer Events Level 3: W3C Working Draft 08 August 2021 (w3.org)
- Clipboard API And Events: W3C Working Draft, 6 August 2021 (w3.org)
- Intersection Observer: W3C Working Draft, 24 June 2021 (w3.org)
- Indexed Database API 3.0: W3C Working Draft, 18 June 2021 (w3.org)
- The Screen Orientation API: W3C Working Draft 17 June 2021 (w3.org)
- Input Events Level 2: W3C Working Draft 30 May 2019 (w3.org)
- Input Events Level 1: W3C Working Draft 30 May 2019 (w3.org)
- Pointer Events Level 2: W3C Recommendation 4 April 2019 (w3.org)
- Pointer Events: W3C Recommendation 24 February 2019 Superseded 4 April 2019 (w3.org)
- Indexed Database API 2.0: W3C Recommendation, 30 January 2018 (w3.org)
- WebIDL Level 1: W3C Recommendation 15 December 2016 (w3.org)
- Web Storage (Second Edition): W3C Recommendation 19 April 2016 Superseded 28 January 2021 (w3.org)
- Touch Events: W3C Recommendation 10 October 2013 (w3.org)
- Selectors API Level 1: W3C Recommendation 21 February 2013 Superseded 3 November 2020 (w3.org)
- XMLHttpRequest: Living Standard (xhr.spec.whatwg.org)
3.2. BOM Standards
- There is no dedicated BOM standard. Instead, the major aspects of the BOM are described in HTML5 under Web Application APIs.
- On 28 May 2019 the W3C and WHATWG reached an agreement, whereby: 1.)
HTML and DOM shall be developed principally in the WHATWG, following WHATWG Living Standard (LS) specification process
; and 2.)W3C agrees to discontinue its release plans for W3C versions of HTML 5.3 and DOM 4.1.
In other words, starting 28 May 2019, the WHATWG HTML Living Standard is the official HTML standard. For additional information, see Memorandum Of Understanding Between W3C And WHATWG (w3.org).
3.3. DOM Standards
On 28 May 2019 the W3C and WHATWG reached an agreement, whereby: 1.)
HTML and DOM shall be developed principally in the WHATWG, following WHATWG Living Standard (LS) specification process; and 2.)
W3C agrees to discontinue its release plans for W3C versions of HTML 5.3 and DOM 4.1.In other words, starting 28 May 2019, the WHATWG DOM Living Standard is the official DOM standard. For additional information, see Memorandum Of Understanding Between W3C And WHATWG (w3.org).
3.3.1. WHATWG DOM Specification
3.3.2. W3C DOM Level 1 Recommendation
3.3.3. W3C DOM Level 2 Recommendations
- Document Object Model (DOM) Level 2 HTML Specification Version 1.0: W3C Recommendation 09 January 2003 Superseded 3 November 2020 (w3.org)
- Document Object Model (DOM) Level 2 Core Specification Version 1.0: W3C Recommendation 13 November, 2000 Superseded 3 November 2020 (w3.org)
- Document Object Model (DOM) Level 2 Events Specification Version 1.0: W3C Recommendation 13 November, 2000 Superseded 3 November 2020 (w3.org)
- Document Object Model (DOM) Level 2 Style Specification Version 1.0: W3C Recommendation 13 November, 2000 Superseded 3 November 2020 (w3.org)
- Document Object Model (DOM) Level 2 Traversal And Range Specification Version 1.0: W3C Recommendation 13 November, 2000 Superseded 3 November 2020 (w3.org)
- Document Object Model (DOM) Level 2 Views Specification Version 1.0: W3C Recommendation 13 November, 2000 Superseded 3 November 2020 (w3.org)
3.3.4. W3C DOM Level 3 Recommendations/Etc.
3.3.4.1. W3C DOM Level 3 Recommendations
- Element Traversal Specification: W3C Recommendation 22 December 2008 Superseded 3 November 2020 (w3.org) (This is a supplementary specification to DOM Level 3 Core.)
- Document Object Model (DOM) Level 3 Core Specification Version 1.0: W3C Recommendation 07 April 2004 (w3.org)
- Document Object Model (DOM) Level 3 Load and Save Specification Version 1.0: W3C Recommendation 07 April 2004 (w3.org)
- Document Object Model (DOM) Level 3 Validation Specification Version 1.0: W3C Recommendation 27 January 2004 (w3.org)
3.3.4.2. W3C DOM Level 3 Working Drafts
- UI Events: W3C Working Draft, 30 May 2019 (w3.org)
- DOM Parsing And Serialization
DOMParser
,XMLSerializer
,innerHTML
, And Similar APIs: W3C Working Draft 17 May 2016 (w3.org)
3.3.5. W3C DOM Level 4 Recommendation
On 28 May 2019 the W3C and WHATWG reached an agreement, whereby: 1.)
HTML and DOM shall be developed principally in the WHATWG, following WHATWG Living Standard (LS) specification process; and 2.)
W3C agrees to discontinue its release plans for W3C versions of HTML 5.3 and DOM 4.1.In other words, starting 28 May 2019, the WHATWG DOM Living Standard is the official DOM standard. For additional information, see Memorandum Of Understanding Between W3C And WHATWG (w3.org).
4. Resources
5. Miscellaneous
- Memorandum Of Understanding Between W3C And WHATWG (w3.org)
- W3C Web Applications Working Group (w3.org)
- Microsoft | Docs | JScript (ECMAScript3) (docs.microsoft.com)
- DOM Enlightenment: Exploring The Relationship Between JavaScript And The Modern HTML DOM (domenlightenment.com) (Cody Lindley) (Free, online, pre-edited/draft version of the O'Reilly book, DOM Enlightenment.) (Published: 2013)
- jQuery (jquery.com)