-
Notifications
You must be signed in to change notification settings - Fork 0
ES6 Features used in the source
In the source code for Video.js we use ES6 -- new syntax features of the JavaScript language. When building the final video.js file these features get converted (transpiled) to JavaScript that is compatible with older browsers. If you're contributing to video.js, here's a guide of the features we use.
- Modules (import/export)
let
andconst
- Destructuring
Language-level support for modules for component definition. Codifies patterns from popular JavaScript module loaders (AMD, CommonJS). Runtime behaviour defined by a host-defined default loader. Implicitly async model – no code executes until requested modules are available and processed. (via babeljs.io)
Block-scoped binding constructs. let is the new var. const is single-assignment. Static restrictions prevent use before assignment (babeljs.io)